This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.navbar-toggle { | |
background-image: url(http://i.imgur.com/NBCwtIw.png); | |
background-position: center; | |
background-size: 90%; | |
background-repeat: no-repeat; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var original = cb; | |
cb = function wrapper() { | |
var args = arguments; | |
process.nextTick(function () { | |
original.apply(wrapper, args); | |
}); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
TOKEN="" | |
API_URL="https://api.instagram.com/v1" | |
PHOTO_ID="358863216058600582_3832082" | |
function get_liked() { | |
http GET "$API_URL/media/$PHOTO_ID?access_token=$TOKEN" | jsonpipe | grep user_has_liked | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Uses httpie: https://github.com/jkbr/httpie | |
BASE_URL="https://api.singly.com/" | |
CLIENT_ID="" | |
CLIENT_SECRET="" | |
USERNAME="" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "Gathering 60s of data for process ID $1" | |
dtrace -n "profile-997/pid == $1 && arg1/{ | |
@[jstack(50, 2048)] = count(); } tick-30s { exit(0); }" > $1.out | |
echo "Filtering..." | |
c++filt < $1.out > $1-demangled.out |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE rollcall-vote PUBLIC "-//US Congress//DTDs/vote v1.0 20031119 //EN" "http://clerk.house.gov/evs/vote.dtd"> | |
<?xml-stylesheet type="text/xsl" href="http://clerk.house.gov/evs/vote.xsl"?> | |
<rollcall-vote> | |
<vote-metadata> | |
<majority>R</majority> | |
<congress>113</congress> | |
<session>1st</session> | |
<committee>U.S. House of Representatives</committee> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var exifParser = require('exif-parser'); | |
var $ = require('jquery-browserify'); | |
var doc = document.documentElement; | |
doc.ondragover = function () { | |
return false; | |
}; | |
doc.ondragend = function () { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
turtle(function (t) { | |
ctx.lineWidth = 3; | |
var fns = []; | |
[0, 35, 70, 105].forEach(function (a) { | |
[0, -90, 180, 90, 180].forEach(function (off) { | |
fns.push(function (t) { | |
// Originally I just wanted to avoid dense black lines interfering with my ability | |
// to read the text as I was typing but then figured why not play with opacity |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python2.7 | |
import json | |
import sys | |
try: | |
log = json.loads(sys.stdin.read()) | |
except: | |
print "Couldn't parse." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
from contextlib import contextmanager | |
from fabric.api import env, hide, local | |
@contextmanager | |
def mysql_password(database): | |
contents = """ | |
[client] |