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.

 

Tmux – Gnu Screen alternative

I am an ancient user of Gnu Screen. I am the one who will suggest new users use these better tools for servers. Gnu Screen is an excellent tool, but It is tough to configure and learn.

Recently I found a replacement. The Tmux!
Tmux is very easy to use. The best part is the shortcuts. 🙂

To install it in mac do

$ brew install tmux

on ubuntu

$ sudo apt-get install tmux

You can put your setting in ~/.tmux.conf

# set -g default-terminal "xterm-color" 
set -g terminal-overrides 'xterm*:[email protected]:[email protected]'

This should be enough to get you started. Google for Tmux cheat sheet to know popular shortcuts. Here is one of them. http://cheat.errtheblog.com/s/tmux

Photo shoot

Recently Jai came to pune. He is a hell of a photographer. I have used many of his amazing photos on my blog. Here are few shots from his Cannon 1000D with Cannon 50mm prime lens.

If you are unsatisfied with the resolution here, and want to view these in full resolution, view them on Flickr here

Firefox Sync

Firefox Sync. formally weave. I always wanted that I can continue my Firefox session from one place to anther. You don’t need to save password, you don’t have to save you history through Google Toolbar. You wont need bookmark addons. This is simply great. How many times did you left your computer at work on/hibernated because you thought you will loose your tabs(currently open sites). Sync currently supports continuous synchronization of your bookmarks, browsing history, saved passwords and tabs. Continue reading “Firefox Sync”