Skip to content

Instantly share code, notes, and snippets.

View benjaminplee's full-sized avatar

Benjamin Lee benjaminplee

  • World Wide Technology
  • St. Louis, MO
View GitHub Profile
require 'edgecase'
# Greed is a dice game where you roll up to five dice to accumulate
# points. The following "score" function will be used calculate the
# score of a single roll of the dice.
#
# A greed roll is scored as follows:
#
# * A set of three ones is 1000 points
@benjaminplee
benjaminplee / .bashrc
Created July 19, 2011 13:53
config files
export CLICOLOR=1
export LSCOLORS=gxBxhxDxfxhxhxhxhxcxcx
alias ll="pwd; ls -lhaG"
alias lll="ll | less"
alias tree="find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'"
alias scmtree="find . -print | grep -v "\.svn" | grep -v "\.git" | sed -e 's;[^/]*/;|____;g;s;____|; |;g'"
alist gitbranchesbydate="for k in `git branch|perl -pe s/^..//`;do echo -e `git show --pretty=format:\"%Cgreen%ci %Cblue%cr%Creset\" $k|head -n 1`\\t$k;done|sort -r"
@benjaminplee
benjaminplee / piet.rb
Created November 20, 2011 19:09
Playing with Ruby for QuickPiet interpreter
#! /usr/bin/env ruby
class Recorder
def push amt
puts "push: #{amt}"
end
def add
puts "add"
end