Skip to content

Instantly share code, notes, and snippets.

View montylounge's full-sized avatar

Kevin montylounge

View GitHub Profile
All curl downloads occurred in ~/Sources.
Get PIL::
curl -O http://effbot.org/media/downloads/Imaging-1.1.6.tar.gz
tar zxvf Imaging-1.1.6.tar.gz
cd Imaging-1.1.6
python setup.py build
Notice once the build has finished you will see the following::
"""
A drop in replacement for {% url %} that generates relative paths.
Just put {% load relative_urls %} at the top of your template, and all {% url %}
calls will generate paths relative to the current request path.
For example, when reversing a URL that points to ``/admin/foo/`` on the page
``/admin/bar/``, it will output ``../foo/``.
"""
# Copypasta of Django's runserver management command, modified to use gunicorn http://github.com/benoitc/gunicorn
import sys
from optparse import make_option
import django
from django.core.management.base import BaseCommand, CommandError
from django.conf import settings
from django.utils import translation
# Converting an HG repo to Git with commit history (via: http://tinyurl.com/yajlk9x)
$ git clone git://repo.or.cz/fast-export.git
$ mkdir new_git_repo
$ cd new_git_repo
$ git init
$ /path/to/hg-fast-export.sh -r /path/to/hg_repo
$ git checkout HEAD
#!/usr/bin/env/python
"""
gdocs2s3.py
Automatically downloads all of your Google Docs and backs them up to Amazon S3
"""
"""
Copyright (c) 2010 Scott Rubin apreche@frontrowcrew.com
=====================
Readernaut Public API
=====================
1.0 (pre-release)
=================
Reader Books
------------
"""
This fabric file makes setting up and deploying a django application much
easier, but it does make a few assumptions. Namely that you're using Git,
Apache and mod_wsgi and your using Debian or Ubuntu. Also you should have
Django installed on your local machine and SSH installed on both the local
machine and any servers you want to deploy to.
_note that I've used the name project_name throughout this example. Replace
this with whatever your project is called._
#!/usr/bin/env python
from __future__ import with_statement # needed for python 2.5
from fabric.api import *
from fabric.contrib.console import confirm
# ================================================================
# NOTE:
# using this fabfile expects that you have the python utility
# fabric installed locally, ssh access to reamea.com, and your
# ssh public key associated with the account 'mboza@reamea.com'
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
fabfile for Django
------------------
see http://morethanseven.net/2009/07/27/fabric-django-git-apache-mod_wsgi-virtualenv-and-p/
modified for fabric 0.9/1.0 by Hraban (fiëé visuëlle)
several additions, corrections and customizations, too
#!/usr/bin/env python
"""
Run Django Tests with full test coverage
This starts coverage early enough to get all of the model loading &
other startup code. It also allows you to change the output location
from $PROJECT_ROOT/coverage by setting the $TEST_COVERAGE_OUTPUT_DIR
environmental variable.
"""