Entries Tagged as 'Programming'

Logging Active Record Queries to a File

I was recently helping a developer with some SQL optimizations in Ruby. The developer was using Active Record, and (until now) my Active Record experience has been pretty minimal.
One thing that was really driving me bonkers was how to get Active Record to print out the queries it was building. I was certain [...]

Categories: Programming

Perl, ntop and Odd Hash Assignments

This is a silly mistake that can be easily avoided.
I was working on a Perl script that grabbed network traffic information from my ntop server and reported on it. ntop provides an API that specifically supports Perl. Although I was seeing the data coming from ntop, I wasn’t able to work with it [...]

Categories: Programming

Interesting OIDs for Cisco NBAR

I recently wrote a Perl script for MRTG that collects the bytes that Cisco NBAR Protocol Discovery has counted and graphs them against the total traffic seen by the interface. (Note: Leave a comment if you want me to publish the script on this site.)
I thought I’d go ahead and point out the OIDs [...]

Categories: Programming

Redirecting With .htaccess

I use the Postalicious Wordpress plugin to automatically generate my Tech Messages posts. For some reason, the plugin went wonky last night and posted twice!
I don’t really want two posts with the exact same content, so the second post had to go. Since the post had been live for 12 hours or so, [...]

Categories: Programming

Get Subversion Updates via Email

Sometimes it seems like a great idea to receive updates whenever someone commits something to your Subversion repository, right? This has definitely seemed like a good idea to me, but it’s only nice if you work in a small shop with only a few developers. Too many developers make this solution more of [...]

Categories: Programming