Skip to content

Instantly share code, notes, and snippets.

View madebydna's full-sized avatar
🏠
Working from home

Andrea Singh madebydna

🏠
Working from home
  • Ad Hoc, LLC
  • CA
  • 14:20 (UTC -07:00)
View GitHub Profile
@madebydna
madebydna / lyric.rb
Created August 26, 2010 23:12 — forked from ruanwz/lyric.rb
class Song
def initialize
@bottles = 99
end
def sing
@bottles.downto(0) do |bottle|
if bottle > 1
puts "#{bottle} bottles of beer on the wall, #{bottle} bottles of beer."
puts "Take one down and pass it around, #{bottle - 1} bottles of beer on the wall.\n"
@madebydna
madebydna / lyric.rb
Created August 26, 2010 23:12 — forked from ruanwz/lyric.rb
require 'net/http'
class Song
def initialize
end
def sing
end
end
#!/usr/bin/env ruby -wKU
puts `ps -o rss= -p #{$$}`.to_i
current_fib = 1
fib_numbers = []
for i in 1..4000000 do
if i == current_fib * 2
fib_numbers << i