Skip to content

Instantly share code, notes, and snippets.

View dphiffer's full-sized avatar

Dan Phiffer dphiffer

View GitHub Profile
@dphiffer
dphiffer / Hey.txt
Created February 10, 2014 17:09
An empty spam email
Return-Path: <x3633000@homiemail-mx5.g.dreamhost.com>
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: dphiffer@riseup.net

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:

<?php
error_reporting(E_ALL);
ini_set('display_errors', true);
$pdo = odbc_connect('Driver={FileMaker ODBC};Server=127.0.0.1;Database=library_index', 'admin', 'admin');
?>
Warning: odbc_connect(): SQL error: [FileMaker][FileMaker ODBC] (802): Unable to open file, SQL state 28000 in SQLConnect in /Users/dphiffer/Sites/php-demo/odbc.php on line 5
@dphiffer
dphiffer / sexton_abu_dhabi.md
Created May 20, 2014 14:31
Email from NYU President John Sexton Re: Today's Article in the NY Times about Abu Dhabi Labor

Memorandum

Date: Monday, May 19, 2014
To: THE NYU COMMUNITY
From: NYU President John Sexton

Re: Today's Article in the NY Times about Abu Dhabi Labor

The occurrences cited in today's New York Times are, if true as reported, troubling and unacceptable. They are out-of-line with the labor standards (here and here) we deliberately set for those constructing the 'turn-key' campus being built for us on Saadiyat Island and inconsistent with what we understood to be happening on the ground for those workers. Moreover, they are wholly inconsistent with the level of compliance we know to be the norm for those working directly for NYU Abu Dhabi at our existing campus over the last five years in operational contracts covering services for food, safety, transportation, and all other matters.

We will be working with our Abu Dhabi partners to investigate these reports vigorously.

@dphiffer
dphiffer / mysqld.log
Created May 21, 2014 15:03
Did I just crash mysqld?
140521 10:55:31 mysqld_safe Number of processes running now: 0
140521 10:55:31 mysqld_safe mysqld restarted
140521 10:55:31 [Note] Plugin 'FEDERATED' is disabled.
140521 10:55:31 InnoDB: The InnoDB memory heap is disabled
140521 10:55:31 InnoDB: Mutexes and rw_locks use GCC atomic builtins
140521 10:55:31 InnoDB: Compressed tables use zlib 1.2.3
140521 10:55:31 InnoDB: Using Linux native AIO
140521 10:55:31 InnoDB: Initializing buffer pool, size = 128.0M
140521 10:55:31 InnoDB: Completed initialization of buffer pool
140521 10:55:31 InnoDB: highest supported file format is Barracuda.
Ellie Irons - Silent Barn (also, the basement show)
Thomas Dexter - 1381 Myrtle Ave at
Outlet - Out All Night (photography)
A History of the Future - 175 Stockholm St., #109
70s Disco Bushwick / Bizarre Black Box gallery 12 Jefferson St (Myrtle & Broadway)
Microscope Gallery - Soap film
Lucia Rollow - BFP hallway
Transfer Gallery
Julia S. + Do It Yourself Show 3rd Ward building
Man Bartlett 41 Varick (between Flushing/Johnson)
@dphiffer
dphiffer / example.php
Last active August 29, 2015 14:02
Using meta_query with JSON API
<?php
// 1. The class name must match the filename (i.e., "foo.php" for JSON_API_Foo_Controller)
// 2. Save this in your themes folder
// 3. Activate your controller under Settings > JSON API
class JSON_API_Example_Controller {
public function get_posts_by_meta_query() {
global $json_api;
@dphiffer
dphiffer / norton_saitta_30c3.md
Last active August 29, 2015 14:03
No Neutral Ground in a Burning World
@dphiffer
dphiffer / littlenets_library.md
Last active August 29, 2015 14:07
LittleNets Library

The LittleNets Little Library

Assembled by Ingrid Burrington

When we talk about what the web could be, it is often with nostalgia for a web that was—or a web that we think might have been, but we missed it. We tend to trip over our words whenever we talk about the web in any non-trivial way. Anything we say is so easily dated, or sound incredibly pretentious, and nothing ever is true to the whole place, because it simply can't be true to the whole place.

These are some of the writings that have shaped the way I think about and talk about the network. Some of them are kind of "weird old internet" texts of internet history and some of them are from now, and are a little bit urgent. All of them are probably important to me because they have this ideal mix of sincerity, uncertainty, and unexpected grace.

For texts that I read online, I've saved the pages as accurately as wget would allow. They're sort of like weird scrapbook objects that way.

@dphiffer
dphiffer / serialize.php
Last active August 29, 2015 14:10
A dumb conversion utility for PHP <=> JSON
<form action="serialize.php" method="post">
<p>JSON:<br>
<textarea name="json" rows="10" cols="80"><?php
if (!empty($_POST['php'])) {
echo json_encode(unserialize($_POST['php']), JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);
}
?></textarea></p>
<p>Serialized PHP:<br>