linux

(A Detailed Explanation of) Ruby’s Symbol#to_proc

Must people love a new feature in Ruby called Symbol#to_proc, but there are not many good explanations of it. The concept is actually fairly straightforward, but the Ruby implementation is fairly complex. The following is an explanation that assumes no knowledge of Ruby.

Read more...

Written on Mon Feb 25 18:04:26 2008.
Tagged as linux, ruby, script.



The script I use every day

The script I use most frequently is a script for extracting files. If you work from the linux command line, it is impossible to remember which program with which flags should be used to extract a file. This is something the computer should do for you! This extraction script solves the problem, and you can configure the first lines of the script to match any filetype. I use it so often that I have it aliased to ‘e’

Read more...

Written on Fri Feb 1 00:59:26 2008.
Tagged as linux, ruby, script.