Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<div class="mr-space" data-space-id="espn/xgamescom" style="min-height: 500px;"></div>
<script src="//platform.massrelevance.com/js/massrel.js"></script>
@howardr
howardr / jquery.scroll.js
Created July 8, 2011 18:21
Patched version of jquery scroll plugin
/*jslint eqeqeq: true, regexp: true */
/*global document, window, setInterval, clearInterval, handler, jQuery */
/*
* Scrollbar - a jQuery plugin for custom scrollbars
*
* @author Thomas Duerr, me@thomd.net
* @date 03.2010
* @requires jquery v1.4.2
* @version 0.3
@howardr
howardr / gist:1015545
Created June 8, 2011 22:03 — forked from albertsun/gist:674563
Parse GeoJSON for Raphael
var allPolygons = [];
function setPolys(geom) {
/* geom: a GeoJSON object.
Parse geom, and add it as a child to the global Raphael object, R.
*/
//geom.type either Polygon or MultiPolygon
var translationFunction = function(coords) {
var projected = Projections.contiguous.forward(coords);
var x = 217+(projected[0]*190/2400000);
@howardr
howardr / albers.js
Created June 6, 2011 20:41 — forked from RandomEtc/albers.js
An Albers Equal Area Conic projection in javascript, for protovis.
/*
An Albers Equal Area Conic projection in javascript, for protovis.
For centering the contiguous states of the USA in a 800x400 div, I used:
var scale = pv.Geo.scale(albers(23, -96, 29.5, 45.5))
.range({ x: -365, y: -375 }, { x: 1200, y: 1200 });
http://mathworld.wolfram.com/AlbersEqual-AreaConicProjection.html
@howardr
howardr / varnish-jsonp.vcl
Created April 5, 2011 17:14 — forked from simonw/varnish-jsonp.vcl
Vanish JSONP hack fork
backend default {
.host = "127.0.0.1";
.port = "8000";
}
# We go BACK to varnish to get it to generate an ESI template that
# generates a JSON-P response.
backend jsonp_template_backend {
.host = "127.0.0.1";
.port = "8070";
@howardr
howardr / setup-statsd.sh
Created March 22, 2011 20:22 — forked from collegeman/setup-statsd.sh
Minor changes to statsd installation
# install git
sudo apt-get install g++ curl libssl-dev apache2-utils
sudo apt-get install git-core
mkdir ~/src
cd ~/src
# download the Node source, compile and install it
git clone https://github.com/joyent/node.git
cd node