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
<?php | |
if (isset($_GET['errors'])) { error_reporting(E_ALL); } else { error_reporting(0); } | |
// Requires the Universal Feed Writer from http://www.phpclasses.org/browse/package/4427.html | |
include("FeedWriter.php"); | |
define('FIREWALLED', true); | |
define('FIREWALL_ROOT', 'firewall/'); | |
include(FIREWALL_ROOT.'config/db.php'); |
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
<?php | |
$aOutput = array(); | |
$aLines = explode("\n", file_get_contents($argv[1])); | |
$aKeys = explode("\t", array_shift($aLines)); | |
foreach($aLines as $line) { | |
if (!trim($line)) { |
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
/* Use this to cause a function to fire no more than once every 'ms' milliseconds. | |
For example, an expensive mousemove handler: | |
$('body').mouseover(ratelimit(function(ev) { | |
// ... | |
}, 250)); | |
*/ | |
function ratelimit(fn, ms) { | |
var last = (new Date()).getTime(); |
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 | |
# | |
# git-svn-diff | |
# Generate an SVN-compatible diff against the tip of the tracking branch | |
TRACKING_BRANCH=`git config --get svn-remote.svn.fetch | sed -e 's/.*:refs\/remotes\///'` | |
REV=`git svn find-rev $(git rev-list --date-order --max-count=1 $TRACKING_BRANCH)` | |
git diff --no-prefix $(git rev-list --date-order --max-count=1 $TRACKING_BRANCH) $* | | |
sed -e "s/^+++ .*/& (working copy)/" -e "s/^--- .*/& (revision $REV)/" \ | |
-e "s/^diff --git [^[:space:]]*/Index:/" \ | |
-e "s/^index.*/===================================================================/" |