Adding Emojis to OSX terminal

If you have to ssh to work and have the local system and get confused every now and then. Then you might add some visual indicators in the bash shell so you can easily spot where you are!

1. Open your .bash_profile and add the following line.

PS1="\h ¬†ūüćÄ ¬†\W "

To Open emoji’s in Mac, you need to go to ‘Edit’ > ‘Emojis & Symbols’ and add your desired emoji. Be it in twitter, notes or anywhere this is the way to do in a Mac.

2. Save the bash_profile file,

3. Reopen terminal and BOOM!

Note: while Adding PS1=” ” remember that you shouldn’t have a space between = and “.

This artical was inspired by one of Ruby programmers having vidcast. And idea is borrowed from

Let me know what other emoji’s you like the most to have them on terminal.


Commandline tricks

Installing ‘ll’ in mac osx:

Sometimes you will notice¬†that the ‘ll’ command is not found in MAC OSX. To enable it do something like this:

alias ll='ls -lG'


Know more about Running Processes and killing them in Unix:

To see all the processes on the system:

ps -af

ps -af | more

You can also search for particular sorts of process using the grep command.¬†grep searches for a given string of characters within a file. If you “pipe” the output from ps into grep it will search for a string and only display those lines on which the string occurs.

ps -af | grep pine

To get a list of the current environment variables and their values


If I know the PID number of a process, how can I get its name?

On all POSIX-compliant systems, and with Linux, you can use ps:

ps -p 1337 -o comm=

Here, the process is selected by its PID with -p. The -o option specifies the output format, comm meaning the command name.

ProTip: Creating a code snippet in Sublime Text 2/3

I wanted to use the code snippets for the erb files and in erb files the most common snippet you would wish for is:



So I wanted to create a snippet that would do it for me and be sure of the ending %> So that I don’t really have to cross check every time I write it.

To create a snippet in Sublime Text

  1. Go to Tools > select ‘New Snippet’
  2. You would have a sample template something like this:
    Hello, ${1:this} is a ${2:snippet}.
    <!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
    <!-- <tabTrigger>hello</tabTrigger> -->
    <!-- Optional: Set a scope to limit where the snippet will trigger -->
    <!-- <scope>source.python</scope> -->
  3. So edit the default template to:
    <%= $0
  4. The content for which you want to template should go in between [[ ]] tags.

    And $0 is the place the cursor will be when this snippet is invoked.

    And to trigger the snippet you need to use <tabTrigger> tag, where you give a name to your snippet.

  5. Save the above created snippet in the Packages/User/ folder with the name <your-snippet-name>.sublime-snippet
  6. Close Sublime and Open it again and try your snippet. Voila!( In ST3 you don’t have to close Sublime, it picks up for you in a new tab.)

Installing TMUX.

This post outlines the way to install tmux in Mac OSX

Disclaimer: At the time of writing this article I have just gone as far as installing tmux and thats it!

    1. If you want to install tmux you can do that by downloading it at this link:
    2. You have to read the README doc which tells how to install it.
      tmux depends on libevent 2.x. Download it from:

      libevent site seemed hard to parse and I couldn’t get a way to install it after downloading the project.

    3. So in order to install libevent:
      1. cd to the libevent project folder
      2. Run ./configure && make
      3. Run sudo make install

    4. Now install tmux as told in README
      $ ./configure && make
      $ sudo make install
    5. …. and may be you are done.

Installing TMUX using homebrew:

I did it this way coz I found brew was more easier to do

      1. $ brew update and $ brew doctor
      2. Install libevent first:
        $ brew install libevent You will be prompted to link libevent after installing, do that if so
      3. Then install tmux:
        $ brew install libevent
      4. If you get the permissions error saying /usr/local is not writable do change the persmissions:
        sudo chmod -R g+w /usr/local
      5. Then install tmux
        $ brew install tmux

To learn about tmux and its shortcuts visit this page:

A tmux Primer