Author Archive
Hacker defense – passive intrusion detection via shell scripting and crontab
by admin on Nov.28, 2011, under Code
This is a quick shell script I threw together after one of my sites got hacked by some blackhat Chinese group. Set this to run every minute in your crontab. You’ll probably have to create the two files (current.txt and archive.txt) and chmod them to be writable before this will work properly. This will notify you as soon as any files are added to your website. (continue reading…)
Custom PHP and MySQL Application Functions
by admin on Sep.12, 2011, under Code
These are some custom PHP/MySQL functions that I use to speed up development as well as make the code more accessible. I find myself doing the same thing over and over and over again, and this relieves a bit of that monotony. Passing a secondary argument of ‘true’ (boolean) will output any errors the function may encounter; otherwise, it will fail silently.
(continue reading…)
List of randomly useful shell and vim commands
by admin on Jul.26, 2011, under Code
I use these random bash and gvim commands quite often when mucking about. Please feel free to include any commands/shortcuts that you use in the comments.
Automated off-site MySQL backups with cron and PHP
by admin on Feb.07, 2010, under Code
I am the technical administrator for a decently sized vBulletin forum that is hosted on a system offering a lot of performance at the cost of some storage space. I also have hosting and a number of domains on a system that offers less performance, but ridiculous amounts of bandwidth and storage. Lastly, I have a strong need for peace of mind, and off-site database backups seem like a nice way of getting a bit of that back. (continue reading…)
Javascript/PHP Linkerizer (link creator)
by admin on May.19, 2009, under Utility
Why would you need a linkerizer? Well, some stuff is hard to directly download. This makes it easy. You can also send requests to this page via either POST or GET. Go ahead and give it a try. (continue reading…)
Automated Email-to-SMS gateway PHP script
by admin on May.07, 2009, under Code
I’ll cut right to the awesome. This script runs every minute, checks an IMAP mailbox (that happens to be my work email), and detects if any new messages have been received. If so, all HTML and special characters are stripped (leaving plain ASCII text) from the message body, and truncated to 150 characters. Next, the script sends me a text message through Verizon’s email gateway “from” the original sender’s email address. (continue reading…)
Aberrant behavior with single-input forms in IE7
by admin on Apr.14, 2009, under Code
These examples show the difference in handling form submissions between Internet Explorer (version 7 tested) and probably any competent browser on the web (read: everything else). Never mind the fact that this sort of browser behavior is contrary to everything you’d expect. Hope this saves someone the three hours it wasted for me. (continue reading…)
Firefox Quick Pack
by admin on Feb.03, 2009, under Utility
First, let me say that Firefox is totally awesome. My favorite part is that it lets you customize it until the cows come home (or you manage to crash your system). I’ve also set up this wonderful bit of software on a number of computers, and usually give it at least a subset of the following options. This list is mostly for me, but hey, why not put it out there? (continue reading…)
Quick administrative access in PHP
by admin on Dec.06, 2008, under Code
I recently got this all polished up, and it’s working so well I decided I had to share. This little gem allows me to completely do away with setting up a dev server to make changes on a live site, as the functionality is basically created on an as-needed basis. It’s easy, but oh so useful. (continue reading…)