Skip to content

Instantly share code, notes, and snippets.

@jeffgeiger
Created February 12, 2016 19:29
Show Gist options
  • Save jeffgeiger/2d4f217246fbe7eb0b22 to your computer and use it in GitHub Desktop.
Save jeffgeiger/2d4f217246fbe7eb0b22 to your computer and use it in GitHub Desktop.
Useless Yet Fun Shell Functions
#Silliness abounds
nocolor() { echo -en "\033[0;39m"; }
dots() { clear; while :; do let "first = $RANDOM % 2"; let "second = $RANDOM % 6 +1"; let "PAUSE = $RANDOM % 9 +1"; echo -en "\033[${first};3${second}m⬤ "; sleep .${second}; if [[ $RANDOM -gt 22000 ]]; then echo -en "\b\b\b\b \b\b\b\b"; fi; done; }
arrows() { clear; ARROWS=(⬅ ⬆ ⬇); while :; do let "arrval = $RANDOM % 3"; let "first = $RANDOM % 2"; let "second = $RANDOM % 6 +1"; let "PAUSE = $RANDOM % 9 +1"; echo -en "\033[${first};3${second}m${ARROWS[$arrval]} "; sleep .${second}; if [[ $RANDOM -gt 22000 ]]; then echo -en "\b\b\b\b \b\b\b\b"; fi; done; }
@kevinkeeneyjr
Copy link

It's going to be a gushing review I'm afraid!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment