Skip to content

Instantly share code, notes, and snippets.

<?php
// TODO: Implement RecursiveIterator
class NodeBranch
{
private $_content;
private $_children = array();
private $_parent;
@krusynth
krusynth / class.Chicago.inc.php
Last active August 29, 2015 14:01
State Decoded parser for Chicago for American Legal data
<?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 20:09
State Decoded parser for Philadelphia for American Legal data
<?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 20:11
State Decoded parser for San Francisco for American Legal data
<?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 20:12
State Decoded parser for San Francisco's Charter for American Legal data
<?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 20:12
State Decoded parser for San Francisco's building code for American Legal data
<?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
/*
* 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 / compareDocumentPosition.js
Created September 10, 2014 20:24
Polyfill for compareDocumentPosition if you need that for old IE or something. But you could probably just use .contains() too.
function compareDocumentPosition(thisNode, other) {
function recursivelyWalk(nodes, cb) {
for (var i = 0, len = nodes.length; i < len; i++) {
var node = nodes[i];
var ret = cb(node);
if (ret) {
return ret;
}
if (node.childNodes && node.childNodes.length) {
var ret = recursivelyWalk(node.childNodes, cb);
@krusynth
krusynth / annotator-ie.js
Created September 10, 2014 20:38
IE patches & shims for Annotator.
/*
* 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 / books.md
Last active June 15, 2021 16:56
A list of useful books to improve your skills

Recommended Books

A list of useful books to improve your skills

Recommendations from others are noted in (parentheses). The rest are my personal recommendations.

Programming

Building your core

  • The Pragmatic Programmer - Hunt & Thomas