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].
 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.
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.
Email contact has been removed from the Contact page, in lieu of using the forum. Explanation is on the contact page.
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:
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.
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-Forwardersv1.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.
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).
#!/bin/bashexport AdminEmailList="ADMIN EMAIL LIST SEPARATED BY COMMAS HERE"export Num=`/usr/sbin/exim -bpc`if [ $Num-gt 1000 ];thenecho"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'fi
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)
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 threadpublicstaticvoid RunOnPrimary(RunnableR)
//Start commenting here so that items are always added to the queue, forcing in-order processesingif(Looper.myLooper()==Looper.getMainLooper())
else//End commenting herenewHandler(Looper.getMainLooper()).post(R);
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.
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 prematurelyif [ "$UpdatedFileName"=="$FileName" ];thenecho"Proper format not found: $FilePath/$FileName"exit 1
fi#Rename the filecd"$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).