Sometime last week an idea popped in my head (most likely because I heard it mentioned sometime earlier) — why not use Git for backing up important server files (especially ones that live in /etc). I haven’t tried it out yet, but here are some interesting links that I plan on checking out soon:
A backup [...]
In my main project, I have sworn off the use of attr_accessible. It is not that I don’t believe in security. I do. The reason is simple: using attr_accessible makes it hard to use the block forms of new and create with any sort of confidence.
For example, if I use this in my Goal model:
attr_accessible [...]
The Nginx wiki is helpful and well done. It is the definitive reference, unless you enjoy reading the C source code. Still, I wouldn’t mind finding some more content that explains Nginx. I’m the kind of person that looks for the why behind the how; it just makes me feel more comfortable when I understand [...]
Ruby 1.8.6 does not support look-behind using its default regular expression engine. To get this support, I needed the Oniguruma library and gem. Installation was a bit confusing on Mac OS X Leopard. These blog posts were helpful to get me started:
Juju explains how to build Ruby from source with Oniguruma patched in. I didn’t [...]
Git can use delta compression to achieve substantial space savings. As more data is added to a git project, relatively little additional space is needed.
I’ve been thinking through this and have the following observations:
The more different the additional data, the less effective delta compression will be, all other things equal.
It is pretty straightforward to realize [...]
I agree with Obie and others who recommend Haml. That said, I ran into a strange issue lately: I was finding lots of extra leading spaces in a textarea.
The culprit was Haml, or, rather, my misunderstanding of it. Haml is great for making your HTML source properly indented. However, this means that Haml may add [...]
Usually more tests are a good thing. However, when you get “extra” tests when you don’t expect them, you might be a little mystified…
rake spec:views
(in /Users/djwonk/dev/ci/cogo/trunk)
………………………………………………………………………………………
Finished in 2.708531 seconds
99 examples, 0 failures
Loaded suite /opt/local/bin/rake
Started
Finished in 0.001315 seconds.
0 tests, 0 assertions, 0 failures, 0 errors
Note how rake spec:views finished… but still goes ahead and runs the [...]
How many people out there love RADAR? I’m talking about the so-called RADAR architecture as described by Dave Thomas. The core of the RADAR idea, to me, is simple. Rather than build a large monolithic app, split it up into a REST Application Server and an HTML Presentation Server:
The Application Server should contain only what is needed [...]
Just in the last few minutes I began poking around at various HTTP libraries in Ruby. You’re probably familiar with the old-standby Net::HTTP. Here are some higher-level alternatives that I have found, largely thanks to a previous blog discussion and reading RESTful Web Services. I’ve quoted snippets from their home pages to give a quick overview.
httpclient -”httpclient gives something [...]
There are quite a few blog posts about how to import a Subversion repository into git. Simplistic Complexity’s write-up is the best I’ve seen on how to do it cleanly. Here is a quick summary of the steps:
mkdir temp_repos; cd temp_repos
# init the git repository, do not import quite yet
git-svn init svn://repository_goes_here
# specify mapping from [...]