These scripts are offered free for download, and are released to the public domain unless otherwise noted.

  • Telnet Chatroom (Java)

    This application is an example of a telnet chatroom. It is for demonstration and learning purposes only. The application is broken up into two classes: The server class, which handles all server responsibility, and the Descriptor class, which handles the I|O and data storage for a user. The package is a zip.

  • SoftHashMap (Java)

    This is a SoftHashMap implementation (i.e. a HashMap using Soft references). Elements in the hashmap will be automatically collected by the garbage collector whenever they aren''t being referenced in the application. This implementation was introduced to me by a kind Java "expert" when I was first learning, and since then I have adapted it in various ways to suit my needs. In return for his kindsness, I''m providing it here for others to make use of. This download is only the .java class.

  • JS Distance Script (Javascript)

    This script determines the distance between two addresses. It was created for a shipping calculator, so the cost of shipment could be determined by the distance to the customer. This script uses route information from google maps, and re turns the distance in the format requested (by default, in meters).

  • check_queue (Python)

    This is a nagios script for checking the state and stability of a server. It takes command-line arguments, with which it connects to a local or remote MySQL database to check the state of a specified table. Currently, a check on the number of rows is performed, but the framework is in place to allow for duplicate entry and invalid data checks as well. Its primary purpose is to ensure that a queue table hasn''t exceeded a given size. This script is written in python, and requires the MySQLdb and optparse libraries.

  • adjust_screen (Javascript)

    When styling content online, there are some abnormal situations where the content of a page is dynamic, but the container for that content doesn''t behave dynamically as it should. This most often occurs when using javascript to change th e contents of the page. This script will adjust the height or width of any element or group of elements to the client''s screen size. Simply place this script on the page, and add the "resizeHeight" or "resizeWidth" class to the elements you wish to change. This download is a single javascript file.

  • Send SMS Via PHP (PHP)

    This script can send sms alerts to any cell phone (regardless of carrier), using as an SMS gateway. The script draws on their implementation suggestions, but also combines a number of methods, allowing the functionality to be used regardless of what php extensions are loaded. It is able to use curl, sockets or a plain http request. If an error occurs, it sends an email to a specified email address. This download is the php file only.

  • Address, Phone and Email Regex (PHP)

    This download contains three regular expressions which match against a US mailing address, phone number, or email address. These regexes are packed as php functions, and are useful for form validation.

  • Change Every User's Password (Bash)

    This is a short shell script which changes every users'' password via the ''mkpasswd'' *nix command. It retrieves the user list from system users in the /etc/passwd file, excluding root and users who can''t login. After changing each password, they are stored in a passwords.txt file. For security purposes, remember to delete the file and script after use, or chmod both to 700 with user/group of root.

  • Server Stats (Python)

    This is a raw python script intended to work with a load balancer. It is hard around the edges, and should only be considered pseudo-code. This application is intended to act as a server, and return the business of a host when queried. To do this, it uses apache''s "server-statistics" page as well as other data, and weighs them with configurable functions. To use this software, you must change the authentication information for the server-statistics page in

  • TinyMCE Leetspeak Plugin (Javascript)

    This plugin adds a button to your tinymce install which will convert any selected text to leetspeak. It can be configured to convert more or less, depending on your interest. This package is a zip file, containing the code and instructions for installation and use.