My URL Shortener

One of the projects that I've been working on recently involved coming up with a multi-purpose URL shortener, like's or tinyurl's. I had put a good bit of thought into it but I haven't gotten around to actually implementing it for the project yet. I know the concept is sound and lots of other people use it, so it ultimately comes down to how short and is it long enough to cover (and some) what you plan on using it for.

So I get kind of bored and decided I'll implement a command-line url shortener that ties into my website ( and give it a whirl. I opted to be ghetto-extreme and use, not 3, but only 2 characters in my shortened URL. I can shorten anything that I want, like or I'm using the unreserved and sub-delimiter characters from RFC-3986 (well, most of them) since in a shortener context, at least in mine, most of those sub-delimiters are useless. So I've gone ahead and made shortened URLs for all of my archived news posts: => => => => => => => => => => => => => => => => => =>, => =>;9 =>*! => => => => => => => => => => => => => => => => => => => => => =>; => => => =>$Q =>*X =>

The whole thing is really ghetto. It's just a bash script that I run on the command-line that calls a small java program that does some simple math and base conversion, then tickles a few files on the file system. The script will even return an old shortened URL if I ask for the same URL to be shortened again; so asking for to be shortened a second time will still result in the same I guess that's not bad for 20 minutes of work.

Unfortunately, since this URL shortening solution is customized for me only, it's pretty much 99.9% useless to everyone else who isn't running a custom CMS system (e.g. emacs). If anyone wants to actually see the java code, let me know, it's simple enough that it's not worth porting to a more commonly used content generation language like php; you could just write it from scratch yourself just as easily. The more tedious part is integrating it into a site.

Here's a couple of other shortened pages: => => => => => => => => => =>* => => => => => =>$ => => => =>

Probably the best thing of all, at least for a little while, I can link people shortened URLs and they think, "oh, it's one of Jon's links", they click on it and BLAMO, gay porn.

Filed under: Computers