Skip to content

Instantly share code, notes, and snippets.

@jugyo
Created May 13, 2010 10:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save jugyo/399686 to your computer and use it in GitHub Desktop.
Save jugyo/399686 to your computer and use it in GitHub Desktop.
t = Thread.start do
l = '/ - \ |'.split
print "\e[?25l"
loop do
c = l.shift
print "\r#{c}"
STDOUT.flush
sleep 0.1
l.push c
end
end
begin
t.join
rescue Exception
print "\e[?25h"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment