Skip to content

Instantly share code, notes, and snippets.

//change express render engine to mustache
var express = require('express'),
app = express.createServer(),
port = 1234,
mustache = require('mustache');
app.register('.html', {
render: function(str, options){
return mustache.to_html(str, options.locals);
}
@mrdoob
mrdoob / RequestAnimationFrame.js
Created February 22, 2011 14:50
Provides requestAnimationFrame in a cross browser way.
/**
* Provides requestAnimationFrame in a cross browser way.
* @author paulirish / http://paulirish.com/
*/
if ( !window.requestAnimationFrame ) {
window.requestAnimationFrame = ( function() {
return window.webkitRequestAnimationFrame ||