Skip to content

Instantly share code, notes, and snippets.

@spara
spara / opengeo-suite-install.sh
Created March 22, 2011 20:07
OpenGeo Suite installer for Ubuntu with Apache proxy configured
#!/bin/bash
# setup repository
sudo wget -qO- http://apt.opengeo.org/gpg.key | apt-key add -
sudo chmod 655 /etc/apt/sources.list
sudo echo "deb http://apt.opengeo.org/ubuntu lucid main" >> /etc/apt/sources.list
sudo chmod 644 /etc/apt/sources.list
sudo apt-get update
# install opengeo suite
@sgillies
sgillies / geo_interface.rst
Last active October 30, 2024 10:58
A Python Protocol for Geospatial Data

Author: Sean Gillies Version: 1.0

Abstract

This document describes a GeoJSON-like protocol for geo-spatial (GIS) vector data.

Introduction

@kalxas
kalxas / buildliveinchroot.sh
Created May 30, 2012 19:23 — forked from wildintellect/buildliveinchroot.sh
OSGeo Live chroot build
#LiveCD on the commandline
#https://help.ubuntu.com/community/LiveCDCustomization
#DIR=`dirname ${0}`
#VERSION=`cat "$DIR"/../VERSION.txt`
VERSION="6.0beta6"
PACKAGE_NAME="osgeo-live"
ISO_NAME="${PACKAGE_NAME}-${VERSION}"
sudo apt-get install squashfs-tools genisoimage
@cspanring
cspanring / pip-install-gdal.md
Last active August 24, 2024 12:07
Installing GDAL in a Python virtual environment

Installing GDAL in a Python virtual environment

Get gdal development libraries:

$ sudo apt-add-repository ppa:ubuntugis/ubuntugis-unstable
$ sudo apt-get update
$ sudo apt-get install libgdal-dev

Create and activate a virtual environment:

@postrational
postrational / gunicorn_start.bash
Last active April 4, 2024 12:48
Example of how to set up Django on Nginx with Gunicorn and supervisordhttp://michal.karzynski.pl/blog/2013/06/09/django-nginx-gunicorn-virtualenv-supervisor/
#!/bin/bash
NAME="hello_app" # Name of the application
DJANGODIR=/webapps/hello_django/hello # Django project directory
SOCKFILE=/webapps/hello_django/run/gunicorn.sock # we will communicte using this unix socket
USER=hello # the user to run as
GROUP=webapps # the group to run as
NUM_WORKERS=3 # how many worker processes should Gunicorn spawn
DJANGO_SETTINGS_MODULE=hello.settings # which settings file should Django use
DJANGO_WSGI_MODULE=hello.wsgi # WSGI module name
@apetrone
apetrone / winpath_startup.py
Last active May 14, 2022 14:51
Set win32 environment variable on startup via python
# This must be run with Administrator privileges in order to set environment variables
# http://code.activestate.com/recipes/55993/, Wolfgang Strobl
import _winreg
import sys
import traceback
import win32gui
import win32api
# this ensures that changes propagate immediately
@jsyeo
jsyeo / install_dist_pip.bat
Last active February 15, 2022 05:10
Batch file to create virtualenv, download and install distribute + pip on Windows 7 machines (Python 3.3)
cd %USERPROFILE%
REM create the venv
C:\Python33\python.exe C:\Python33\Tools\Scripts\pyvenv.py %USERPROFILE%\venv
REM download get-pip.py and distribute_setup.py
powershell.exe -Command (new-object System.Net.WebClient).DownloadFile('https://raw.github.com/pypa/pip/master/contrib/get-pip.py','%USERPROFILE%\get-pip.py')
@cecepm
cecepm / postgis_administration.md
Last active March 28, 2016 15:40
PostgreSQL cheatsheet

PostGIS Administration

Create Database with Spatial Support (PostGIS v2.0)

Connect to your database, example using psql command line

\connect mydb

then install extensions

# code used for the following map : http://datagistips.blogspot.fr/
library(raster)
library(rgdal)
library(rgeos)
clc = raster("DATAS/CLC12_RIDF_RGF.tif") # here is the 200m Corine Land Cover GeoTiff
reg = readOGR("DATAS", "idf_geofla") # ile de france GéoFla Departments
# RECLASS
@francoisromain
francoisromain / project-create.sh
Last active June 14, 2024 09:55
A bash script to create a Git post-receive hook to deploy after a Git push
#!/bin/bash
# source: https://gist.github.com/francoisromain/58cabf43c2977e48ef0804848dee46c3
# and another script to delete the directories created by this script
# project-delete.sh: https://gist.github.com/francoisromain/e28069c18ebe8f3244f8e4bf2af6b2cb
# Call this file with `bash ./project-create.sh project-name`
# - project-name is mandatory
# This will creates 4 directories and a git `post-receive` hook.