Skip to content

Instantly share code, notes, and snippets.

View colingourlay's full-sized avatar

Colin Gourlay colingourlay

View GitHub Profile
@mbostock
mbostock / .block
Last active March 13, 2024 22:46
mousewheel-zoom + click-to-center
license: gpl-3.0
@mbostock
mbostock / .block
Last active October 19, 2021 16:36 — forked from mbostock/.block
click-to-zoom via transform
license: gpl-3.0
@mbostock
mbostock / .block
Last active March 13, 2024 01:33
Bar Chart with Negative Values
license: gpl-3.0
redirect: https://observablehq.com/@d3/diverging-bar-chart
@bobbydavid
bobbydavid / app.js
Created May 8, 2012 23:46
socket.io in Express 3
var express = require('express')
, http = require('http')
, connect = require('connect')
, io = require('socket.io');
var app = express();
/* NOTE: We'll need to refer to the sessionStore container later. To
* accomplish this, we'll create our own and pass it to Express
* rather than letting it create its own. */
var sessionStore = new connect.session.MemoryStore();
@trey
trey / dropbox_git.md
Created May 18, 2012 03:12
Using Dropbox to Share Git Repositories

Using Dropbox to Share Git Repositories

First, create a Git subfolder inside your Dropbox folder. Then you can share the individual projects inside that folder with whomever you want (or just use it for instant offsite backups).

From inside a Git project:

git clone --bare . ~/Dropbox/Git/gitproject.git
git remote add dropbox ~/Dropbox/Git/gitproject.git

When you're ready to push:

@mbostock
mbostock / .block
Last active September 13, 2019 10:42
Shape Tweening
license: gpl-3.0
@brianblakely
brianblakely / rem-calibrate.css
Created July 13, 2012 18:55
Simulate vw with rems
/* Android stock browser won't let you set font-size smaller than 8px unless you apply this. */
:root {
-webkit-text-size-adjust: none;
-moz-text-size-adjust: none;
-ms-text-size-adjust: none;
-o-text-size-adjust: none;
text-size-adjust: none;
}
@wbzyl
wbzyl / README.md
Created July 17, 2012 20:42
Glow Filter

SVG Essentials – Filters

This is a recreation (for the purpose of tinkering with an implementation in d3.js) of the example from the book SVG Essentials by J. David Eisenberg.

The <feColorMatrix> element allows to change color values in a following way.

@pamelafox
pamelafox / thirdparties.js
Created August 25, 2012 00:40
isDefined
// isDefined(window, 'google');
// isDefined(window, 'google.maps.places');
var isDefined = function(parent, name) {
var parts = name.split('.');
var part = parts.shift();
var cur = parent;
while (part) {
if (cur[part]) {
cur = cur[part];
@anthonyshort
anthonyshort / grunt.js
Created September 28, 2012 07:00
My Gruntfile
/*global module:false*/
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
meta: {
version: '0.1.0',
banner: '/*! Cake Marketing - v<%= meta.version %> - ' +
'<%= grunt.template.today("yyyy-mm-dd") %>\n' +
'* http://cakemarketing.com/\n' +