Archive for the 'quick scripts' Category

expand your tabs

Sunday, June 5th, 2005

I’ve been back and forth between tabs and spaces for code indentation in recent years. My exposure to Python lead me down the path of spaces, while in the past I had stuck to tabs in my PHP, Perl & Java. When its my own code it’s fine to use whichever I feel is […]

Conntrack Viewer

Wednesday, August 18th, 2004

Patrick Lagacé’s Conntrack Viewer is a really handy little Perl script that formats the contents of /proc/net/ip_conntrack. It came in handy today trying to figure out what our firewall was up to. It’s definitely going into my permanent toolkit. I surprised I hadn’t found it sooner.

Testing environments

Wednesday, July 7th, 2004

One reason why testing environments are important and why programmers shouldn’t be given access to production environments:

“… This is very bad indeed. 2500 linux servers had to be rebooted. I owe a lot of beers.”

(From "Journal of Matts")

Ouch! I think many of us have made similar mistakes… hopefully only once.

Multiple File Search and Replace

Tuesday, November 11th, 2003

Since I started using a CLI on a regular basis 7 years ago I’ve used a Perl script that looped over a list of files and executed a regular expression replace on each line of the input files for search and replace. I recently found out that Perl has command line options to make […]