Skip to content

Instantly share code, notes, and snippets.

Avatar

Bradford Toney bluemoon

  • Bloom Credit
  • New York
View GitHub Profile
View Heatmap
var defaults = {
dotsize: 5,
gutsize: 1,
totsize: 6
}
function heatmap(id, data, options) {
var self = {};
var options = _.extend(defaults, options);
self.data = data || [];
@pvinis
pvinis / face_detector.rb
Created Dec 7, 2011
run with "macruby face_detector.rb" or "macruby face_detector.rb https://fbcdn-sphotos-a.akamaihd.net/hphotos-ak-snc7/304055_10150415385415891_522505890_10347873_1682210515_n.jpg?dl=1" for a photo of me with woody and buzz lightyear :p
View face_detector.rb
framework 'Cocoa'
class NSColor
def toCGColor
color_RGB = colorUsingColorSpaceName(NSCalibratedRGBColorSpace)
## approach #1
# components = Array.new(4){Pointer.new(:double)}
# color_RGB.getRed(components[0],
# green: components[1],
# blue: components[2],
@jasondavies
jasondavies / README.md
Created Oct 13, 2011
Zoom/Pan Map Example
View README.md

Demonstrates using d3.behavior.zoom with a geographic projection. Based on an example by Iain Dillingham.

@benjchristensen
benjchristensen / index.html
Created Aug 16, 2011
Animated Line Graphs / Sparklines using SVG Path and d3.js
View index.html
<html>
<head>
<title>Animated Sparkline using SVG Path and d3.js</title>
<script src="http://mbostock.github.com/d3/d3.v2.js"></script>
<style>
/* tell the SVG path to be a thin blue line without any area fill */
path {
stroke: steelblue;
stroke-width: 1;
fill: none;
@iadvize
iadvize / strophe.xdomainrequest.js
Created Jan 6, 2011
A Strophe plugin by iAdvize that use the XdomainRequest if found (Internet Explorer)
View strophe.xdomainrequest.js
Strophe.addConnectionPlugin("xdomainrequest", {
init: function () {
if (window.XDomainRequest) {
Strophe.debug("using XdomainRequest for IE");
// override thee send method to fire readystate 2
XDomainRequest.prototype.oldsend = XDomainRequest.prototype.send;
XDomainRequest.prototype.send = function() {
XDomainRequest.prototype.oldsend.apply(this, arguments);
this.readyState = 2;
@jeremi
jeremi / fabfile.py
Created Nov 4, 2010
A fabfile to manage git+appengine deployement
View fabfile.py
from __future__ import with_statement
import functools
import os
import sys
from fabric.api import *
from fabric.colors import green, red, green
import datetime
import re
@cowboy
cowboy / HEY-YOU.md
Last active May 1, 2021
jQuery Tiny Pub/Sub: A really, really, REALLY tiny pub/sub implementation for jQuery.
@onyxfish
onyxfish / elections.chicagotribune.com.vcl
Created Nov 3, 2010
Elections Center Varnish Configuration File
View elections.chicagotribune.com.vcl
backend app1 {
.host = "1.1.1.1";
.port = "80";
}
backend app2 {
.host = "2.2.2.2";
.port = "80";
}