Skip to content

Instantly share code, notes, and snippets.

@michaeldv
Forked from jugyo/kurukuru.rb
Created May 14, 2010 02:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save michaeldv/400725 to your computer and use it in GitHub Desktop.
Save michaeldv/400725 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