I’m the kind of guy who has a tendency to memorize where to find information instead of the information itself. It usually goes something like this:
google -> foo -> 3rd link -> middle of the page -> oh yeah -> profit$ google -> bar -> 2nd page -> 5th link -> sidebar 2nd link -> ahh yeah -> profit$
I love compulsive behavior as much as the next guy – but this does get old after a while, even looking up obscure Ruby methods and Bash commands to satisfy my questionable motivations. You can break the cycle; you can cheat the system.
Err the Cheat
‘cheat’ is a small utility app created by Chris Wanstrath (of Err and GitHub fame) that is basically a command line interface to a simple wiki. It was announced over a year ago and is built on _why’s excellent Camping ‘microframework’ with a YAML backend.
Anyone can create, edit, and modify cheat pages and anyone can call them up via the command line tool like so:
cheat foo
Installation
‘cheat’ is a gem and can be installed thusly:
sudo gem install cheat
You can check to make sure that everything is copacetic by issuing:
cheat cheat
If this works, you’re cheating.
Cheating
The first thing you should do is check out the all of the available cheat sheets. If there’s something you need that’s not in the list – by all means create your own, it benefits everyone (…or just you depending on how obscure the information is).
You can list the available sheets:
cheat sheets
Some sheets of interest include: sed,
awk, git, git-svn, vim, and of course acts_as_taggable_on.
You can call up any of the sheets by name using the cheat command:
cheat 'foo_sheet_title'
Note: each time you access a sheet for the first time it gets cached locally in a .cheat folder in your home folder (This is on OSX, this will still work on windows, but you need to have a HOMEDRIVE or HOMEPATH environment variable set).
Cheated
You can be compulsive and efficient at the same time – thanks Cheat! Instead of hitting google everytime you need that same obscure ruby/awk/sed/vi reference — just cheat and the system goes from:
google -> ??? -> profit$
to:
cheat foo -> profit$
Ditch the ambiguous question marks and accelerate your profit$, cheat.
“Please be kind to the wiki. And, uh, keep the cheat sheets Ruby-centric. Bash is okay but Python is banned.” – Chris Wanstrath