Skip to content

Instantly share code, notes, and snippets.

@amccloud
amccloud / django.contrib.auth.views.py
Created March 26, 2012 00:18 — forked from bmispelon/django.contrib.auth.views.py
Django's auth using class-based views
# https://code.djangoproject.com/ticket/17209
import urlparse
from django.conf import settings
from django.core.urlresolvers import reverse_lazy
from django.http import HttpResponseRedirect, QueryDict
from django.utils.decorators import method_decorator
from django.utils.http import base36_to_int
from django.utils.translation import ugettext as _
from django.views import generic
@amccloud
amccloud / Vagrantfile.rb
Created March 20, 2012 06:15 — forked from jtimberman/Vagrantfile.rb
Read in the knife.rb configuration to pass into the Vagrant chef-client provisioner
require 'chef'
require 'chef/config'
require 'chef/knife'
current_dir = File.dirname(__FILE__)
Chef::Config.from_file(File.join(current_dir, '.chef', 'knife.rb'))
Vagrant::Config.run do |config|
config.vm.provision :chef_client do |chef|
chef.chef_server_url = Chef::Config[:chef_server_url]