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 | |
# This uses MFA devices to get temporary (eg 12 hour) credentials. Requires | |
# a TTY for user input. | |
# | |
# GPL 2 or higher | |
if [ ! -t 0 ] | |
then | |
echo Must be on a tty >&2 |
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
@interface NSObject (Debounce) | |
- (void)debounce:(SEL)action delay:(NSTimeInterval)delay; | |
- (void)debounce:(SEL)action object:(id)obj delay:(NSTimeInterval)delay; | |
@end |
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 XMLHttpRequest = require("xmlhttprequest").XMLHttpRequest; | |
var fs = require('fs'); | |
var request = require('request'); | |
var showUrl = 'http://api.trakt.tv/show/summary.json/e5d5ed575b955ade53c9fa57d218dd05/suits'; | |
var showJson = {}; | |
var xhr = new XMLHttpRequest(); | |
xhr.open("GET", showUrl, true); | |
xhr.onload = function (e) { | |
if (xhr.readyState === 4) { |
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 | |
# build.sh | |
GLOBAL_OUTDIR="`pwd`/dependencies" | |
LOCAL_OUTDIR="./outdir" | |
LEPTON_LIB="`pwd`/leptonica-1.71" | |
TESSERACT_LIB="`pwd`/tesseract-ocr" | |
IOS_BASE_SDK="7.1" | |
IOS_DEPLOY_TGT="7.1" |
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 | |
# Script for generating .p12 files from APNS .cer files. | |
# Instructions: | |
# 1. Generate & download the push certificate inside Apple's developer portal | |
# 2. Import the .cer file into your Mac's Keychain Access, find it in your certificate list, and expand it to show the paired private key. | |
# 3. Select both the certificate and the paired private key, CTRL-Click & select Export Keys. Save it as Certificates.p12 in the same folder as the downloaded .cer file. You may give it a passphrase if you'd like, but be sure to remember it if you do. | |
# 4. Execute this shell file, with the format './CreateP12PushCert.sh <DownloadedCerFilename> <ExportedP12Filename> <OutputP12Filename>' | |
usage () | |
{ |
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/python | |
import httplib2 | |
from apiclient.discovery import build | |
from oauth2client.client import flow_from_clientsecrets | |
from oauth2client.file import Storage | |
from oauth2client.tools import run | |