Skip to content

Instantly share code, notes, and snippets.

@krusynth
krusynth / commits.py
Created Mar 20, 2014
Get most recent commit for every repo the user has access to.
View commits.py
from github import Github
from datetime import datetime
g = Github("user", "pass")
since = datetime(2014, 1, 1)
for org in g.get_user().get_orgs():
print org.name
@krusynth
krusynth / pyrax_content_disposition.py
Created Apr 1, 2014
Example of sending custom headers using Pyrax.
View pyrax_content_disposition.py
import config
import time
import uuid
import os
import pyrax
pyrax.set_setting("identity_type", "rackspace")
pyrax.set_setting("region", config.rackspace['API_REGION'])
View nodetree.php
<?php
// TODO: Implement RecursiveIterator
class NodeBranch
{
private $_content;
private $_children = array();
private $_parent;
@krusynth
krusynth / class.Chicago.inc.php
Last active Aug 29, 2015
State Decoded parser for Chicago for American Legal data
View class.Chicago.inc.php
<?php
/**
* San Francisco parser for State Decoded.
* Extends AmericanLegal base classes.
*
* PHP version 5
*
* @license http://www.gnu.org/licenses/gpl.html GPL 3
* @version 0.8
@krusynth
krusynth / class.Philadelphia.inc.php
Created May 29, 2014
State Decoded parser for Philadelphia for American Legal data
View class.Philadelphia.inc.php
<?php
/**
* San Francisco parser for State Decoded.
* Extends AmericanLegal base classes.
*
* PHP version 5
*
* @license http://www.gnu.org/licenses/gpl.html GPL 3
* @version 0.8
@krusynth
krusynth / class.SanFrancisco.inc.php
Created May 29, 2014
State Decoded parser for San Francisco for American Legal data
View class.SanFrancisco.inc.php
<?php
/**
* San Francisco parser for State Decoded.
* Extends AmericanLegal base classes.
*
* PHP version 5
*
* @license http://www.gnu.org/licenses/gpl.html GPL 3
* @version 0.8
@krusynth
krusynth / class.SanFranciscoCharter.inc.php
Created May 29, 2014
State Decoded parser for San Francisco's Charter for American Legal data
View class.SanFranciscoCharter.inc.php
<?php
/**
* San Francisco parser for State Decoded.
* Extends AmericanLegal base classes.
*
* PHP version 5
*
* @license http://www.gnu.org/licenses/gpl.html GPL 3
* @version 0.8
@krusynth
krusynth / class.SanFranciscoBuilding.inc.php
Created May 29, 2014
State Decoded parser for San Francisco's building code for American Legal data
View class.SanFranciscoBuilding.inc.php
<?php
/**
* San Francisco parser for State Decoded.
* Extends AmericanLegal base classes.
*
* PHP version 5
*
* @license http://www.gnu.org/licenses/gpl.html GPL 3
* @version 0.8
View ie89-console-apply-support.js
/*
* Patch to make console.log, console.warn, etc work in IE8 & 9
*/
// Default list of functions for console.
var logFns = ["log", "info", "warn", "error", "assert", "dir", "clear", "profile", "profileEnd"];
// Define console.
if (typeof console == 'undefined') {
console = {};
@krusynth
krusynth / annotator-ie.js
Created Sep 10, 2014
IE patches & shims for Annotator.
View annotator-ie.js
/*
* Patch to make console.log, console.warn, etc work in IE8 & 9
*/
// Default list of functions for console.
var logFns = ["log", "info", "warn", "error", "assert", "dir", "clear", "profile", "profileEnd"];
// Define console.
if (typeof console == 'undefined') {
console = {};