Wednesday, March 27, 2013

forever doless

Two very useful functions in bash that I use when having to run tests frequently are ‘forever’ and ‘doless’. Forever is just shorthand for an infinite loop
Loading ....
In the forever loop it has the advantage of restarting the command when ‘q’ is pressed which is great for a screen terminal dedicated to test runs. Compared to screen itself, it can be scrolled without needing to enter copy mode.

Doless pipes the output of a command to less while still showing the output as it is progressing until completion. 

Wednesday, March 13, 2013

Call-home SSH scripts

Found this great blog post for a call-home ssh script. Someone should build this into a .deb package http://txlab.wordpress.com/2012/01/25/call-home-ssh-scripts/

Thursday, March 7, 2013

Taking over the caps lock key real estate

Years ago, I decided that I wanted to remap some keys on my keyboard, specifically because Esc is a common key used in Vim.

Here’s the content of my .Xmodmap file:
Loading ....

Essentially, the Caps Lock key becomes Tab because it has the same reach is Enter, and Tab becomes Esc because it is needed frequenly. The Caps Lock feature which is never used is mapped to the Esc key.