Scripts

This is a compilation of some scripts, classes, and programs I've written, many of which are free and open source. Feel free to peruse these scripts and use them if you'd like. Please however credit DigitalGemstones.com and let me know you found my work useful, deal?

Java File Manager

I put together this FileManager class during my AP Computer Science class my senior year of high school. It makes reading and writing files almost completely painless - the way it ought to be.

Java Timer

Also built during APCS, this is a self-contained stopwatch class for timing operations in Java. It has all the functionality of a basic stopwatch and works perfectly for comparing speeds.

Simple Login and Authentication Scripts

Login Script

I know, I know, the internet is already overflowing with 'Simple Login Scripts' and the like, but I figure I should get my day in the sun too, and I honestly think you'll like what I've done. I've built now three different login scripts, with varying levels of complexity. Page Locker simply prompts for a password, and once that password has been entered, the page displays as normal for the remainder of the session. Simple User Authentication locks a page prompting for a username and password - ideal for an admin panel that only one user will need access to. The UserManager Class is my favorite, and a fully functional, entirely self contained user management class - include it in your website and you're all set to create and manage a user-based website, with custom user parameters (such as real name and email address) that you can define. Still a few efficiency improvements to be made, but by and large fully functional, and fully scalable.

Secure PHP Image Uploader

I have yet to find a decent, compact, and secure image uploader and resizer for dealing with images uploaded by a user. This class makes processing, securing, resizing, duplicating and saving an image a three or four line process - totally painless.

Colum-focused Tables

My client, Sirious Baseball, recently added some equipment pages, where each item is listed as an image, its name, and its price. These are listed vertically, meaning that in each row of items, I have to insert all the images, then all the names, then all the prices. Obviously, that's not the best way to deal with things, is it? So I put together a script which generates the tables for you. The code is free, and there are some fairly straightforward instructions on adapting the script to suit your needs.

ROT13 in Haskell

I'm taking a Intro to Functional Programming class at the moment, and our last assignment was to build a ROT13 function. After putting together my own, I realized that at least the first few results on google for 'rot13 haskell' were quite poor examples - only working on lowercase letters and breaking anywhere else. Here's my own version, for submission to public critique.

This Day In History

Assassination of President Lincoln - April 14th, 1865

A database of famous events, births, and deaths throughout recorded history. More functionality, including code to put random events on your website, is on its way.

PHP Blackjack

This blackjack game was created using PHP and a small snippet of JavaScript. I know there are several glitches in implementation (not the least of which is you have to click show in order to see why you lost) which I may get around to at some point, but I haven't yet. It was mostly just an experiment in creating a card game in PHP, which was a fun project, but I think I'll leave games to Java from now on.

JavaScript Digital Clock

My first script, a JavaScript function which outputs a digital clock for web pages and updates automatically.