Dart Score Keeper

January 12, 2014
In game shot showing clickable dart board and score table.
End of game shot showing heat map of winning user's throws.

Access the Dart Score Keeper App!

 

For Christmas I received a dart board.  Excited to get back into darts I dug up my old Java Dart Score Keeper, but unfortunately it isn't working with my version of Java.  Rather than patching it, I set out to create a new scoring app using the SVG jQuery darts board interface from David Williams.  

 

Features:

  • Unlimited Players
  • Desktop and tablet support
  • Click directly on the board to add your points
  • Point history with round subtotals
  • Throws are plotted as a heat map on the board at the end, showing which sections were hit the most for each player.
  • Unlimited Undo

 

The app isn't as polished as I might like, but it certainly works.  If you have a suggestion for an improvement please leave a comment below.

 

Tags: 

PDF Calendar Generator

January 21, 2012

In October 2006 I wrote this script which generates a calendar for you as a PDF.  You can set any paper size, margins, and date range.  I like to keep two calendars at my desk, one with your standard one month per page, and another printed with 12 pages to a sheet (page setup when printing) so I can see the entire year at once, with each quarter on its own row.

PDF Calendar Generator

Blowfish encryption with Base64 encoding

January 21, 2012

Blowfish is an encryption method that uses a simple pass-phrase to encrypt and decrypt the message.  The output from Blowfish contains characters that are not web-safe, so it is necessary to further encode it as Base64 (or something similar) if the encrypted message is meant to be shared via e-mail / IM / etc.  This tool allows you to encrypt and decrypt messages with Blowfish, the encrypted output will be provided as Base64 encoded text.  While this may be used to send secure messages, please be aware that this site is not encrypted (no SSL), so communications between your browser and this server are in plain-text.  This tool was written in August, 2006.

 

Blowfish Encryption Tool

iCalendar Subscribe

December 30, 2011

In 2007 I sought to find a dashboard widget that could handle an iCalendar subscription. The closest thing I found was iCal Events, but using that I had to subscribe to my calendars from Apple's iCal, and then launch iCal once a day so this widget could update. Since I could not find anyone else who has done this, I set off to create my own Dashboard widget.

This is the first widget I have ever created, so it was a nice learning experience. The widget works by making a call to a ruby script that retrieves the iCalendar, parses it, and returns the output as html. Rather than writing my own iCalendar parser, I made use of the Ruby Gem iCalendar. Right now it only shows non-recurring VEVENTS, but I might add more functionality to it later (ie: VTODO)

    • iCalendar URL
        The URL of the iCalendar file that you want to display
    • Days to show
        Show events up to this many days out from today
    • Display Name
        Simply the text that shows at the top of the widget. It is useful to give each calendar a unique display name when you have multiple instances of the widget running
    • Update Interval
        Automatically retrieve an updated calendar this often
    • Font
        The font that will be used to display the events
    • Color
        The color scheme that the widget will use (see below)
    • Show end time / duration
        If this is checked, the end time or the duration of the event will be displayed in italics underneath. According to the icalendar standard events can either have an end-time, a duration, or neither. I haven't seen too many calendars that are making use of duration, but the option is there should you want it.

Download from Apple

Download from thom-patterson.com

Tags: 

Gradient Generators

December 30, 2011 (last modified: January 13, 2012)

The scripts below generate a gradient or pattern on the fly based on parameters specified in the query string. These are very useful when working on a project that requires one of these simple patterns, but you are unsure of the exact colors or dimensions. Rather than fooling around with an image editor, just link to one of the scripts below and change the parameters as you see fit. These scripts run very quickly, and generate PNGs with a very low filesize.

 


Horizontal Gradient

 

Vertical Gradient

 

Transitional Gradient

Written originally to smoothly blend a vertical gradient into a horizontal gradient. It works fine in that context, but it also looks cool on its own.

 
 

Vertical Gradient w/ stripe

I've seen this gradient pattern used on many sites recently. I decided to automate it. Specify gradient colors, stripe color, widths, etc.

 
 
 

Vertical Gradient w/ checker

Vertical gradient with checkered overlay. Specify gradient colors, checker color, and checker size.

 
 

Vertical Gradient w/ pattern

Vertical gradient with custom pattern. Specify gradient colors, pattern color, pattern dimensions, and pattern. Any background based on a vertical gradient can be generated on the fly.

 
 
 
 
 
 
 

Horizontal Gradient w/ pattern

Horizontal gradient with custom pattern. Specify gradient colors, pattern color, pattern dimensions, and pattern. Any background based on a horizontal gradient can be generated on the fly.

 
 
 
 
 
 
 

TP_DropDownMenu

December 30, 2011

This is a flexible and highly re-usable JavaScript drop-down menu that I wrote while learning jQuery in 2009. It supports many animations, easing functions, and other developer-specified settings. Examples provided within.

TP_DropDownMenu

Tags: 

PHP Color Picker

December 30, 2011

Pick a shade of red, green, or blue and you will see what the entire spectrum looks like against that color.  Hover your mouse over the resulting gradiant to see the hex value of the color directly under your cursor.  Results can be bookmarked.  This was written in August, 2005.

PHP Color Picker

 

Java Color Picker

December 30, 2011

There are 3 dimensions to the full color spectrum: red, green, blue. The most accurate way to portray this spectrum is a 3D cube. This page is 2D, and as such only 2 of the colors may be fully examined at a time, think of it as a cross-section of the cube. Each primary color has 256 possible values (0-255), and with three colors that gives a possibility of 16.8 million colors (256^3). When you choose a color above, the 2 colors that you did not pick are placed on the x and y axis. It is easiest to imagine that the slider now becomes the z-axis of the chosen color, use it to determine which cross-section of the 3d color spectrum cube you want to look at.  Click on the color you are interested in and the hex value is displayed.

I was not familiar with PhotoShop at the time I wrote this (January, 2006), however, it works exactly like their RGB color.

Java Color Picker

Pages

Subscribe to Code Article List