Skip to content

Instantly share code, notes, and snippets.

@dxb
dxb / gist:5299930
Created April 3, 2013 10:01
deminify css
sed -ri 's/}/}\n/g' commons_m1b.css
@dxb
dxb / paginated_collection.js
Created June 21, 2012 14:29 — forked from io41/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) {