Make your terminal cool

Screen Shot 2014-07-03 at 4.01.45 PM


You can achieve this terminal look easily with few quick steps. In my case, I am using iterm2 in osx mavericks along with zsh powered by oh-my-zsh. I do know that its possible in bash too. My recipe does works in Mint, Ubutu too. Not sure of Fedora 😦 .. So lets begin.

Installing zsh and make it default shell

Install zsh using yum, brew or apt-get. In case of ubuntu run :    $sudo apt-get install zsh   . It will  ask for your password and finally it should complete its setup. Then we set zsh as default shell by running : $chsh -s /bin/zsh . To see the effect you have to logout then login. But dont logout now. As running zsh first time ; it asks to setup zshrc file for you. We want to logout after configuring our zshrc first.

Configuring oh-my-zsh

Lets quickly run few more commands. Dont blindly run commands try to understand each command .

$git clone ~/.oh-my-zsh
$mkdir -p ~/.bin/dotfiles/zsh/
$cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.bin/dotfiles/zsh/zshrc
$ln -s ~/.bin/dotfiles/zsh/zshrc  ~/.zshrc

By running all this we are setting our default zshrc file. Now you can logout and login again to find zsh as your default shell.

Installing ducknorris theme and Powerline fonts

You are so close. We have to configure ducknorris theme and powerline fonts. Download powerline fonts from here and configure one of the fonts in your terminal profile preference. Then create ducknorris.zsh-theme file inside ~/.bin/dotfiles/zsh/ducknorris.zsh-theme  .  Copy the theme content from that website and paste it into the file. Now run following command :

$ln -s ~/.bin/dotfiles/zsh/ducknorris.zsh-theme ~/.oh-my-zsh/themes/

Edit ~/.bin/dotfiles/zsh/zshrc file and change replace ZSH_THEME setting to following :




Reopen terminal to see your cool new terminal look. I usually keep all my dotfiles inside ~/.bin/dotfiles and sync them to a private repository in bitbucket. You can do that too. Have Fun !!

Traffic Shaping using TC

A year ago I configured a local ISP server for my friend. Later I created a PERL script to generate tc commands for Traffic shaping. I wanted to share a step by step guide on how to do that. As usual that didn’t saw the daylight. Today I saw a nice post on tc in here. At last I decided to publish my PERL script. You can get the Script in here : . The script does some very basic things:

  1. add/edit cilent
  2. Remove client
  3. Set bw limit to client
  4. Generate the script file to be run in startup.

This was my first PERL script so if you are a perl guru please share your thoughts.

Log – 1: Network Server and B/W Re-seller

Some Background Talk:

It was way back when I first got my hand on linux in 2002. It was a Red-hat. My neighbour Zakir Uncle introduced it to me. He told me at that time, linux holds gr8 features and u can do so many things with it. But all I did was ( cd .. / cd. / mkdir / touch / ).  I removed linux after 1month cause it was boring( what do u expect from a 3month old experienced computer user? ). Later, I experiment with different linux versions ( fedora, mandrake); and did able to make it popular enough that my late cousin (she died in 2008), my little sister and even my aunt used linux. Just to play Shishanshu and Mahjong.

In February, 2009 jhoroTEK configured the network server at Skyinnova (experimental work), where we configured a central server with Fedora Core 10 and squid. Adnan made it a success. [ He was suppose to write an article on it. Hopefully he will put it sooner.] My  friend Harun-ur Rashid who is a B/W  re-seller in our area was using squid as a proxy server and tc for traffic shaping.  No visual admin section and no DHCP.  So I got the perfect opportunity to experiment at his place.

For the Reader:

It’s not a complete tutorial on Configuring a network Server using CENT OS rather an experience sharing.  If you can take the clues and see the rose line u will find the destiny 😉 .  My task is still on-going;  if you have better suggestion then drop a comment.

If you want more details or consultancy then contact me.

Follow me on twitter  @neotohin  to see which step i am right now and some tips 🙂 .

Things in my hand:

  1. An 1 mbps B/W from ISP provider
  2. A Core-2-duo Machine ( server ), A Pentium 4 client Machine)
  3. 1 switch,  1 hub
  4. CentOS 5.2

Task :

  1. Share the B/W with clients in sub-network
  2. Traffic Shaping Each client will have different kind of B/W plan like  16KB to 64KB shared.
  3. DHCP Server + MAC binding [ future PPP ]
  4. Proxy Server
  5. FTP, WEB server ( Simple extensions )
  6. More interesting things to come 😉

Let the Journey Begin ====================================