Skip to content

Instantly share code, notes, and snippets.

View bblack's full-sized avatar

Brian Black bblack

View GitHub Profile
This file has been truncated, but you can view the full file.
@bblack
bblack / states.geojson
Created July 25, 2013 17:19
Geojson for worldwide admin_1 regions
Loading
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 March 9, 2012 19:43
sim kasper's dice problem
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