Install Homebrew
Install a few things with homebrew:
Notice that some packages give you information at the end, read it carefully. To recall that info use brew info
like this: $ brew info postgresql
$ brew install python --universal
Install Homebrew
Install a few things with homebrew:
Notice that some packages give you information at the end, read it carefully. To recall that info use brew info
like this: $ brew info postgresql
$ brew install python --universal
#!/usr/bin/env python | |
import urllib | |
import httplib2 | |
cert_file = 'e.pem' | |
http = httplib2.Http(disable_ssl_certificate_validation=True) | |
http.add_certificate('', cert_file, domain='') |
#!/usr/bin/env python | |
import urllib | |
import httplib2 | |
cert_file = 'my.pem' | |
http = httplib2.Http(disable_ssl_certificate_validation=True) | |
http.add_certificate('', cert_file, domain='') |
""" | |
This fabric script automates the creation of a virtual environment and a Django | |
project. The result will be virtual environtment with the name of the project. | |
The folder namer where the project code will be placed is specified in | |
SOURCE_DIRECTORY_NAME, a static root folder will be created and settings.py | |
will be updated. | |
""" | |
try: | |
from fabric.api import env, run, local | |
from fabric.context_managers import lcd, prefix |
from django.template.loader_tags import ExtendsNode | |
def get_extends_parent(self, context): | |
""" | |
Patched onto Django's ``ExtendsNode.get_parent`` which is | |
responsible for loading the template to extend from with | |
the ``extends`` template tag. | |
This patch allows the template foo/bar.html to extend | |
foo/bar.html, given that there is another version of it that |
// Lefalet shortcuts for common tile providers - is it worth adding such 1.5kb to Leaflet core? | |
L.TileLayer.Common = L.TileLayer.extend({ | |
initialize: function (options) { | |
L.TileLayer.prototype.initialize.call(this, this.url, options); | |
} | |
}); | |
(function () { | |
import logging | |
logger = logging.getLogger('commerce') | |
class LimitedAdminInlineMixin(object): | |
""" | |
InlineAdmin mixin limiting the selection of related items according to | |
criteria which can depend on the current parent object being edited. | |
A typical use case would be selecting a subset of related items from | |
other inlines, ie. images, to have some relation to other inlines. |
#!/bin/bash | |
# | |
# Install Postgres 9.1, PostGIS and create PostGIS template on a clean Ubuntu 11.10 Oneiric Ocelot box | |
# http://wildfish.com | |
# add the ubuntu gis ppa | |
sudo apt-get -y install python-software-properties | |
sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable | |
sudo apt-get update |
if not hasattr(ForeignModel, "tags"): | |
t = TaggableManager() | |
t.contribute_to_class(ForeignModel, "tags") |