Skip to content

Instantly share code, notes, and snippets.

View tomwilsn's full-sized avatar

Tom Wilson tomwilsn

View GitHub Profile
@koudelka
koudelka / gist:f4d07b9d998d723e55a0
Created June 6, 2014 20:52
Possible http status codes module for Elixir Phoenix Web Framework
#
# Would this be useful to Phoenix?
#
# In controllers, it'd be nice to be able to refer to status codes as atoms instead of integers.
#
defmodule Phoenix.Controller.StatusCodes do
@http_status_codes %{
@z4y4ts
z4y4ts / gist:3181380
Created July 26, 2012 10:23
OS X Mountain Lion virtualenvwrapper fix
Install XCode & Command Line Tools
curl -O http://python-distribute.org/distribute_setup.py
sudo python distribute_setup.py
sudo easy_install pip
sudo pip install virtualenvwrapper
@richleland
richleland / settings.py
Created October 29, 2011 11:00
S3BotoStorage subclass for media and static buckets
DEFAULT_FILE_STORAGE = 'storages.backends.s3boto.S3BotoStorage'
STATICFILES_STORAGE = 'path.to.storage.S3StaticStorage'
THUMBNAIL_DEFAULT_STORAGE = 'storages.backends.s3boto.S3BotoStorage'
AWS_ACCESS_KEY_ID = 'YOUR KEY'
AWS_SECRET_ACCESS_KEY = 'YOUR KEY'
AWS_STORAGE_BUCKET_NAME = 'media.YOURSITE.com'
AWS_STATIC_BUCKET_NAME = 'static.YOURSITE.com'
AWS_S3_CUSTOM_DOMAIN = AWS_STORAGE_BUCKET_NAME
AWS_STATIC_CUSTOM_DOMAIN = AWS_STATIC_BUCKET_NAME
STATIC_URL = 'http://%s/' % AWS_STATIC_BUCKET_NAME