Skip to content

Instantly share code, notes, and snippets.

@ambirdsall
Last active August 30, 2018 22:48
Show Gist options
  • Save ambirdsall/38b8c35c8e3c03463446be425e658261 to your computer and use it in GitHub Desktop.
Save ambirdsall/38b8c35c8e3c03463446be425e658261 to your computer and use it in GitHub Desktop.
yoooooooo
<<moon | ruby
phases = (0x1F311..0x1F318).to_a.collect{|c| [c].pack('U*')}
clear_line = "\r\e[0K"
500.times do |i|
phase = phases[i % phases.size]
print "#{clear_line} #{phase}\t#{500 - i}"
sleep rand / 10.0
end
moon
#!/usr/bin/env ruby
phases = (0x1F311..0x1F318).to_a.collect{|c| [c].pack('U*')}
clear_line = "\r\e[0K"
500.times do |i|
phase = phases[i % phases.size]
print "#{clear_line} #{phase}\t#{500 - i}"
sleep rand / 10.0
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment