This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* usage | |
* DIR='public/js' node directory-size.js | |
* => "size of public/js is: 12,432 | |
*/ | |
var fs = require('fs'), | |
_ = require('./underscore'); // requires underscore for _.flatten() | |
function format(n) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function r(f){/in/(document.readyState)?setTimeout(r,9,f):f()} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function init(config) { | |
var util = require('app/util') | |
, render = require('client/lib/render') | |
, router = require('client/lib/router') | |
, controllers = config.controllers | |
controllers.forEach(function (c) { | |
require(c) | |
}) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!function ($) { | |
$.ender({ | |
delay: function (n) { | |
var mock = {} | |
, chain = [] | |
, key | |
, $el = $(this) | |
for (key in $el) { | |
if (isFinite(key)) continue | |
!function (key) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var express = require('express') | |
, app = express.createServer() | |
require('./config/routes').initialize(app) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!function (name, definition) { | |
if (typeof define == 'function' && define.amd) define(name, definition) | |
else if (typeof module != 'undefined') module.exports = definition() | |
else this[name] = definition() | |
}('thing', function () { | |
// codes | |
return module | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ender build backbone |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function parallel() { | |
var args = Array.apply(null, arguments) | |
, callback = args.pop() | |
, returns = [] | |
, len = 0 | |
args.forEach(function (el, i) { | |
el(function () { | |
var a = Array.apply(null, arguments) | |
, e = a.shift() | |
if (e) return callback(e) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var connect = require('connect') | |
, app = require('./app') | |
, app2 = require('./app2') | |
connect( | |
connect.vhost('dustindiaz.com', app) | |
, connect.vhost('foobar.dustindiaz.com', app2) | |
).listen(3000) |
NewerOlder