Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.
Ctrl+C | copy current line (if no selection) |
Ctrl+X | cut current line (if no selection) |
Ctrl+⇧+K | delete line |
Ctrl+↩ | insert line after |
#!/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 |
from fabric.api import * | |
""" | |
Base configuration | |
""" | |
env.project_name = '$(project)' | |
env.database_password = '$(db_password)' | |
env.site_media_prefix = "site_media" | |
env.admin_media_prefix = "admin_media" | |
env.newsapps_media_prefix = "na_media" |
[program:gunicorn] | |
command=/bin/gunicorn -w 4 myapp:app | |
environment=MY_ENV=/var/null | |
user=www-data |
#!/bin/bash | |
### BEGIN INIT INFO | |
# Provides: Django EC2 server | |
# Required-Start: networking | |
# Required-Stop: networking | |
# Default-Start: 3 5 | |
# Default-Stop: 0 1 2 6 | |
# Short-Description: Django server management script | |
# Description: Django server management script | |
### END INIT INFO |
# | |
# install Geoserver on Ubuntu Maverick 10.10 | |
# note: Geoserver is proxied through apache so port 8080 is not used | |
# | |
# @spara 11/15/10 | |
# | |
# setup sources | |
sudo sh -c "echo ' ' >> /etc/apt/sources.list" | |
sudo sh -c "echo 'deb http://us.archive.ubuntu.com/ubuntu/ maverick multiverse' >> /etc/apt/sources.list" |
Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.
Ctrl+C | copy current line (if no selection) |
Ctrl+X | cut current line (if no selection) |
Ctrl+⇧+K | delete line |
Ctrl+↩ | insert line after |
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: supervisord | |
# Required-Start: $remote_fs | |
# Required-Stop: $remote_fs | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Example initscript | |
# Description: This file should be used to construct scripts to be | |
# placed in /etc/init.d. |
sudo apt-get install build-essential postgresql-9.1 postgresql-server-dev-9.1 libxml2-dev proj libjson0-dev xsltproc docbook-xsl docbook-mathml gettext postgresql-contrib-9.1 pgadmin3 | |
sudo apt-add-repository ppa:olivier-berten/geo | |
sudo apt-get update | |
sudo apt-get install libgdal-dev | |
# Its looks like: | |
# $ gdal-config --version | |
# 1.9.0 | |
# $ geos-config --version |
L.TileLayer.TileJSON = L.TileLayer.Canvas.extend({ | |
options: { | |
debug: false | |
}, | |
tileSize: 256, | |
initialize: function (options) { | |
L.Util.setOptions(this, options); |
from redistricting.apps.features.models import CensusBlock, CensusTract, CensusCounty, DataBlock | |
from redistricting.utils import gmerc | |
from django.http import HttpResponse, Http404, HttpResponseForbidden | |
from django.contrib.gis.geos import GEOSGeometry | |
from django.shortcuts import render_to_response | |
from django.template.loader import render_to_string | |
from django.template import RequestContext |