Skip to content

Instantly share code, notes, and snippets.


Colin Gourlay colingourlay

View GitHub Profile
View app.js
url_conf: require('./urls')
View Trac Timeline User Filter
View Unwrapped Trac Timeline User Filter
(function() {
if (typeof jQuery != 'undefined') {
return run();
} else {
function getScript(url, callback) {
var script = document.createElement('script');
script.src = url;
var head = document.getElementsByTagName('head')[0],
done = false;
script.onload = script.onreadystatechange = function() {
View frak.html
<div class="frak">
<div class="half">
Left Column
<div class="half">
Right Column
View nested-frak.html
<div class="frak">
<div class="quarter x3 frak">
<div class="third">Column A</div>
<div class="third">Column B</div>
<div class="third">Column C</div>
<div class="quarter">Sidebar</div>
View fraction-choice.html
<div class="frak">
<div class="sixth">Column A</div>
<div class="sixth x4">Column B</div>
<div class="sixth">Column C</div>
<div class="frak">
<div class="sixth">Column A</div>
<div class="third x2">Column B</div>
<div class="sixth">Column C</div>
View loadSubscribedArticles.js
var lsaCall = [0];
function loadSubscribedArticles(i, tag, Author) {
var int,
self = this;
console.log("called with i=" + i);
if (typeof lsaCall[i] === "undefined" || lsaCall[i] === 0) {
console.log("first-time block ran");
lsaCall[i] = 1;
View gist:1321283
function runsite {
if [ -z "$2" ]; then
echo usage: runsite [network] [site_id] mobile?
if [ -n "$3" ]; then
View gist:1958226
(function (w) {
// Define two queues for handlers
w.readyQ = [];
w.bindReadyQ = [];
// Define the fake jQuery function to capture handlers
w.$ = w.jQuery = function (handler) {
// Push a handler into the correct queue
colingourlay /
Created Mar 5, 2012 — forked from isaacs/
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl | sh