Skip to content

Instantly share code, notes, and snippets.

View colingourlay's full-sized avatar

Colin Gourlay colingourlay

View GitHub Profile
[
{
"Ministry":"01. Barton (Protectionist), 1 Jan 1901-24 Sept 1903",
"Title":"Minister for External Affairs",
"Name":"Barton, Edmund",
"House":"HR",
"Party":"Protectionist",
"State":"NSW",
"InCabinet":"N/A",
"Start":"1901-01-01",
@staltz
staltz / introrx.md
Last active April 29, 2025 08:33
The introduction to Reactive Programming you've been missing
@fabiovalse
fabiovalse / README.md
Last active July 3, 2021 14:05
Equidistant Points Along an Archimedean Spiral
@fabiovalse
fabiovalse / README.md
Last active June 29, 2020 14:42
Points Along an Archimedean Spiral
@hdragomir
hdragomir / sm-annotated.html
Last active February 2, 2025 02:22
The deferred font loading logic for Smashing Magazine. http://www.smashingmagazine.com/
<script type="text/javascript">
(function () {
"use strict";
// once cached, the css file is stored on the client forever unless
// the URL below is changed. Any change will invalidate the cache
var css_href = './index_files/web-fonts.css';
// a simple event handler wrapper
function on(el, ev, callback) {
if (el.addEventListener) {
el.addEventListener(ev, callback, false);
@getify
getify / gist:8190952
Last active January 1, 2016 19:29
an actual JS wtf
var a = Array( 3 );
a; // []
a.length; // 3
a.map( function( v, idx ){ return idx; } ); // [ ] <-- WTF?
var b = Array.apply( null, Array(3) );
b; // [undefined,undefined,undefined]
b.length; // 3
b.map( function( v, idx ){ return idx; } ); // [0,1,2] <-- :)
everything i write on medium is a lie
xoxo j$
var fs = require('fs'),
path = require('path'),
cancer = '.coffee',
body = './body',
totalCells,
cellsChecked;
function killCancerCell(cell) {
fs.unlinkSync(path.join(body, cell));
@drzax
drzax / log.js
Created November 15, 2013 01:58
Re-emit a log file generated by Winston.
Tail = require('tail').Tail;
Winston = require('winston');
tail = new Tail('logs/default.log');
logger = new Winston.Logger();
logger.add(Winston.transports.Console, {colorize:true});
tail.on('line', function(data){
var json, date;
try {
@tinabeans
tinabeans / template.html
Last active February 13, 2024 09:18
A super-barebones single-column responsive email template, assuming a max-width of 540px. Read about it on the Fog Creek blog.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Single-Column Responsive Email Template</title>
<style>
@media only screen and (min-device-width: 541px) {
.content {