This was originally part of my other thread on the security board, but I decided to separate it.
Basically, it's a contest.. find the funniest code snippits with clever
Google Code Search searches. Here is a thread that discusses a lot of them:
http://thedailywtf.com/forums/thread/94630.aspxAnd here are some of my favorites:
int i = *(int*)&x; /* get bits for floating value */
i = 0x5f375a86 - (i>>1); /* what the fuck? */
x = *(float*)&i; /* convert bits back to float */
# deep deep badness
Siesta->log("holy shit, a listadmins mail is bouncing, so we can't tell them about it!");
return;
if (!strcmp(ft->UID, FILE_SEND_UID)) {
/* holy crap. who the fuck would transfer gigabytes through AIM?! */
static char *sizes[4] = { "bytes", "KB", "MB", "GB" };
if (! ref $phases) {
# holy crap, that actually worked!
$phases = [map(eval "$_", _path_to_array($phases))];