Skip to content

Instantly share code, notes, and snippets.

@saicologic
saicologic / gist:1170287
Created August 25, 2011 09:04 — forked from unakatsuo/gist:1165990
Simple state transition check code.
class StateTrack
def initialize
@state = :initialized
end
# Expected state transition:
# :initialized -> :starting -> :running -> :shuttingdown -> :terminated
def process_event(ev, *args)
case [ev, @state]
when [:on_start, :initialized]
@saicologic
saicologic / platform.sh
Created June 7, 2011 09:42 — forked from unakatsuo/gist:537584
fork of s3-bash
#!/bin/bash
if [ `uname` = "SunOS" ]; then
alias grep='/usr/gnu/bin/grep'
fi