Skip to content

Instantly share code, notes, and snippets.

Avatar

Matthew Draper matthewd

View GitHub Profile
View musical_era.rb
class Range
def overlap(other)
[self.begin, other.begin].max .. [self.end, other.end].min
end
end
def musical_era_alive_in(start_life, end_life)
[
['Medieval', 476..1400],
['Renaissance', 1400..1600],
@matthewd
matthewd / fallout.rb
Last active Apr 4, 2019 — forked from tenderlove/fallout.rb
hack fallout terminals
View fallout.rb
##
# Program to help you hack terminals in Fallout
#
# Usage:
#
# Run this program with a '/' separated list of possible words, and
# (once you've made a guess) another '/' separated list of words and
# scores where the word and score are separated by a ':'
#
# In this example, the words shown in my terminal were: