Author: Sean Gillies Version: 1.0
This document describes a GeoJSON-like protocol for geo-spatial (GIS) vector data.
#!/bin/bash | |
# This way you can customize which branches should be skipped when | |
# prepending commit message. | |
if [ -z "$BRANCHES_TO_SKIP" ]; then | |
BRANCHES_TO_SKIP=(master develop test) | |
fi | |
BRANCH_NAME=$(git symbolic-ref --short HEAD) | |
BRANCH_NAME="${BRANCH_NAME##*/}" |
>>> import mapnik | |
>>> m = mapnik.Map(256,256) | |
>>> map_string = ''' | |
... <Map> | |
... <Layer name="layer" srs="+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs"> | |
... <Datasource> | |
... <Parameter name="inline"> | |
... x,y,name | |
... 0,0,foo | |
... 1,1,foo |
import base64 | |
import pickle | |
from django.contrib.sessions.models import Session | |
from django.utils.encoding import force_unicode | |
def decode_session_data(session_key): | |
"""Decode the data in a session object stored under ``session_key``. |
# to generate your dhparam.pem file, run in the terminal | |
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
This is a collection of information on PostgreSQL and PostGIS for what I tend to use most often.
# | |
# you might want to run this first: | |
# | |
# pip install pyproj mercantile | |
# | |
from pyproj import Proj | |
import mercantile | |
mercator = Proj('+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +over +no_defs') | |
albers = Proj('+proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=37.5 +lon_0=-96 +x_0=0 +y_0=0 +ellps=sphere +towgs84=0,0,0,0,0,0,0 +units=m +no_defs +nadgrids=@null') |
# Source: https://gist.github.com/najibninaba/5062153 | |
# | |
# This script installs Boto in Pythonista. Run this script in your root folder and it will download and install Boto along with its | |
# dependencies. To use Boto, be sure to add boto-module in your sys.path before importing boto like so: | |
# import sys; sys.path.append('boto-module') | |
# import boto.ec2 | |
# | |
# Credits: | |
# This script is inspired by omz's Evernote Installer script: https://gist.github.com/omz/5048588 | |
# |