Skip to content

Instantly share code, notes, and snippets.

View ddd1600's full-sized avatar

David Douglas ddd1600

  • Murrells Inlet, SC
View GitHub Profile
@ddd1600
ddd1600 / rps.rb
Created June 7, 2012 01:37
rock paper scissors hw
class RockPaperScissors
HAND = { :rock => 1, :paper => 3, :scissors => 4 }
def play(param1, param2)
determinant = HAND[param1] + HAND[param2]
if(determinant==2)
puts "tie"
@ddd1600
ddd1600 / fix_homebrew.rb
Created May 5, 2012 08:17 — forked from rpavlik/fix_homebrew.rb
Fix permissions on /usr/local for Homebrew
#!/usr/bin/ruby
#
# This script fixes /usr/local only.
#
# 6th January 2010:
# Modified the script to just fix, rather than install. - rpavlik
#
# 30th March 2010:
# Added a check to make sure user is in the staff group. This was a problem
# for me, and I think it was due to me migrating my account over several