Monthly Archives: April 2009

Easily sum matching file line counts

This command will return the number of total lines contained in files ending in .py in the directory it is run in, as well as subdirectories: 12find . -type f -iname *py | xargs -I str wc -l str | … Continue reading

Posted in CLI | Tagged , | Leave a comment

Printing tabular data attractively in Python

Have you ever looked for a tool several times, not found what you wanted, then one fine day discover exactly what you were looking for by accident? I had just such an experience… Not too infrequently in command line Python … Continue reading

Posted in Programming | Tagged , , | 4 Comments

mysql_secure_installation: A useful first step in securing a MySQL server

This won’t be an exhaustive post on how to secure a MySQL server. I just want to mention a useful utility packaged with MySQL server: mysql_secure_installation. Simply run it from the command line once MySQL server is installed and running. … Continue reading

Posted in MySQL | Tagged , , | Leave a comment

Script to find longest running events in log files

While I have found the logging format described in this post to be useful in my scripts, once you get past a few lines, it gets hard to track what took the longest. I wanted to be able to see … Continue reading

Posted in Programming | Tagged , , | Leave a comment

PyCon 2009: Thoughts and observations

I had hoped to post entries each day at PyCon 2009, but since the exquisite Hyatt Regency O’Hare lacked the basic human right of free WiFi, and since I didn’t feel like filling T-Mobile’s coffers for access, my connectivity to … Continue reading

Posted in Programming | Tagged , , | Leave a comment