Created
February 18, 2014 05:23
-
-
Save havenwood/9065065 to your computer and use it in GitHub Desktop.
curseless <blink> with backspaces
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
def blink string, duration: 4, interval: 0.5 | |
start = Time.now | |
while Time.now < start + duration | |
print string | |
sleep interval | |
[?\r, ?\s, ?\r].each { |char| print char * string.size } | |
sleep interval | |
end | |
end | |
blink '1998' | |
blink 'quick', interval: 0.2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment