Tuesday, July 30, 2013

Forgetting  Sara Mouse ( pun intended)

There is a utility out there called as QuickTile which basically help you define key mapping for managing your windows with ease. You need to have python installed to get this thing working on you system , which you will find to be similar to Compiz Gird and Unity's window placement with super and arrow keys but QuickTile is more simpler and customizable.

You can customize the config file ~/.config/quicktile.cfg to your needs. I have chosen ALT to be the action key along with vim like key binding for window movement. If your interested you can clone the quicktile.cfg file from my repo present at https://github.com/VihaanVerma89/configFiles
Shutdown / suspend /hibernate your Linux machine with commands

If you are a fast typist you and a terminal addict you might want to shutdown/hibernate/reboot your machine the CLI way. Here are some of the commands that will help you do the same

Shutdown
> sudo poweroff

Hibernate
> sudo pm-hibernate

Suspend
> sudo pm-suspend


World Domination using terminal effectively
Are you a developer running many terminals simultaneously and having a tough time managing em ?

Back at my work I was facing this problem of having to ALT + TAB multiple instances  of many terminals , I gave Screens a try but the keyboard mapping is very hard to get adjusted to . Recently I have come across the Terminator , its pretty handy as its keyboard mapping are very intuitive and easy to grasp. Check out the snap and learn the mapping using man terminator.


Monday, July 29, 2013

Sed file manipulation
Consider you need to replace an occurrence of a word across multiple files , what do you do ?
Now you can open up each file in vim and do a search and replace in each file but that's an inefficient way of doing it.

Sed to the rescue
Sed is a file manipulation tools that can help in such situations. With just one command you will be able to replace all words across multiple files.

here is how you replace "word1" with "word2" in current directory

sed -i "s/word1/word2/g *
Test