Transcribed for archival purposes.
an interview with Brian Taylor - by Steve Ogden - Nov 2011
OGDEN:
Did Rustboy fall victim to Hollywood’s notorious “Development Hell”, or to “One-Man Show Fatigue Syndrome”? (Or a combination?)
Transcribed for archival purposes.
OGDEN:
Did Rustboy fall victim to Hollywood’s notorious “Development Hell”, or to “One-Man Show Fatigue Syndrome”? (Or a combination?)
trie-based siwtch: | |
match(arg)({ | |
'this': () => console.log('this'), | |
'that': () => console.log('this'), | |
})(default) | |
match(arg)( |
var domready = require('domready') | |
, bean = require('bean') // events | |
, bonzo = require('bonzo') // DOM wrapper/manipulation | |
, request = require('superagent/superagent') | |
, qwery = require('qwery') // css selectors | |
, slice = Array.prototype.slice; | |
// Attach events API to the prototype of DOM wrapper: | |
var aug = {}; | |
['on', 'off', 'one', 'add', 'fire', 'clone'].forEach(function (k) { |
describe( "Video model", function(){ | |
var MOCK_GET_DATA = { | |
channelName: "tgndeveloperedu", | |
commentCount: 0, | |
defaultOrder: 0, | |
dislikeCount: 0, | |
facebookCount: "0", | |
googleCount: "0", | |
likeCount: 0, |
{ | |
"name": "test" | |
, "version": "0.0.1" | |
, "description": "mocha" | |
, "keywords": ["test", "tutorial"] | |
, "author": "skw" | |
, "main": "index" | |
, "engines": { "node": "*" } | |
, "scripts": { | |
"test": "make test" |
/*jshint node:true*/ | |
'use strict'; | |
var path = require('path'), | |
url = require('url'), | |
when = require('when'), | |
ffs = require('final-fs'); | |
var reworkRecompile = function (cssPath, reworkPath, doRework) { | |
return ffs.readFile(reworkPath, {encoding: 'utf-8'}) |
git commit -am "$*" && git push origin master |
// | |
// Box-sizing mixin | |
// | |
box-sizing($boxmodel) | |
-webkit-box-sizing $boxmodel | |
-moz-box-sizing $boxmodel | |
box-sizing $boxmodel | |
/*! normalize.stylus, stylus port of normalize.css v2.1.2 | MIT License | git.io/normalize */ |
# Quick hack of regular expressions to convert twitter bootstrap from LESS to Stylus | |
fs = require 'fs' | |
less2stylus = (string) -> | |
string = string | |
.replace(/^(\ *)(.+)\ +\{\ *\n?\ */mg, "$1$2\n$1 ") # remove opening brackets | |
.replace(/^(\ *)([^\ \n]+)\ +\{\ *\n?\ */mg, "$1$2\n$1 ") # remove opening brackets | |
.replace(/\ *\{\ *\n*/g, "\n") # remove opening brackets again (some random cases I'm too lazy to think through) | |
.replace(/\ *\}\ *\n*/g, "\n") # remove closing brackets |
# get template on the fly | |
Handlebars.getTemplate = (name)-> | |
if Handlebars.templates is undefined or Handlebars.templates[name] is undefined | |
$.ajax( | |
url: "/templates/" + name | |
success: (data) -> | |
Handlebars.templates = {} if Handlebars.templates is undefined | |
Handlebars.templates[name] = Handlebars.compile(data) | |
error: (xhr, options, err) -> | |
console.log xhr.status |