Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/ruby1.9.1 -Kw
# -*- coding: utf-8 -*-
# Dijkstra's single-source shortest path algorithm, from https://gist.github.com/roganartu/9407316#file-dijkstra-rb
class Edge
attr_accessor :src, :dst, :length
def initialize(src, dst, length = 1)
@src = src
@qwzybug
qwzybug / route.md
Created September 24, 2011 18:54
WWDC SF Photo Walk - Sunday June 5th 2011 - 7PM to ?

Possible route:

http://j.mp/iHtolU

SF AppleStore -> Ferry Building (Bay Bridge) -> Fog City Diner -> Coit Tower -> Pier 45.

Goal is to get to Coit Tower at around 8PM for sunset at ~8:15PM - there are some nice views of bay bridge and city on the way up.

Total distance is about 3 miles but walk up Coit Tower is a bit "invigorating". Am open to other plans - if we decide to be wimps - just a walk to the Bay Bridge is decent.

@qwzybug
qwzybug / redis-server-for-init.d-startup
Created September 22, 2011 15:31 — forked from lsbardel/redis-server-for-init.d-startup
Init.d Redis script for Ubuntu
#! /bin/sh
### BEGIN INIT INFO
# Provides: redis-server
# Required-Start: $syslog
# Required-Stop: $syslog
# Should-Start: $local_fs
# Should-Stop: $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: redis-server - Persistent key-value db
@qwzybug
qwzybug / Textmate bundles
Created July 27, 2011 20:58
My TextMate Bundles!
# Textmate essential bundles
mkdir -p ~/Library/Application\ Support/TextMate/Bundles
cd ~/Library/Application\ Support/TextMate/Bundles
git clone git://github.com/protocool/ack-tmbundle.git Ack.tmbundle
git clone git://github.com/fgnass/jshint.tmbundle.git
git clone git://github.com/textmate/json.tmbundle.git "JSON.tmbundle"
git clone git://github.com/jcf/git-tmbundle.git git.tmbundle
@qwzybug
qwzybug / gist:1031861
Created June 17, 2011 17:32 — forked from atduskgreg/gist:1030264
kinect_beard_emacs.pde
/*
NOTE:
place devin.skel in data/ folder for this sketch
http://doormouse.org/misc/devin.skel
Types from a file called typeyTypet.txt in data/.
TODO:
- typeyTypey doesn't work well with non-alpha characters: braces, asterixes, etc.
@qwzybug
qwzybug / drift_copy.txt
Created May 29, 2011 16:05 — forked from atduskgreg/drift_copy.txt
Drift copy
Splash page:
Drift
Easily shared, always backed-up.
Write simple notes.
Easily share them online.
Never lose your history.
Button: Start using Drift
@qwzybug
qwzybug / drift_copy.txt
Created May 24, 2011 19:24 — forked from atduskgreg/drift_copy.txt
Drift copy
Splash page:
Drift
Easily shared, always backed-up.
Write simple notes.
Easily share them online.
Never lose your history.
Button: Start using Drift