Recursive PHP File Syntax Check
If you want to quickly check your PHP code tree for Syntax Errors (using bash), you can run the following command(s): cd ~/workspace/myproject; for i in `find ./ -iname “*.php”`; do php -l $i | grep -i “Errors.parsing”; done The command(s) above will perform a syntax check on all .php files (recursively) within the ‘~/workspace/myproject’ [...]
Sean’s Harbanero Cajun Black Bean Ghost Pepper Bacon Chilli
I’ve been trying to perfect this recipe now for a few weeks. Recently, I picked-up some Cajun Seasoning and Ghost Peppers from Nicole’s Gourmet Foods, here in South Pasadena, CA. These (2) items were just what was lacking from my previous attempts to signify my recipe. Since it is “Super Bowl Sunday” tomorrow, and I [...]
Using clusterssh (cssh) with aterm (instead of xterm) on Fedora Linux
I’m not sure about debian-based distros, but on Fedora, the default cssh configuration file (~/.csshrc) is configured to use xterm. Personally, I prefer aterm, but simply replacing the ‘terminal’ value (alone) generates an error. You’ve also got to remove the preset ‘terminal_allow_send_events’ values as well, as the preset flags only apply to xterm. # line(s) [...]
WPA2 Wireless Encryption, WindowMaker, and Fedora 14…
I recently switched-back to using the WindowMaker Desktop Environment on my Fedora Linux Netbook. It’s currently running on the latest version of Fedora (14), and I’m using a Linksys/Cisco E3000 Wireless-N Router with WPA2 Encryption. Initially, before switching-back to WindowMaker, I was running the XFCE Desktop Environment, which provides a ‘panel’, normal ‘taskbars’ and tools [...]
bitly.pl – A simple Perl API Client to the bit.ly URL-shortening Web Service
This simple Perl script is a command-line interface to the bit.ly URL-shortening Web Service. Download/Install To use the bitly.pl script, do the following: wget http://www.seanodonnell.com/cvs.py/cvs/scripts/perl/bitly.pl chmod +x bitly.pl Edit the Configuration vim bitly.pl You’ll need to modify the $api_login and $api_key values, according to your account on bit.ly. Once you’ve configured the $api_login and $api_key [...]
Irssi, MySQL, and Perl – IRC Channel Logging (irssi_logs.pl)
In my effort to move my code snippets to a public CVS repository, I’ve finally gotten a chance to move all my Perl/Irssi scripts. One script that I developed and use quite often, is the irssi_logs.pl script. Someone else wrote a similar, and probably more thourough implementation of such a script, but I was bored [...]
Importing Data into MySQL using a Comma Separated File (.CSV)
One of the easier ways of importing bulk amounts of data into a MySQL Database table, instead of using INSERT queries, is to simply create a (.csv) Comma Separated File and running the LOAD DATA query in mysql. ~/myproject/users.csv The example file (users.csv) contains 3 rows and 3 columns worth of data which will be [...]
Using ‘ifconfig’ to configure multiple IP Addresses on a single NIC
This simple example will demonstrate how to add multiple IP Addresses to one single ethernet Network Interface Card (NIC), on a computer running a Linux-based Operating System. Note: This is an updated revision of my old code snippets page, which will probably be replaced by this article. For example, let’s say I’m using 2 NICs [...]
ssh-keygen.sh – Generate and Transfer your SSH Keys to Remote SSH Servers
I’ve created the ssh-keygen.sh script in order to generate (-g) and/or transfer (-t) SSH keys to a remote system, from a single command. ./ssh-keygen.sh – An SSH Key Generator and Distribution Script Usage: ./ssh-keygen.sh [options] command Options: -l [login] ssh server login (default: nobody@localhost) -p [port] ssh port (default: 22) -d [dir] remote .ssh directory [...]
Resizing Images using Object Oriented PHP and ImageMagick
I’ve recently dusted-off some old code libraries from my ancient (remote) back-up archives, most of which, unfortunately, doesn’t include the last 5 years of work before my Apartment Fire, but does still have some pretty useful code. One of the objects that I found, was an old ImageMagick object that I developed as part of [...]