Created
October 10, 2009 21:23
-
-
Save Ttech/207142 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
#/usr/bin/php | |
<?php | |
/* Isn't it fun when your writting a comment, and then *poof* you forget | |
you were writting and end up writting some random paragraph on nothing | |
while your trying to talk about something? Yeah, I get that a lot too.. | |
Oh wait that is me talking, well you, or me... So have fun with tis | |
brainfart'd application that has no reason in anyones right mind what so | |
ever being in php and is just in php because its too cool.... Yeah, I don't | |
believe it either but thats what you get. | |
Oh yeah, feel free to fix it, I was quite tired when I wrote this. | |
*/ | |
/* variables make the world turn */ | |
$loopmax = 1337; // Max to stop at | |
$maxrand=5000; | |
$t=0; | |
/* functions make this function */ | |
function beep($freq, $usesudo=FALSE){ | |
if($usesudo == TRUE){ | |
exec("sudo beep ". $freq); | |
} else { | |
exec("beep ".$freq); | |
} | |
} | |
for($i = 1; $i <= $loopmax; $i++){ | |
switch(intval($argv[1])){ | |
case 1: | |
beep("-f 500 -n -f 1000"); | |
break; | |
case 2: | |
beep("-f ".$i+10); | |
case 3: | |
beep(""); | |
break; | |
case 4: | |
$rand = mt_rand(1,$maxrand); | |
if($t <= 6){ | |
echo $rand."\t"; | |
$t++; | |
} else { | |
echo $rand."\n"; | |
$t=0; | |
} | |
beep("-f ".$rand); | |
break; | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment