Skip to content

Instantly share code, notes, and snippets.

View wam's full-sized avatar

Will Atwood Mitchell wam

  • Freedom
  • Washington, DC
View GitHub Profile
@wam
wam / keybase.md
Created October 25, 2014 23:33
keybase.md

Keybase proof

I hereby claim:

  • I am wam on github.
  • I am wam (https://keybase.io/wam) on keybase.
  • I have a public key whose fingerprint is 6B78 DAC7 EDCB 4258 A27B 5DFF 9B6B 9972 139A 8165

To claim this, I am signing this object:

Test Account

  • How many articles from followed pubs in last 24 hours?
  • How many articles from followed writers in last 24 hours?
  • How many articles from followed friends in last 24 hours?

via Coupler

Staff Picks

Last 4 Staff Picks with Read Counts and Recommend Counts

@wam
wam / flounderfly.js
Created October 23, 2012 20:48
Bookmarklet that replaces the word "founder" with "flounder"
// 1. Copy and paste this into a browser toolbar bookmark
// 2. Encounter a page that makes excessive use of the word "founder"
// 3. Clicky clicky
javascript:function htmlreplace(a,b,element){if(!element)element=document.body;var nodes=element.childNodes;for(var n=0;n<nodes.length;n++){if(nodes[n].nodeType==Node.TEXT_NODE){nodes[n].textContent=nodes[n].textContent.replace(new RegExp(a,'gi'),b);}else{htmlreplace(a,b,nodes[n]);}}}htmlreplace('([fF])ounder','$1lounder');
// Entirely ganked from http://stackoverflow.com/questions/1175775/find-all-instances-of-old-in-a-webpage-and-replace-each-with-new-using-a-ja with the exception of two crucial words.
@wam
wam / procps-net.conf
Created January 25, 2012 07:19
procps-net upstart file for ubuntu, courtesy Simon Déziel
# procps-net - set network related sysctls from /etc/sysctl.conf
#
# This task sets network related kernel sysctl variables from
# /etc/sysctl.conf and /etc/sysctl.d
description "set network related sysctls from /etc/sysctl.conf"
start on net-device-up
task
@wam
wam / gist:1424749
Created December 2, 2011 20:40
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)
{
@wam
wam / asciffy.php
Created November 8, 2010 18:20
php function that replaces html entities with ascii near-equivalents
function asciify($text) {
$entities = array();
$ascii = array();
// 32 through 127 correspond to ascii letters
for ($i = 32; $i < 127; $i++) {
$entities[] = "&#$i;";
$ascii[] = chr($i);
}