Wednesday, October 6, 2010

ruby script "cheat" for cheat sheets

If you find yourself looking for cheat sheets for all your programming needs try the little gem "cheat". Note that for Ubuntu (this blog features mostly Ubuntu specific instructions) you need to symlink cheat into /usr/bin/. Install ruby and gems if not already installed first.

$ sudo apt-get install ruby1.8 rubygems1.8
$ sudo gem install cheat
$ sudo ln -s /var/lib/gems/1.8/bin/cheat /usr/bin/


Then lets say you just can't remember that Perl special variable so you can just do:

$ cheat perl

and see what you get!

No comments: