-
-
Save zotherstupidguy/bcad8f7d820735237d41 to your computer and use it in GitHub Desktop.
Print a clockwise-spinning pinwheel on an ANSI-compliant terminal.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
#TODO add some colors to the circle | |
begin | |
loop do | |
%w( ◐ ◓ ◑ ◒ ).each do |pchar| | |
print "\x1b[1G\x1b[0K#{pchar} " | |
sleep 0.1 | |
end | |
end | |
rescue Exception | |
# goodbye | |
print "\x1b[1G" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment