Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.
Moderator: General Moderators
nickvd
DevNet Resident
Posts: 1027 Joined: Thu Mar 10, 2005 5:27 pm
Location: Southern Ontario
Contact:
Post
by nickvd » Thu Apr 26, 2007 5:56 pm
ptrpan wrote: Saw this somewhere. A bit of UNIX
who | grep -i blond |
date; cd̃̃̃̃̃̃ ; unzip; touch;
strip; finger; mount; gasp;
yes; uptime; umount;
sleep
You missed the fsck
#!/bin/ssh
#The Unix Guru's View of Sex
unzip ; strip ; touch ; grep ; finger ; mount ; fsck ; more ; yes ; umount ; sleep
http://www.ee.ryerson.ca/~elf/hack/ugvs.html
Luke
The Ninja Space Mod
Posts: 6424 Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA
Post
by Luke » Thu Apr 26, 2007 6:26 pm
that one's awesome
RobertGonzalez
Site Administrator
Posts: 14293 Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA
Post
by RobertGonzalez » Mon Apr 30, 2007 1:43 pm
I had seen the cd /pub one and the Unix one before. I like that flowchart, that is some good stuff. What about something like:
Code: Select all
<?php
switch ($status) {
case 'sober':
fopen($throat); fputs($beer);
continue;
case 'drunk':
fseek($females); fopen($pants); fgets($asskicked); fputs($injail);
break;
case 'really_drunk':
fopen($toilet); fputs($barf); fflush(); fclose($toilet); ftell($nobody);
break;
}
?>
Oren
DevNet Resident
Posts: 1640 Joined: Fri Apr 07, 2006 5:13 am
Location: Israel
Post
by Oren » Mon Apr 30, 2007 1:46 pm
nickvd
DevNet Resident
Posts: 1027 Joined: Thu Mar 10, 2005 5:27 pm
Location: Southern Ontario
Contact:
Post
by nickvd » Mon Apr 30, 2007 2:14 pm
Everah wrote: I had seen the cd /pub one and the Unix one before. I like that flowchart, that is some good stuff. What about something like:
<snip>
Minor alteration
Code: Select all
<?php
function drinking() {
return $something funny; //too lazy to think of funnies right now
}
while (drinking() === true) {
switch ($status) {
case 'sober':
fopen($throat); fputs($beer);
continue;
case 'drunk':
fseek($females); fopen($pants); fgets($asskicked); fputs($injail);
break;
case 'really_drunk':
fopen($toilet); fputs($barf); fflush(); fclose($toilet); ftell($nobody);
break;
}
}
?>
RobertGonzalez
Site Administrator
Posts: 14293 Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA
Post
by RobertGonzalez » Mon Apr 30, 2007 2:33 pm
Code: Select all
<?php
$beers = 0;
function drinking($max = 10) {
static $beers;
if ($beers == $max) { // or less for the lightweights
return false;
}
++$beers;
return true;
}
function notAsThinkAsYouDrunkIAm($beers) {
if ($beers < 3) return 'sober';
if ($beers < 10) return 'drunk';
return 'really_drunk';
}
while (drinking()) {
switch (notAsThinkAsYouDrunkIAm($beers)) {
case 'sober':
fopen($throat); fputs($beer);
continue;
case 'drunk':
fseek($females); fopen($pants); fgets($asskicked); fputs($injail);
break;
case 'really_drunk':
fopen($toilet); fputs($barf); fflush(); fclose($toilet); ftell($nobody);
break;
}
}
?>
Totally untested, though I might volunteer to test this
OasisGames
Forum Commoner
Posts: 26 Joined: Mon Apr 23, 2007 3:24 pm
Location: Ohio
Post
by OasisGames » Mon Apr 30, 2007 7:14 pm
I'm waiting for your life to ; } ?>
Or for the shorter version (which is more general to programming)
I'm waiting for your life to ;
the_last_tamurai
Forum Commoner
Posts: 87 Joined: Wed Feb 28, 2007 8:24 am
Location: cairo
Contact:
Post
by the_last_tamurai » Tue May 01, 2007 3:32 am
Code: Select all
if ($you=="PHPer")
{
$con = mysql_connect('buddy', 'tamer', '****')
or die('Could not connect: ' . mysql_error($con));
}
else // I don't discriminate
{
die("Away From Here");
}
ptrpan
Forum Commoner
Posts: 81 Joined: Tue Apr 03, 2007 5:09 am
Location: Cape Town, South Africa
Post
by ptrpan » Wed May 02, 2007 3:07 am
Everah, that classic! It really made me laugh out loud. Brilliant!
RobertGonzalez
Site Administrator
Posts: 14293 Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA
Post
by RobertGonzalez » Wed May 02, 2007 11:01 am
I thought it was kinda cool too. Amazing the stories PHP can tell when you use its built in functions.
aaronhall
DevNet Resident
Posts: 1040 Joined: Tue Aug 13, 2002 5:10 pm
Location: Back in Phoenix, missing the microbrews
Contact:
Post
by aaronhall » Wed May 02, 2007 3:29 pm
Isn't that copyright infringement?