Skip to content

Instantly share code, notes, and snippets.

View adamloving's full-sized avatar
💭
10x Ninja Rockstar

Adam Loving adamloving

💭
10x Ninja Rockstar
View GitHub Profile
@vicalejuri
vicalejuri / django-crossdomainxhr-middleware.py
Created June 5, 2010 17:47
Middlware to allow's your django server to respond appropriately to cross domain XHR (postMessage html5 API).
import re
from django.utils.text import compress_string
from django.utils.cache import patch_vary_headers
from django import http
try:
import settings
XS_SHARING_ALLOWED_ORIGINS = settings.XS_SHARING_ALLOWED_ORIGINS
@snatchev
snatchev / gist:1316470
Created October 26, 2011 14:08
resque worker devise not eager loading
❷ > QUEUE=* rake resque:work --trace
** Invoke resque:work (first_time)
** Invoke resque:preload (first_time)
** Invoke resque:setup (first_time)
** Execute resque:setup
** Execute resque:preload
rake aborted!
No such file to load -- devise/confirmations_controller
/Users/stefan/.rvm/gems/ruby-1.9.2-p290@my-rails-project/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:306:in `rescue in depend_on'
/Users/stefan/.rvm/gems/ruby-1.9.2-p290@my-rails-project/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:301:in `depend_on'