Read my latest article: Announcing RailsDeveloper (posted Wed, 01 Sep 2010 17:01:00 GMT)

Meet the Cheat

Posted by Robby Russell Wed, 10 Jan 2007 18:37:00 GMT

8 comments Latest by hermes handbags Mon, 28 Jun 2010 05:38:44 GMT

Hey! You’re a cheater!

Well, if you’re not… I’m hoping to make one out of you.

“A thing worth having is a thing worth cheating for.”—W. C. Fields

I’m a fan of the PDF cheat sheets as I like the consolidated content contained in them. However, I don’t like having to read PDFs any more than I have to. Printing them isn’t always ideal either as I really don’t like to carry around extra paper in my laptop bag. So, what are we to do?

Well, you can cheat the system! ...and I’m going to show you how!

Cheat is this really nice command-line tool that outputs a plain text cheat sheet whenever and wherever you want.

Install the Cheat

Like all the happy and good Rubygems, this is quite simple…


$ sudo gem install cheat

Done! Okay… let’s try to do some cheating. Don’t worry, your friends and family will forgive you.

Becoming a Cheat(er)

To view a cheat sheet, just run the cheat command from your favorite terminal window.

$ cheat _cheat name_

So, for example… to see the cheat sheet for RSpec, run cheat rspec.


    $ cheat rspec
    rspec:
      INSTALL
      =======
      $ sudo gem install rspec

      $ ./script/plugin install
      svn://rubyforge.org/var/svn/rspec/tags/REL_X_Y_Z/vendor/rspec_on_rails/vendor/p
      ugins/rspec
      Where X_Y_Z is the version number.

      $ ./script/generate rspec
            create  spec
            create  spec/spec_helper.rb
            create  spec/test2spec.erb
            create  test/test2spec_help.rb
            create  script/rails_spec
            create  script/rails_spec_runner

      HOW TO USE
      ==========
      ./script/generate rspec_model User

####################################################
# truncated to save precious bandwidth
####################################################

Because this is all printing out in your shell, you can take advantage of your favorite command line tools.

Piping to grep


$ cheat rspec | grep 'equal' 
      @user.errors.on(:username).should_equal "is required" 
  target.should_equal <value>
  target.should_not_equal <value>

Piping to TextMate

$ cheat rspec | mate

Find more Cheats

Head over to this list of cheats to see what is currently available.

Thanks to the Err team for putting this together!

Subscribe to my RSS feed Enjoying the content? Be sure to subscribe to my RSS feed.
Comments

Leave a response

  1. Avatar
    Toniqus Mon, 13 Aug 2007 23:13:47 GMT

    http://adqrbawfqaaqw.host.com desk3 [url=http://adqsbawfqaaqw.host.com]desk4[/url] [link=http://adqabawfqaaqw.host.com]desk6[/link]

  2. Avatar
    pozycjonowanie Mon, 24 Sep 2007 13:05:10 GMT

    Good idea :“A thing worth having is a thing worth cheating for.”

  3. Avatar
    ugg classic tall chocolate Wed, 26 May 2010 03:07:43 GMT
  4. Avatar
    timberland shoe Wed, 26 May 2010 03:08:08 GMT
  5. Avatar
    nike shox shoes Mon, 07 Jun 2010 03:00:23 GMT

    chi flat irons, chi straightener,thank you for your provided information, which are useful for me.

  6. Avatar
    coach boots Mon, 14 Jun 2010 00:37:18 GMT

    coach sneakers http://www.discount-coach-outlet.com/coach-sneakers.html zkazxh@qq.com I am also a http://www.all-carefully.net fan who really like this! I also like XX, and purchase lots of it every time, like-minded friends can have a look ,we can communicate by the way~~

  7. Avatar
    louis vuitton Thu, 24 Jun 2010 06:30:50 GMT

    The haversack of a Louis vuitton bags . As for louis vuitton handbags , the designers accept their own cast value, even for their lv . louis vuitton is so abiding and accept able ability for water-proof and fire-proof.

  8. Avatar
    hermes handbags Mon, 28 Jun 2010 05:38:44 GMT

    The hermes handbags may be one of a lot of big-ticket accessories in the world. It can yield three to four crocodiles to accomplish one Hermes Evelyne , the abate of scales on the skin, the amount is college of the hermes scarf . The GREEN ACRES specification includes advanced features, the possibility of viewing different angles of a video stream and simple computations using built-in registers provided by a GREEN ACRES DVD player. The GREEN ACRES DVD COLLECTION mailing list is a good source for further information

Share your thoughts... (really...I want to hear them)

Comments