Posted by
james – March 11, 2008
I personally dislike the current naming scheme of partials. Right now they follow the format of _somepartial.html.erb (Rails 2.*). I find it rather distracting and hard to find what I want when I am in a directory full of partial files following that naming format.
My suggestion is to use .perb for partials. I think files like somepartial.html.perb would be much more pleasant to look at, a kind of syntax sugar to encourage more usage of partials perhaps. Also, I think it would be a more consistent naming scheme.
Vote for somepartial.html.perb ;)
Posted by
james – March 9, 2008
I was trying to figure out how to run a specific version of a gem, in this case, capistrano. I had capistrano 2.2.0 and 1.4.1 installed and I wanted to run the older version.
Trying to run /opt/local/lib/ruby/gems/1.8/gems/capistrano-1.4.1/bin/cap only gave me an error:
undefined method `execute!' for Capistrano::CLI:Class (NoMethodError).
Turns out the trick is to use:
cap _1.4.1_ deploy
I haven’t tried it with other gems, but I am guessing it should be consistent across rubygems and that will be the way to execute older versions of ruby gems.
Posted by
james – March 9, 2008
28384376 * 1024 = 29065601024
The 1024 is repeated in the answer. I initially thought it was a bug in my program, but double-checked, and I thought it was pretty cool how the 1024 ends up at the end, with a buffer (the zero) between it and the rest of the number.
Perhaps alife could be done entirely using numbers and math operations.
Posted by
james – March 7, 2008
for i in ` git st | grep deleted | awk ‘{print $3}’ ` ; do git rm $i; done
Posted by
james – March 6, 2008