Jeff Roberts
RHCE #804006066322833
Vim-Fu is now iPhone and Android friendly

Check out the Vim-Fu Store!


Removing ^M from a file

To remove the ^M characters at the end of all lines in vi, use:


The ^v is a CONTROL-V character and ^m is a CONTROL-M.

Using csshX in OSX Lion

Opening 10 windows at a time to issue the same command to 10 machines is a valuable time saver, and csshX is a great tool to do just that. I considered it a indespensible tool until I upgraded my machines to Lion. Lion has a feature where it remembers what windows you had open the last time you shut an app down. So, if I open 23 windows and then shut it down, the next time I open it, I get 23 + the number I currently need. The only way around this is to close each window before you close.

I have just found the way to turn this feature off for Terminal:

First: close the Terminal App.

Then, issue this command from the command line:

defaults write NSQuitAlwaysKeepsWindows -bool false

It’s nice that it can be controlled on an app by app basis, but I can’t really think of a place where I’d want it.


I needed to do a conversion of an ssl-cert today and I found a very thorough post all about OpenSSL and all of the really usefult things it can do.  I thought about writing my own post, but why re-invent the wheel.  Mr. Heinlen did an excellent job so I am just providing a link to his post:
inflatable slides

the ball command

Quite often I’ll open up several different file in the vim buffer to be edited.

~$ vim `grep -l v1.2r5 *.pl`

Commands like that can save you a lot of time searching through files looking for a single value or word.inflatable castle

How many files did that load into Vim’s buffer?  Check with:


Let’s say grep found three files […]

Starting Over in VIM using e!

I haven’t posted a trick in a while, so here’s a good one to know.

Ever start working on a file in command mode and then hit the caps key without realizing it.  Wham! All sorts of un-expected things can happen before you know it.  What do you do then? You could use q! to exit […]

MySQL tuning script

This is really useful script called by Matt Montgomery. […]

Using Screen to connect to a serial console

Not much to write about here.  You can use screen as a replacement for minicom. Who knew!?!?!  Screen will never stop amazing me with all the cool stuff that it can do.

screen /dev/ttyUSB0

To set the baud rate to 57,600:

screen /dev/ttyUSB0 57600

To enable CTS/RTS handshake:

screen /dev/ttyUSB0 57600,ctsrts

^a,k to end the session.
^a,i to check the status of […]

Blacklisted Email in Amazon's EC2 Cloud

One of the major problems in having your systems in Amazon’s EC2 cloud is that the ip you get assigned is almost surely blacklisted with every major email blacklist  before you’ve sent a single piece of email (check for this using  I learned this the hard way when I started hearing the our registration and […]

Cisco POE and Polycom phones

They just continuously flapped when ever they were powered by the 3550. Adding this line fixed the issue […]

Cisco's DNS Rewrite - My new best friend

DNS Rewriting is a simple and elegant solution that can save you time and […]