Skip to content

Instantly share code, notes, and snippets.

View alex-laties's full-sized avatar

Alexander Laties alex-laties

  • Google
  • New York, New York
View GitHub Profile
@alex-laties
alex-laties / keybase.md
Created July 16, 2016 22:44
keybase.md

Keybase proof

I hereby claim:

  • I am alex-laties on github.
  • I am alexlaties (https://keybase.io/alexlaties) on keybase.
  • I have a public key whose fingerprint is D6F1 EAAC 9661 AC9A AB31 C48D EB9F 87A0 34F8 4699

To claim this, I am signing this object:

CMake Error at common/CMakeLists.txt:76 (create_directory_groups):
Unknown CMake command "create_directory_groups".
CMake Warning (dev) in CMakeLists.txt:
No cmake_minimum_required command is present. A line of code such as
cmake_minimum_required(VERSION 3.5)
should be added at the top of the file. The version specified may be lower
@alex-laties
alex-laties / phpcpp-fix-makefile.patch
Created September 9, 2015 23:25
A patch for PHP-CPP to allow for tests to be run against semantically versioned builds.
From dc9a664d0f006ba7cdec5b3f97a9b8b87992cc48 Mon Sep 17 00:00:00 2001
From: Alex Laties <agl@tumblr.com>
Date: Wed, 9 Sep 2015 19:22:51 -0400
Subject: [PATCH] fix up Makefile so it correctly links libphpcpp.so for tests
---
Makefile | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
/* TODO rework this
* I built this under the assumption that 'elements' specified a list of either additions or removals from the skip list. this is not true.
* When * is present in the 'elements' string, + and - become meaningful as addtions/removals from the default set:
* a, abbr, acronym, address, applet, area, b, bdo, big, blockquote, br, button, caption, center, cite, code, col, colgroup, dd, del, dfn, dir, div, dl, dt, em, embed, fieldset, font, form, h1, h2, h3, h4, h5, h6, hr, i, iframe, img, input, ins, isindex, kbd, label, legend, li, map, menu, noscript, object, ol, optgroup, option, p, param, pre, q, rb, rbc, rp, rt, rtc, ruby, s, samp, script, select, small, span, strike, strong, sub, sup, table, tbody, td, textarea, tfoot, th, thead, tr, tt, u, ul, var
*
* E. G. "*-ruby+script" - given the default set, remove 'ruby' and add 'script' as allowable tags
*
*
*
* When not using *, it means explicit allowance of only the given elements. this also mea
#!/bin/bash
# Sets paths and runs gulp
# Assumes node is already installed and you run this script from the top level of the repo
ORIGINAL_NODE_PATH=`echo $NODE_PATH`
CURR_DIR=`pwd`
export NODE_PATH=$NODE_PATH:$CURR_DIR/node_modules
$CURR_DIR/node_modules/gulp/bin/gulp.js
export NODE_PATH=$ORIGINAL_NODE_PATH
javascript:(function()%7Bfunction%20c()%7Bvar%20e%3Ddocument.createElement(%22link%22)%3Be.setAttribute(%22type%22,%22text/css%22)%3Be.setAttribute(%22rel%22,%22stylesheet%22)%3Be.setAttribute(%22href%22,f)%3Be.setAttribute(%22class%22,l)%3Bdocument.body.appendChild(e)%7Dfunction%20h()%7Bvar%20e%3Ddocument.getElementsByClassName(l)%3Bfor(var%20t%3D0%3Bt%3Ce.length%3Bt%2B%2B)%7Bdocument.body.removeChild(e%5Bt%5D)%7D%7Dfunction%20p()%7Bvar%20e%3Ddocument.createElement(%22div%22)%3Be.setAttribute(%22class%22,a)%3Bdocument.body.appendChild(e)%3BsetTimeout(function()%7Bdocument.body.removeChild(e)%7D,100)%7Dfunction%20d(e)%7Breturn%7Bheight:e.offsetHeight,width:e.offsetWidth%7D%7Dfunction%20v(i)%7Bvar%20s%3Dd(i)%3Breturn%20s.height%3Ee%26%26s.height%3Cn%26%26s.width%3Et%26%26s.width%3Cr%7Dfunction%20m(e)%7Bvar%20t%3De%3Bvar%20n%3D0%3Bwhile(!!t)%7Bn%2B%3Dt.offsetTop%3Bt%3Dt.offsetParent%7Dreturn%20n%7Dfunction%20g()%7Bvar%20e%3Ddocument.documentElement%3Bif(!!window.innerWidth)%7Breturn%20window.innerHeight%7Delse%
def decode_byte(b):
b = ord(b)
b = chr(((b & 3) << 6) + (b >> 2))
return b
import urllib2
import json
from supervisor import childutils
import sys
import socket
class PagerDutyNotifier(object):
def __init__(self, pd_service_key):
self.pd_service_key = pd_service_key
@alex-laties
alex-laties / djangosession.py
Created December 17, 2012 03:06
Accessing django sessions via a WSGI Middleware. Can be used in any python web stack that conforms to the PEP 333 WSGI specification. This includes bottle.
import os
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings' #not using env.put as that does not execute immediately
from django.conf import settings
SessionStore = __import__(settings.SESSION_ENGINE, fromlist=['']).SessionStore
class DjangoSessionWSGIMiddleware(object):
transform = false #doesn't transform output of anything above in the stack
def __init__(self, app):
self.app = app
font:
family: serif
weight: bold
size: 1.2em