Skip to content

Instantly share code, notes, and snippets.

View ieatkillerbees's full-sized avatar

Samantha Quiñones ieatkillerbees

View GitHub Profile

Keybase proof

I hereby claim:

  • I am ieatkillerbees on github.
  • I am squinones (https://keybase.io/squinones) on keybase.
  • I have a public key whose fingerprint is 4636 1084 E6A4 8F19 C36C DBDD DB3D 99D0 60A4 4357

To claim this, I am signing this object:

var readline = require('readline');
var rl = readline.createInterface({
input: process.stdin,
output: process.stdout,
terminal: false
});
rl.on('line', function (line) {
var jsonstuff = JSON.parse(line);
// do stuff
});
@ieatkillerbees
ieatkillerbees / default.vcl
Last active August 29, 2015 14:18
Example VCL for Supercharging Content Delivery presentation
#
# This is an example VCL file for Varnish.
#
# It does not do anything by default, delegating control to the
# builtin VCL. The builtin VCL is called when there is no explicit
# return statement.
#
# See the VCL chapters in the Users Guide at https://www.varnish-cache.org/docs/
# and http://varnish-cache.org/trac/wiki/VCLExamples for more examples.
@ieatkillerbees
ieatkillerbees / gist:9b0c77c4685a5279187d
Created March 16, 2015 18:59
napkin code, memcached key validation
*** clean/memcached-2.2.0/php_memcached.c 2014-04-01 10:23:39.000000000 +0000
--- memcached-2.2.0/php_memcached.c 2015-03-16 18:54:46.447761473 +0000
***************
*** 34,39 ****
--- 34,41 ----
#include "fastlz/fastlz.h"
#include <zlib.h>
+ #include <ctype.h>
+
@ieatkillerbees
ieatkillerbees / gist:60c83c7dc0885a86497a
Last active June 3, 2019 18:55
Important Multi-Default Use Case
<?php
// Apparently I need to point out that this is a joke?
$foo = 101;
switch (true)
{
default:
less:
echo "$foo < 100!";
break;
@ieatkillerbees
ieatkillerbees / eu_opendata_xformer
Created March 28, 2014 05:02
This parses open-data stuff for the EU. Kinda, most of the time. YMMV. Outputs an excel-ready CSV file, because reasons. This is probably not relevant for anyone but me, but if you need it, use it! :)
from bs4 import BeautifulSoup, UnicodeDammit
import csv
import sys
# This parses open-data stuff for the EU. Kinda, most of the time. YMMV. Outputs an excel-ready CSV file, because reasons.
# This is probably not relevant for anyone but me, but if you need it, use it! :)
__author__ = "Samantha Quinones"
__email__ = "samantha@politico.com"
__license__= "Public Domain"
@ieatkillerbees
ieatkillerbees / smtp_server.py
Created June 28, 2013 02:21
A simple sample SMTP server to push Bamboo notification emails to Datadog's API
import asyncore
import email
import socket
from dogapi import dog_http_api as api
from smtpd import SMTPServer
class Server(SMTPServer):
def __init__(self, dd_api_keys, host="127.0.0.1", port=1125):
self.dd_api_keys = dd_api_keys
asyncore.dispatcher.__init__(self)