Category Archives: Code Samples

All Code Samples go here.

How to Install SNMP on Tomato Router Firmware and Graph Traffic with Cacti 7

You’ve flashed your old WRT54G or other vanilla router with the Tomato firmware. This itself turns your router into a lean, mean routing machine with QOS, SSH and more, but let’s say we want to take it a bit further. What it we want to get some more stats out of it? In order to [...]

Command Line Packet Sniff Existing Running Process in Linux 0

Have you ever come across a server that is doing a lot of traffic? Maybe you have logged in to see a process running at 100% CPU, so you know the culprit, but instead of kill -9ing it, wouldn’t it be great to see what exactly it is up to? Or even if you see [...]

Error While Mounting an ISO Image in Linux: ioctl: LOOP_SET_FD: Invalid argument 2

I recently received this error while mounting an iso image in a CentOS 5.3 install: [root@host ~]# mount -t iso9660 -o loop /mnt/glusterfs/ecp-spe-4867.iso /mnt/iso/ ioctl: LOOP_SET_FD: Invalid argument For more detail: [root@host ~]# mount -v -t iso9660 -o loop /mnt/glusterfs/ecp-spe-4867.iso /mnt/iso/ mount: going to use the loop device /dev/loop0 ioctl: LOOP_SET_FD: Invalid argument mount: failed [...]

A Twitter Search WordPress Plugin 7

Ok, this is not really a plugin per se, but WordPress already has the capability of displaying a Twitter search stream via it’s RSS feed widget. It is dirt simple to set up. Go into Appearance -> Widgets and select the widget area you wish to add the twitter search stream to; Add “RSS” and [...]

Ubuntu Server in Place Network Upgrade From 8.10 to 9.04 1

It is easy to do an in-place upgrade of Ubuntu Server from 8.10 ‘Intrepid Ibex‘ to 9.04 ‘Jaunty Jackalope‘. You can do this remotely over ssh or whatever you use to control your server. Best practices say to make sure to backup your server before doing the upgrade. I’ve done several servers this way with [...]