Tag: quicktip

I hardly ever use the local RDoc documentation of my installed Ruby gems. Typing in –no-rdoc –no-ri every time I install a gem is cumbersome. The gem takes longer to install and it uses up unnecessary disk space. That annoyance goes doubly when installing gems on a server.

Luckily, RubyGems allows to set default options in a file called .gemrc which should be placed in your home directory. The syntax is in YAML format, therefore straightforward for a Ruby programmer. Just add this line to .gemrc and you are golden.

    gem: --no-rdoc --no-ri
  

A list of all options can be found here.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Another neat trick I keep forgetting. If you want to search your shell history, just type in control-r and then your search query. You can browse through the search results by repeatedly pressing control-r. A big time saver if you ask me.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

This is quick tip week. Have you ever wanted to preview a file on OSX with quick view without leaving the console. Well here is how:

qlmanage -p file

So if you wanted to preview the file image.png you would type:

qlmanage -p image.png

If you want to see the thumbnail preview of a file instead, just use -t instead of -p.
To close the window either click the cross on the upper right corner or hit control-c to cancel the process. Happy previewing!

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]