Skip to content

Instantly share code, notes, and snippets.

View kenzie's full-sized avatar

Kenzie Campbell kenzie

View GitHub Profile
@kenzie
kenzie / deploy.rb
Created May 26, 2010 14:52
Basic git deploy script
require 'rubygems'
require 'net/ssh'
# VERSION 0.2
# 0.2 – 2010/05/26 : added cleanup (rm deploy)
# 0.1 – 2010/05/21 : initial setup
HOST = "domain.com"
USER = "username"
PASSWORD = nil
@kenzie
kenzie / quicksilver_score.php
Created April 29, 2010 11:26
Quicksilver string ranking algorithm in PHP
<?
// Quicksilver Score
//
// A port of the Quicksilver string ranking algorithm
// (re-ported from Javascript to PHP by Kenzie Campbell)
// http://route19.com/logbook/view/quicksilver-score-in-php
//
// score("hello world","axl") //=> 0.0
// score("hello world","ow") //=> 0.6
@kenzie
kenzie / Tide.php
Created February 9, 2010 18:15
Tide class fetches, caches and returns tide data from waterlevels.gc.ca
<?
// Tide class fetches, caches and returns tide data from waterlevels.gc.ca
// Kenzie Campbell <[email protected]>
// Feb. 9, 2010
class Tide
{
// instance variables (w/ defaults)