Let the mac sleep

How to turn off/sleep OS X Mac Screen. It took me a lot of researching on internet to find these shortcut keys.

Sleep immediately (no confirmation): Cmd-Opt-Eject
Put display to sleep: Ctrl-Shift-Eject

Power Programming with Tags

Source tagging is very powerful source code navigation system, it beats any state of the art IDE. If you are using Emacs, Vim and TextMate then you can use source tagging for navigation. Here are the few simple steps to do it.

Step 1. Install ctags in your system. For mac

$ sudo port install ctags

Step 2. Create A tag file

$ cd /Users/username/Workspace/rails-project
$ ctags -e -a --Ruby-kinds=+f -o TAGS -R app/ lib/ config/

It is best to add this in crontab for this around 11:30am

Step 3.1 emacs

M-. Follow a tag
M-* Jump back to source.

Step 3.2 vim
just add this in your ~/.vimrc

set tags=TAGS;/

Once this is done you can navigate to source of tag by using.

C-] - go to definition
C-T - Jump back from the definition.
C-W C-] - Open the definition in a horizontal split

Hope you will be able to use this awesome feature.
C is ctrl
M is Meta/Alt/Ecs

Prevent Googlebot following links in Gmail

How to prevent googlebot following links in gmail messages? Well bad news is “Googlebot is following links sent to subscribers of a mailing list by email and it is causing those subscribers to receive an unsubscribe meesage or a added download from the list or server”.

Bigger Bad news is that age old trick will NOT work here, we can not solve this simply by adding

<a href="signin.php" rel="nofollow">sign in</a>

Best way in my opinion is to reject download count based on the user agent. Which is Googlebot in case of Google Crawler.

find long answer here.


Clan War – Let it begin

slideshare is famous as a presentation and document sharing platform. But very few people around know about slideshare‘s love for first persone shooters. It’s a daily evening trend now. If slideshare is not down then there must be a UrT match going on in delhi office. It has reached to the extent that now we have two in-house clans, each consisting of five players. It has opened possibility of five verses five clan matches.

Jeba(graydot), Pranav(silent_horror), Jai(*thunder), Tushar(zombi), Kanav(Ka_boom) and I(cpt) are in one team and Prafulla(Element), Sahil(Engassa), Arpit(cctv), Shirsendu(Toy_da_virus) and Ankur(danger) are in the other one. Kapil(anachronox) will use auto join. 🙂

Suggest me names guys.