Skip to content

Instantly share code, notes, and snippets.

View GeoffCrittenden's full-sized avatar

Geoff Crittenden GeoffCrittenden

View GitHub Profile
# inspired by Matt Parker's Frog Problem video
# https://www.youtube.com/watch?v=ZLTyX4zL2Fc
module Froggie
class << self
def calculate_average_jumps(n_frogs = 10_000, n_spots = 10)
total_jumps = 0.0
n_frogs.times { total_jumps += Frog.new(n_spots).jump! }
total_jumps / n_frogs
end
@dhh
dhh / Gemfile
Created June 24, 2020 22:23
HEY's Gemfile
ruby '2.7.1'
gem 'rails', github: 'rails/rails'
gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data
# Action Text
gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra'
gem 'okra', github: 'basecamp/okra'
# Drivers