Skip to content

Instantly share code, notes, and snippets.

def fib_iterative(n)
fib_counts = [0, 1]
(n-1).times do
fib_counts << fib_counts[-1] + fib_counts[-2]
end
return fib_counts.last
end
fib_iterative(5)
@CathyK
CathyK / gist:5002581
Last active December 14, 2015 00:59
Racer
#Racer
#=====
def roll_dice
dice = rand(6) + 1
end
def track
track_a = Array.new(25) { "" }
track_b = Array.new(25) { "" }
CTR B
CTR T to open a new tab in the terminal
CTR A to select all
CTR { or }