Movie | Recommended by |
---|---|
Initial D | @dabunter |
Coffee and Cigarettes | @borncamp |
The Garbage Pail Kids Movie | @munchingzombie |
Robo Vampire | @munchingzombie |
Gymkata | @munchingzombie |
Food Fight (?) | @munchingzombie |
What Is It? | @munchingzombie |
Watermelon Man | @fuzzleonard |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CHAR_TO_CELL = { '_' => :unknown, 'x' => :empty, '#' => :full, '?' => :multiple } | |
CELL_TO_CHAR = { empty: 'X', full: '#', multiple: '_', unknown: '_' } | |
def expand_row raw_row | |
split = raw_row.split /([_X#]\d*)/ | |
items = split.reject { |s| s == '' } | |
items.map do |item| | |
item[0] * [1, item[1..-1].to_i].max | |
end.join.split('').map { |c| CHAR_TO_CELL[c] } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"origin": ["Did you know that #fact# #what# because of #reason#? Apparently #cause#."], | |
"fact": [ | |
"the #odd-season# Equinox", | |
"the #even-season# #even-event#", | |
"the #timing# #sun-event#", | |
"Daylight #savings# Time", | |
"Leap #leap#", | |
"Easter", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'fiber' | |
require 'pp' | |
class MyWrapper | |
include Enumerable | |
def initialize | |
@fiber = fiber | |
@results = [] | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby -w | |
def defit | |
def ohai | |
puts "hello from #{self.class.inspect} #{self.inspect}" | |
end | |
puts "called defit in #{self.class.inspect} #{self.inspect}" | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyClass | |
def foo | |
puts "MyClass -> foo" | |
bar | |
end | |
def bar | |
puts "MyClass -> bar" | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cities = ('a'..'p').to_a | |
def generate_lists(cities) | |
pos = cities.combination(3).to_a.shuffle; nil | |
map = {} | |
cities.each do |c| | |
taken = [] | |
while taken.length < 3 | |
c3 = pos.shift | |
if c3.include? c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Marks-MacBook-Pro:code_scraps markjosef$ irb | |
irb(main):001:0> require './private_clobbering' | |
=> true | |
irb(main):002:0> obj = MyClass.new | |
=> #<MyClass:0x007ff8220fc680> | |
irb(main):003:0> obj.public_a | |
Public A | |
Private B | |
=> nil | |
irb(main):004:0> obj.public_b |
This is a pencil-and-paper version of the game soccer. Two players compete to get the ball into the opposing player's goal, scoring a point. Each point is played on a different field, and there are two fields per page.
The first player with 3 points wins the game.
The ball starts at the center of the field (marked by a small circle). For the first point, flip a coin to decide who goes first; for later points, the player who just scored goes second.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'minitest/spec' | |
require 'mocha/setup' | |
require 'minitest/autorun' | |
class MyClass | |
class << self | |
attr_accessor :bar | |
end |
NewerOlder