Skip to content

Instantly share code, notes, and snippets.

@ns-1m
ns-1m / qgis-nightly-build.sh
Created August 2, 2012 01:37 — forked from dakcarto/qgis-nightly-build.sh
Bash script for local nightly builds of QGIS master branch on Mac OS X Snow Leopard and Lion
#!/bin/bash
# -*- coding: utf-8 -*-
#
# Create QGIS for Mac OS X nightly build from github.com 'master' branch.
# Keep a number of dmg archives of previous builds as backups.
#
# Tested under Lion 10.7.4 and Snow Leopard 10.6.8, **run via sudo**
# Requires same kyngchaos.com framework setup and build environment as per
@ns-1m
ns-1m / sqlite2pg.sh
Created October 27, 2012 04:47 — forked from eclubb/sqlite2pg.sh
Script to import SQLite3 database into PostgreSQL
#!/bin/sh
# This script will migrate schema and data from a SQLite3 database to PostgreSQL.
# Schema translation based on http://stackoverflow.com/a/4581921/1303625.
# Some column types are not handled (e.g blobs).
SQLITE_DB_PATH=$1
PG_DB_NAME=$2
PG_USER_NAME=$3
@ns-1m
ns-1m / gist:4049127
Created November 9, 2012 23:58 — forked from NathanW2/gist:4029400
Print composer
from qgis.core import *
from qgis.gui import *
from PyQt4.QtCore import *
from PyQt4.QtGui import QApplication
from PyQt4.QtXml import *
import sys
import xml.etree.ElementTree as ET
app = QgsApplication([], True)
@ns-1m
ns-1m / install-pygtk.sh
Created November 16, 2012 05:56 — forked from ches/install-pygtk.sh
Install PyGTK via Homebrew and virtualenv
# This LOOKS pretty straightforward, but it took awhile to sort out issues with
# py2cairo and pygobject, so I hope I've saved you some time :-)
#
# This assumes you already subscribe to a nice clean virtualenvwrapper workflow
# -- see https://gist.github.com/771394 if you need advice on getting there.
# There are some optional dependencies omitted, so if you're going to be doing
# heavy development with these libs, you may want to look into them.
#
# We go to some configure option pains to avoid polluting the system-level
# Python, and `brew link`ing Cairo which is keg-only by default.