An update to my Python file comparison utility, now with bidirectional support. This is an alternative to using diff that provides, in my opinion, cleaner output. Also, unlike diff, because this is written in Python it should be able to run on just about any platform.

This is a quick-and-dirty way to write a simple locked-down web browser perfect for kiosks or other similar scenarios. This code opens a pre-defined URL in full-screen mode and works with Snow Leopard and Lion. Instead of the overhead of a full browser like Firefox, the compiled size of this code is around ~500k and is designed to serve a very simple function.

This template can be used to create a service script for Red Hat Enterprise Linux. It will enable you to use “service myservice start”, “service myservice stop”, or “service myservice status” to control a particular process. It also supports the familiar Red Hat “OK” or “FAILED” green and red status messages. Other options can be easily added by modifying the case statement below. This script also supports chkconfig, so you can set the service to start on boot by issuing the command “chkconfig myservice on”, or remove it from boot start with “chkconfig myservice off.” This script should be placed in /etc/init.d with the proper permissions.

This is a very simple Bash script I wrote to monitor a remote address. The script sends a ping and if the ping returns a non-zero value (in other words, it failed) then an email is sent to a specified address and a flag is set to 1. Another email is sent only when the connection comes back up, at which time the flag is reset to 0.

Add this to crontab:*/1 * * * * /usr/local/bin/checknet.sh > /dev/null
In this example the script runs every minute, and the output is redirected to /dev/null to suppress “Cron Daemon” emails.

Simply change the value of the target and email variables below and you’re ready to go.