Skip to content

Instantly share code, notes, and snippets.

View tauren's full-sized avatar

Tauren Mills tauren

View GitHub Profile
@adamloving
adamloving / watcher.js
Created October 13, 2011 20:43
Node.js CoffeeScript, Jade, and Stylus compiler (watches filesystem for changes)
var OUTPUT_JS_FILENAME = '../media/partner/js/widgets.js'
var OUTPUT_CSS_FILENAME = '../media/partner/css/widgets.css'
var OUTPUT_HTML_PATH = 'templates'
var fs = require('fs')
var jade = require('jade')
var stylus = require('stylus');
var cs = require('coffee-script');
var watch = require('watch');
@io41
io41 / paginated_collection.js
Created February 22, 2011 10:10 — forked from zerowidth/paginated_collection.js
Pagination with Backbone.js
// includes bindings for fetching/fetched
var PaginatedCollection = Backbone.Collection.extend({
initialize: function() {
_.bindAll(this, 'parse', 'url', 'pageInfo', 'nextPage', 'previousPage');
typeof(options) != 'undefined' || (options = {});
this.page = 1;
typeof(this.perPage) != 'undefined' || (this.perPage = 10);
},
fetch: function(options) {