Created
July 29, 2014 00:32
-
-
Save sampowers/347a34973b60b5688c93 to your computer and use it in GitHub Desktop.
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
#!/bin/sh | |
function rand { foo=$1; echo $((RANDOM%foo+1)); } | |
function beep { | |
if [ -z $DISPLAY ]; then | |
setterm -bfreq $1 | |
else | |
xset b 100 $1 50 | |
fi | |
echo -ne "\a"; | |
} | |
function rg { | |
bmult=$3 ; if [ -z $bmult ]; then bmult=5; fi | |
if [ $1 -gt $2 ]; then | |
by=$((-1*bmult)) | |
else | |
by=$((1*bmult)) | |
fi | |
for i in `seq $1 $by $2`; do | |
beep $i | |
done | |
} | |
function holyjeez { | |
for i in `seq 0 50 1800`; do | |
rg 1 $i 200 | |
done | |
} | |
function whoa { | |
for i in `seq 0 50 1800` ; do | |
rg $i 1 200 | |
done | |
} | |
function zing { | |
a=`rand 100` | |
b=`rand 700` | |
by=`rand 20` | |
rg $a $b $by | |
rg $b $a $by | |
} | |
function hurp { | |
j=0 | |
inc=$1 | |
if [ -z $inc ]; then inc=20 ; fi | |
while [ "$j" -lt "400" ]; do | |
rg 1600 1000 $((j+=inc)) | |
done | |
while [ "$j" -gt "0" ] ; do | |
rg 1600 1000 $((j-=inc)) | |
done | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment