Skip to content

Instantly share code, notes, and snippets.

@tiegz
Created September 15, 2011 22:39
Show Gist options
  • Save tiegz/1220684 to your computer and use it in GitHub Desktop.
Save tiegz/1220684 to your computer and use it in GitHub Desktop.
swimming in bash
module Kernel
@@frame1 = " ======== ᙅ ⎌ ᙂ ========"
@@frame2 = " ======== ᘩ ⎌ ᘵ ========"
@@framepos = 1
def swim
frame = @@framepos == 1 ? @@frame1 : @@frame2
print frame
sleep 0.3
print "\b" * frame.size
STDOUT.flush
@@framepos = @@framepos == 1 ? 2 : 1
swim
end
end
puts
puts " swimming!"
puts
swim
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment