Skip to content

Instantly share code, notes, and snippets.

View nibblebot's full-sized avatar

Joshua Hanson nibblebot

View GitHub Profile
$('.stream-items').on('click', '.tweet', function(e) { e.stopPropagation(); var url = 'https://twitter.com/'+$(this).data('permalink-path'); window.open(url); })
<head>
<style>
svg {
background-color: #ccc;
}
</style>
<script src="//cdnjs.cloudflare.com/ajax/libs/d3/3.0.1/d3.v3.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/lodash.js/1.0.0-rc.3/lodash.min.js"></script>
</head>
<body>
@nibblebot
nibblebot / multiwatch.js
Created December 5, 2012 17:35
Handlebars and Coffeescript Watcher
function addSlashes( str ) {
return (str+'').replace(/([\\"'])/g, "\\$1").replace(/\0/g, "\\0");
}
var spawn = require('child_process').spawn;
var growl = require('growl');
var coffee = './node_modules/.bin/coffee';
var coffee_tasks = [];
var handlebars_tasks = [];
coffee_tasks.push(spawn(coffee, ['-cwo', 'static/js', 'static/coffee']));
coffee_tasks.push(spawn(coffee, ['-cwo', 'test', 'test/src']));