-
-
Save serverwentdown/23a1a5dd5e9a66a2d12c to your computer and use it in GitHub Desktop.
nyantutorial
This file contains hidden or 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
#!/bin/zsh | |
control_c() { | |
echo "Yes! You did it! "; | |
echo -n "Want more nyan? (y/n) " | |
read input | |
if [[ $input == "y" ]]; then | |
nc -v nyancat.dakko.us 23 | |
else | |
echo "Aww, bye! " | |
fi | |
exit $? | |
} | |
trap control_c SIGINT | |
# THAT ASCII THO | |
echo " | |
+ o + o | |
+ o + + | |
o + | |
o + + + | |
+ o o + o | |
-_-_-_-_-_-_-_,------, o | |
_-_-_-_-_-_-_-| /\_/\ | |
-_-_-_-_-_-_-~|__( ^ .^) + + | |
_-_-_-_-_-_-_-"" "" | |
+ o o + o | |
+ + | |
o o o o + | |
o + | |
+ + o o + | |
" | |
let i=0 | |
while true; do | |
# NYAN ON! | |
/Applications/VLC.app/Contents/MacOS/VLC -I rc ~/Music/nyancat/original.mp3 --loop --quiet > /dev/null 2> /dev/null | |
let i++ | |
if [[ $i -eq 1 ]]; then | |
echo -n "To kill most shell programs, press control-c. This sends a SIGINT signal to the program. " | |
fi; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment