Skip to content

Instantly share code, notes, and snippets.

@wam
Created December 2, 2011 20:40
Show Gist options
  • Save wam/1424749 to your computer and use it in GitHub Desktop.
Save wam/1424749 to your computer and use it in GitHub Desktop.
Satire: Facebook's "Secret Sauce" in PHP Pseudocode?
<?php
// Get everything everyone shared this year from our offshore data center
$all_links = Echelon::query('shared_links')->where('year = ?', 2011)->find_all();
// Add a dash of secret sauce
$politically_correct_links = array_filter($all_links, 'secret_sauce');
function secret_sauce($link)
{
// Per zuck, keep fox out of the list
if ($link['domain'] == 'foxnews.com') {
return false;
} else {
return true;
}
}
?>
@j0nx
Copy link

j0nx commented Dec 6, 2011

Please simply conditional to return $link['domain'] == 'foxnews.com';

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment