Home Page

Site BEST viewed with:
FireFox & JavaScript
Compatible with: IE6+
Further info here.

Warning: you do not have javascript enabled. This WILL cause layout glitches.

Welcome to my domain. This is an open space where I, Jeffrey Riaboy, am keeping a compendium of my projects, thoughts, news, and miscellaneous ideas. I am a self taught programmer/computer nerd that works in C++ by choice, and too many other languages due to the facts of life. I have been programming virtually my whole life and working with computers since before I can remember. They are my passion, hobby, job, first love, and have served me well, though, been a constant pain in the anatomy. I hope you can find something of interest or use here, as that is the reason I spend my time creating and organizing this content. Enjoy. ^_^
The original (well... last) intro page to my website before this became the home. It is a flash portal to my personal sites of the past.
[1999-2001?] My ancient NES emulator made in Visual Basic (which was made to prove the power and flexibility [not speed] of the language). But alas, one of my friends, David Finch beat me to it by optimizing BasicNes [Don Jarrett].
[2002] A chronicle of my experiences and tinkering from early ’02 to early ’04 on an addictive yet horribly crappy MMORPG. Site also has some nice “hacking”/reverse engineering tutorials.
Ragnarok Hacking
I’ve temporarily set this to link to the Projects section of this website until I’m ready to announce the new website this will link to.
Updates Archive
Section: Website > Projects
  1. Email contact has been removed from the Contact page, in lieu of using the forum. Explanation is on the contact page.
  2. I have removed all the projects from my projects page and site map that I will never finish and aren’t far enough along to be of any use to anyone. Most of these were written before I was 13 (in 1997). I had originally intended this site to be a collection of everything I have ever started and done, but I now see a lot of this as useless fluff. Projects removed are:
    • Personal Libraries: Old C++ libraries that are very outdated
    • Picture Encrypt: This was just an image steganography encrypter using the picture as a one time pad. I made this as a kid before I knew image steganography and one-time-pads were things that were already known.
    • WebRoute: This was a Windows file system driver that allowed grabbing files from different directories in tiers. Its functionality is easily matched with symbolic links and apache redirects.
    • FileSync: A visually interactive rsync type program. Rsync is a better solution anyways, and I’m sure frontends for it are out there.
    • File Functions: Old C++ CLI libraries that are very outdated and all have better alternatives out there
    • Web Rich Text Editor: While I was way ahead of the curve on making this, I never polished and released it. There are so many out there nowadays anyways...
    • Midi: This was the very first “large” project I built as a kid (Probably ~11). Essentially, I wanted to create a competitor to what was then the only solution (I think) for creating midis/sheet-music, Cakewalk Studio.
    • Web List Creator: Old and outdated JS library
    • eBay Content Creation: An old project I never finished, which was used to quickly create eBay pages with widgets and precompiled graphical designs.
    • RubixSolver: A program I never even really started to implement due to technological constraints of the time.
    • Icon Run: A novel gimmick from when I was very young that I never got working very well
    • MP3 Tagger: Pretty useless old program that uses a file format trick I should not have utilized in the first place
    • Logic Puzzles: Silly knock-offs of puzzles from the game Journeyman 2 (you have to be pretty old to remember these)
    • File Sender, QuickChat, Collage Maker: Outdated with much better solutions out there
    • College Crap, QBasic Crap, Highschool C++ Class: Like they say, old useless crap
    • Process Saver, All-In-One Networking Kit: Programs I never even got started
  3. I added MySQL replication ring status reporting script to the Other Web Scripts page
Section: Projects > HackPics

Continuing my attempt to get stuff moved over to GitHub, I just added a GitHub Repo for HackPics.

This is a rather old project that I originally created in late 2004. It had some minor modifications done to it in mid 2008 to help with the code clarity so others could work with it easier. I was requested to add it to GitHub a few weeks back, so here it is. Strangely enough, this has always been one of my most popular Projects. Always seems to happen with video game utilities/projects.

The rather long explanation of the project history and my findings regarding this project can be found in the request thread on my forum.


Just uploaded a new project (that I actually got up on github a bit over a week ago), HTTP-Forwarders v1.0.0. It completely mirrors a website on a different domain by forwarding through a server. It has 2 HTTP forwarder/proxies. One in Go, and the other in PHP. Note: The Go version is much more advanced, reliable, and fast.

Download Content
Post Archive
RSS Feed
Useful Exim Scripts
For fighting spam

In the course of my Linux administrative duties (on a cPanel server), I have created multiple scripts to help us out with Exim, our mail transfer agent. These are mostly used to help us fight spam, and determine who is spamming when it occurs.

This monitors the number of emails in the queue, and sends ours admins an email when a limit (1000) is reached. It would need to be run on a schedule (via cron).
export Num=`/usr/sbin/exim -bpc`
if [ $Num -gt 1000 ]; then
        echo "Too many emails! $Num" | /usr/sbin/sendmail -v "$AdminEmailList"
        #Here might be a good place to delete emails with “undeliverable” strings within them
        #Example (See the 3rd script): exim-delete-messages-with 'A message that you sent could not be delivered'

