Skip to content

Instantly share code, notes, and snippets.

Avatar

Brian Black bblack

View GitHub Profile
View states.js
This file has been truncated, but you can view the full file.
@bblack
bblack / states.geojson
Created Jul 25, 2013
Geojson for worldwide admin_1 regions
View states.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bblack
bblack / dnd.rb
Created Mar 9, 2012
sim kasper's dice problem
View dnd.rb
def get_trial(dice_sides=6, explode_on=6)
total = 0
while true
roll = rand(dice_sides) + 1 # rand(x) is int in 0..(x-1)
total += roll
break if roll < explode_on
end
return total