Skip to content

Instantly share code, notes, and snippets.


Trey Piepmeier trey

View GitHub Profile
trey / Capfile
Created Jul 24, 2008
Capistrano, Ubuntu, Django
View Capfile
set :application, "yoursite_com"
set :user, "you"
set :scm_username, user
set :repository, "{scm_username}/#{application}.git"
set :deploy_to, "/home/#{user}/public_html/#{application}"
set :scm, :git
set :django_location, "/home/#{user}/sources/django/trunk"
set :django_admin_media, "/django/contrib/admin/media"
set :domain, ""
trey / django-vhost.conf
Created Jul 24, 2008
Basic VirtualHosts information for serving Django projects using Apache and mod_python.
View django-vhost.conf
<VirtualHost *:80>
# - If you want to serve media files from the same server, you need to
# define `DocumentRoot` and the extra `Location` for the static folder.
# - If you also want to have your media folder inside your Django project,
# a `public/` folder is probably not a bad idea.
DocumentRoot /home/username/public_html/project_name/public/
trey /
Created Jul 26, 2008
The way to do things post-newformsadmin
trey / gist:2967
Created Jul 28, 2008
How to use Google's AJAX Libraries API to include jQuery.
View gist:2967
<script src="" type="text/javascript"></script>
<script type="text/javascript">google.load("jquery", "1.2.6");</script>
<script src="/js/load.js" type="text/javascript"></script>
View gist:2976
a:link { color: blue; }
a:visited { color: purple; }
a:hover { color: purple; }
a:active { color: red; }
trey / guide.markdown
Created Jul 29, 2008
Markup guide (in Markdown)
View guide.markdown

Markup Guide

Use this to determine what different elements in your markup will look like.

This idea stolen from Dave Shea.

First Level Heading (h1)

Second Level Heading (h2)

trey /
Created Jul 30, 2008
Basic layout for doing a form in Django.
from django import forms
from myapp.models import Mymodel
class MyForm(forms.ModelForm):
class Meta:
trey / gist:3352
Created Jul 30, 2008
I'll learn you how to work, IE 6.
View gist:3352
<!-- Download: -->
<script src="/js/jquery.ifixpng.js" type="text/javascript"></script>
trey / reset.sass
Created Jul 31, 2008
Eric Meyer's reset.css in Sass. Originally by @postpostmodern.
View reset.sass
v2.0 | 20110126
License: none (public domain) */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
trey / gist:5005
Created Aug 12, 2008
Getting Python Imaging Library (PIL) working on Leopard
View gist:5005
sudo port install py25-pil
# In ~/.bash_login
export PYTHONPATH="/opt/local/lib/python2.5/site-packages:$PYTHONPATH"