Blog

  • Let the mac sleep

    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


    Originally published: 2011-08-31 Last modified: 2015-01-15 WordPress ID: 1034

  • Power Programming with Tags

    Power Programming with Tags

    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


    Originally published: 2011-08-24 Last modified: 2013-08-18 WordPress ID: 1024

  • Prevent Googlebot following links in Gmail

    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

    sign in

    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.


    Originally published: 2011-08-03 Last modified: 2011-08-03 WordPress ID: 1000

  • Searching in Buffers with Occur Mode – Emacs

    Searching in Buffers with Occur Mode – Emacs

    I mostly work on Terminal or Emacs buffer.  I love emacs. Significant part of my work involves searching for a piece of code. Occur mode is similar to grep-find and find-grep. Just that I only search for the buffers which are open.

    For more info go here:

    Searching in Buffers with Occur Mode | Mastering Emacs


    Originally published: 2011-07-25 Last modified: 2019-06-12 WordPress ID: 987

  • Stop doing!

    Stop doing!

    If you keep on doing what you’ve always done, you’ll keep on getting what you’ve always got.

    W. L. Bateman


    Originally published: 2011-07-12 Last modified: 2019-09-22 WordPress ID: 911

  • Tmux – Gnu Screen alternative

    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*:smcup@:rmcup@'

    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


    Originally published: 2011-07-12 Last modified: 2019-09-22 WordPress ID: 897

  • Can your editor ?

    Can your editor ?

    Can your RoR editor run a web server inside itself, then capture the errors and hop to the error line in code.

    Well Emacs with Rinari and ruby mode can do magic. You should checkout  Emacs Wiki.


    Originally published: 2010-10-15 Last modified: 2013-08-18 WordPress ID: 824

  • balaclava

    balaclava

    I am dieing for a balaclava. Where can I find it in Pune. Does anybody know any really good biking apparel shop.


    Originally published: 2010-06-28 Last modified: 2010-06-28 WordPress ID: 708

  • Photo shoot

    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.

    Rideshot
    Bajaj Avenger.
    HeadShot
    Sideshot
    Peace

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


    Originally published: 2010-06-28 Last modified: 2010-06-28 WordPress ID: 691

  • Firefox Sync

    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.

    Main Features of Sync are:

    • Get the same results on the Smart Location Bar on each of your Firefox browsers, so you can get to your favorite sites with just a few keystrokes
    • Continue what you were doing: have the ability to open any tab you have open on any of your Firefox browsers
    • Keep the same list of bookmarks on all of your Firefox browsers
    • Easily sign in to all your favorite sites using your saved passwords (this is especially handy on mobile phones, where it’s hard to type in complex passwords)
    • Do it all securely: Weave Sync encrypts user data before uploading it to Mozilla’s servers, so that only you can access your data

    As they say:

    The Weave Sync add-on lets you securely take your Firefox experience with you to all your Firefox browsers. You can now surf the Web on your PC, get up and go, and have everything waiting for you on your phone: your history, open tabs, bookmarks, the Awesome Bar – just as you had left it.

    Check out yourself from here. Get Sync for you too from here. Manage your account from here.


    Originally published: 2010-06-25 Last modified: 2010-06-25 WordPress ID: 668