Skip to content

Instantly share code, notes, and snippets.

View dgouldin's full-sized avatar

David Gouldin dgouldin

  • Clara Labs
  • San Francisco, CA
View GitHub Profile
@idan
idan / oauthlib_twitter_example.py
Created May 2, 2012 22:50
Requests + OAuth, sample usage
import requests
from requests.auth import OAuth1
url = u'https://api.twitter.com/1/account/settings.json'
client_key = u'...'
client_secret = u'...'
resource_owner_key = u'...'
resource_owner_secret = u'...'
"""
Patches the database wrapper and template engine to throw an exception if a query is executed inside of a template.
In your urls.py, enable it like so:
>>> import monkey
>>> monkey.patch_templates()
"""
import logging
//force redraw for FF hot topic scrolling issue
//longer-term solution here is rework the markup towards more sanity
Collecta.Client.do_hot_topics_redraw = true;
$("#hot_topics").scroll(function(){
console.log("scroll");
//don't be doing this every scroll event,
//that's just a waste of good CPU
if (Collecta.Client.do_hot_topics_redraw === true) {
setTimeout(function() {
console.log("doing redraw");