Home
My Resume
Code
Stu's Speedbump .9

Code I've written

Most of these are just me dinking around with date math. I started with C in the 90s, migrated to PERL in the 00s and am gradually switching to Python.

Most don't have comments since I was lazy. :)

CGI

  1. Run the Compound Interest Calculator or Download the code
  2. The ever-present environment checker: here.
  3. Show how many types of days; i.e. Sun, Mon, Tue; are between 2 dates: Number of Types or Download the code. The Calendar javascript came from OpenJS.

Perl

  1. Time Left - display a countdown clock, it requires month, day, hour and minute and takes an optional year
  2. Time Left - display a countdown clock but in a GUI window. Hardcoded time since I was using it to teach myself PERL TK for another project.
  3. XKCD Passwords - Inspired by the Password Strength XKCD comic. It should work on any Unix-like OS that has a dictionary installed.
  4. New Passwords - Generate a password based on a word in the dictionary and then change it to Leet Speak. It should work on any Unix-like OS that has a dictionary installed.

Python

  1. Time Left - display a countdown clock, it requires month, day, hour and minute and takes an optional year
  2. Add Days - Add days to today or another date

C

  1. Between tells you the number of work days, weekend days and total days between 2 dates.
  2. Time Left tells you how much time you have left in your day, it defaults to 4:30 pm since that was my shift at the time.
  3. Work Year tells you how many days of work, i.e. Monday - Friday, in the current year.
  4. Pay Days gives a listing of the pay day dates in a year. I used it to automate updating my calendar.
  5. Remember the rumor that shows up every few years that a month with 5 Fridays, 5 Saturdays and 5 Sundays or 5 Saturdays/Sundays/Mondays only happens every 800+ years? Five_Fss is code that show you months that it happens in the current year or a year that's passed in

Number formatting in the perl code came from the University of Winnipeg's CPAN repository .

The C code was written for GCC on Linux but I've compiled it using compilers on Solaris, AIX and HP-UX as well.

Creative Commons License
Stuart's Code by Stuart Jaskowiak is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.



This page has been accessed 1741 times.