This deletes any emails in the queue from or to a specified email address (first parameter). If the address is the recipient, the from must be "<>" (root)
exiqgrep -ir $1 -f '<>' | xargs exim -Mrm
exiqgrep -if $1 | xargs exim -Mrm

This deletes any emails in the queue which contain a given string (first parameter)
if [ "$1" == "" ]
  echo 'Cannot delete with empty string'
  grep -lir "$1" /var/spool/exim/input/ | sed -e 's/^.*\/\([a-zA-Z0-9-]*\)-[DH]$/\1/g' | xargs /usr/sbin/exim -Mrm

Get a count of emails in the queue per sender (sender email address is supplied by sender and can be faked)
exim -bp | grep -oP '<.*?>' | sort | uniq -c | sort -n

Get a count of emails in the queue per account (running this script can take a little while)
exim -bp | grep -Po '(?<= )[-\w]+(?= <)' | xargs -n1 exim -Mvh | grep -ioP '(?<=auth_sender ).*$' | sort | uniq -c

Bonus: Force all non-specified accounts on Exim to use a certain IP address for sending. It would need to be run on a schedule (via cron).
export IPAddress="YOUR ADDRESS HERE"
/usr/bin/perl -i -pe 's/\*:.*/*: '$IPAddress'/g' /etc/mailips
Optimization gone bad
Or, the case of the Android app out-of-order calls

On Android, there is a primary thread which runs all UI stuff. If a GUI operation is ran in a different thread, it just won't work, and may throw an error. If you block this thread with too much processing... well... bad things happen. Due to this design, you have to push all UI operations to this main thread using Looper.run().

Runnables pushed to this thread are always ran in FIFO execution order, which is a useful guarantee for programming.

So I decided to get smart and create the following function to add asynchronous calls that needed to be run on the primary thread. It takes a Runnable and either runs it immediately, if already on the Primary thread, or otherwise adds it to the Primary Thread’s queue.

//Run a function on primary thread
public static void RunOnPrimary(Runnable R)
    Looper L=MainActivity.getMainLooper();
    //Start commenting here so that items are always added to the queue, forcing in-order processesing
    //End commenting here
        new Handler(Looper.getMainLooper()).post(R);

I was getting weird behaviors though in a part of the project where some actions pulled in from JavaScript were happening before subsequent actions. After the normal debugging one-by-one steps to figure it out, I realized that MAYBE some of the JavaScript calls were, for some bizarre reason, already running on the primary thread. In this case they would run immediately, before the queued items started coming in. This turned out to be the case, so I ended up having to comment out the first 3 lines after the function’s first comment (if/R.run/else), and it worked great.

I found it kind of irritating that I had to add actions to the queue when it could have been run immediately on the current thread, but oh well, I didn’t really have a choice if I want to make sure everything is always run in order across the system.

Renaming a series for Plex

I was recently trying to upload a TV series into Plex and was having a bit of a problem with the file naming. While I will leave the show nameless, let’s just say it has a magic dog.

Each of the files (generally) contained 2 episodes and were named S##-E##-E## (Season #, First Episode #, Second Episode #). Plex really didn’t like this, as for multi-episode files, it only supports the naming convention of first episode number THROUGH a second episode number. As an example S02-E05-E09 is considered episodes 5 through 9 of season 2. So I wrote a quick script to fix up the names of the files to consider each file only 1 episode (the first one), and then create a second symlinked file, pointing to the first episode, but named for the second episode.

So, for the above example, we would get 2 files with the exact same original filenames, except with the primary file having “S02E05,E09” in place of the episode number information, and the linked file having “S02E09-Link” in its place.

The following is the bash code for renaming/fixing a single episode file. It needs to be saved into a script file. This requires perl for regular expression renaming.

#Get the file path info and updated file name
FilePath=`echo "$1" | perl -pe 's/\/[^\/]*$//g'`
FileName=`echo "$1" | perl -pe 's/^.*\///g'`
UpdatedFileName=`echo "$FileName" | perl -pe 's/\b(S\d\d)-(E\d\d)-(E\d\d)\b/$1$2,$3/g'`

#If the file is not in the proper format, exit prematurely
if [ "$UpdatedFileName" == "$FileName" ]; then
    echo "Proper format not found: $FilePath/$FileName"
    exit 1

#Rename the file
cd "$FilePath"
mv "$FileName" "$UpdatedFileName"

#Create a link to the file with the second episode name
NewLinkName=`echo "$FileName" | perl -pe 's/\b(S\d\d)-(E\d\d)-(E\d\d)\b/$1$3-Link/g'`
ln -s "$UpdatedFileName" "$NewLinkName"

If you save that to a file named “RenameShow.sh”, you would use this like “find /PATH/ -type f -print0 | xargs -0n 1 ./RenameShowl.sh”. For windows, make sure you use windows symlinks with /H (to make them hard file links, as soft/symbolic link files really just don’t work in Windows).