Skip to content

Instantly share code, notes, and snippets.

@pyrsmk
Created July 2, 2020 08:12
Show Gist options
  • Save pyrsmk/d2839d3f2c193d35d7456f72c07c0bbf to your computer and use it in GitHub Desktop.
Save pyrsmk/d2839d3f2c193d35d7456f72c07c0bbf to your computer and use it in GitHub Desktop.
LIST = "⠹⠼⠶⠧⠏⠛"
LIGHT = "⢕⡪"
SPEED = 1
trap "SIGINT" do
exit!
end
def loader(speed=SPEED, list=LIST)
list[(Time.now.to_f * 10 ** speed).to_i % list.length]
end
loop do
print "Loading... #{ loader(1, LIST) }\r"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment