Skip to content

Instantly share code, notes, and snippets.

View abhoopathy's full-sized avatar

Aneesh Bhoopathy abhoopathy

View GitHub Profile
@abhoopathy
abhoopathy / backbone-tracker.coffee
Last active December 26, 2015 06:19
Easily, declaratively, track backbone events.
define [
'underscore'
'backbone'
], (
_
Backbone
) ->
oldDelegateEvents = Backbone.View.prototype.delegateEvents
@mohitmayank
mohitmayank / mixpanel-amd-main.js
Last active December 20, 2015 16:38
AMD Mixpanel 2.2 Javascript Load Snippet
/*global require*/
'use strict';
require.config({
paths: {
'mixpanel' : '//cdn.mxpnl.com/libs/mixpanel-2.2.min',
},
shim: {
mixpanel: {
@ryanflorence
ryanflorence / static_server.js
Last active April 26, 2024 16:18
Node.JS static file web server. Put it in your path to fire up servers in any directory, takes an optional port argument.
var http = require("http"),
url = require("url"),
path = require("path"),
fs = require("fs")
port = process.argv[2] || 8888;
http.createServer(function(request, response) {
var uri = url.parse(request.url).pathname
, filename = path.join(process.cwd(), uri);