Skip to content

Instantly share code, notes, and snippets.

m = __import__('server_settings.internal.ljworld.standard',globals(),locals(),['*'],-1)
for k in dir(m):
if k.isupper() and not k.startswith('_'):
locals()[k] = getattr(m,k)
print SITE_ID
#!/usr/bin/env python
import mailbox
import os
import sys
import time
my_maildir = 'Maildir'
expire_dates = {
@akrito
akrito / user.js
Created September 22, 2009 05:20
adding zoom to surf
// Zoom text
var zoom = 1;
document.addEventListener(
'keydown',
function(e) {
if(e.keyCode == 187 && !e.shiftKey && e.ctrlKey && !e.altKey) {
zoom = zoom + .1
window.document.body.style.zoom = zoom;
};
if(e.keyCode == 189 && !e.shiftKey && e.ctrlKey && !e.altKey) {
@akrito
akrito / .tmux.conf
Created October 8, 2009 18:49
tmux conf
set-option -g default-command "exec /bin/bash"
# Bindings
set-option -g prefix C-a
bind-key C-a last-window
# Status
set-option -g status-left ""
set-option -g status-right "#S"
#set-option -g status-right "%H:%M %d %b"

Veggie In Lawrence

Places to eat in Lawrence for vegans (and hence vegetarians).

Known Good

  • Encore
/home/alex/v/ellington/src/django/django/middleware/cache.py(116)process_request()
114 """
115 if self.cache_anonymous_only:
--> 116 assert hasattr(request, 'user'), "The Django cache middleware with CACHE_MIDDLEWARE_ANONYMOUS_ONLY=True requires authentication middleware to be installed. Edit your MIDDLEWARE_CLASSES setting to insert 'django.contrib.auth.middleware.AuthenticationMiddleware' before the CacheMiddleware."
117
118 if not request.method in ('GET', 'HEAD') or request.GET:
/home/alex/v/ellington/src/django/django/contrib/auth/middleware.py(9)__get__()
7 if not hasattr(request, '_cached_user'):
8 from django.contrib.auth import get_user
try:
from ipdb import Pdb
except ImportError:
from pdb import Pdb
import sys
class PdbTraceback(object):
"""
Drops into pdb or ipdb if a view raises an exception. Should be the last
thing in MIDDLEWARE_CLASSES
"""
class C(B):
def __init__(self, *args, **kwargs):
B.__init__(self, *args, **kwargs)
def __init__(self, *args, **kwargs):
super(C, self).__init__(*args, **kwargs)
def __init__(self, *args, **kwargs):
super(type(self), self).__init__(*args, **kwargs)
http://pinboard.in/u:blturner
http://pinboard.in/u:akrito/
http://pinboard.in/u:jacobian/
http://pinboard.in/u:nathan/
http://pinboard.in/u:jefftriplett/
http://pinboard.in/u:adamfast/
http://pinboard.in/u:daniellindsley/
http://pinboard.in/u:blturner/
http://pinboard.in/u:mcroydon/
@akrito
akrito / gist:877692
Created March 19, 2011 18:36
Rdio force close on MIUI 1.3.18
device_model:supersonic
build_version:1.3.18
condition:1
processName:com.rdio.android.ui
pid:602
uid:10046
tag:null
shortMsg:java.lang.RuntimeException
longMsg:java.lang.RuntimeException: <internal>: You must supply a layout_height attribute.
stackTrace:java.lang.RuntimeException: <internal>: You must supply a layout_height attribute.