Skip to content

Instantly share code, notes, and snippets.

Avatar

Tim Akinbo takinbo

View GitHub Profile
View gist:430017
#! /bin/sh
### BEGIN INIT INFO
# Provides: mongodb
# Required-Start: $all
# Required-Stop: $all
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts the mongodb data-store
# Description: starts mongodb using start-stop-daemon
@takinbo
takinbo / diffbot.py
Created May 19, 2012 — forked from david-torres/diffbot.py
Simple Python interface for Diffbot API
View diffbot.py
import requests
import json
class Diffbot(object):
"""
A simple Python interface for the Diffbot api.
Relies on the Requests library - python-requests.org
Usage:
@takinbo
takinbo / paginated_collection.js
Created Jul 25, 2011 — forked from io41/paginated_collection.js
Pagination with Backbone.js & django-tastypie
View paginated_collection.js
// includes bindings for fetching/fetched
var PaginatedCollection = Backbone.Collection.extend({
initialize: function() {
_.bindAll(this, 'parse', 'url', 'pageInfo', 'nextPage', 'previousPage', 'filtrate', 'sort_by');
typeof(options) != 'undefined' || (options = {});
typeof(this.limit) != 'undefined' || (this.limit = 20);
typeof(this.offset) != 'undefined' || (this.offset = 0);
typeof(this.filter_options) != 'undefined' || (this.filter_options = {});
typeof(this.sort_field) != 'undefined' || (this.sort_field = '');
You can’t perform that action at this time.