Skip to content

Instantly share code, notes, and snippets.

View djq's full-sized avatar

David Quinn djq

  • Google
  • Dublin
View GitHub Profile
@djq
djq / tree.sh
Created July 10, 2013 19:34
Tree command for OSX
#!/bin/sh
#######################################################
# UNIX TREE #
# Version: 2.3 #
# File: ~/apps/tree/tree.sh #
# #
# Displays Structure of Directory Hierarchy #
# ------------------------------------------------- #
# This tiny script uses "ls", "grep", and "sed" #
# in a single command to show the nesting of #
@djq
djq / django_talk_bos.md
Last active December 19, 2015 02:39
django meetup boston
@djq
djq / voronoi.sql
Last active October 11, 2021 22:23
Updated SQL function to create Voronoi diagrams to work with PostGIS 2.0. Original code here: http://punkish.org/Voronoi-Diagrams-In-PostGIS
/*
Feb 5, 2013
Original source from here: http://punkish.org/Voronoi-Diagrams-In-PostGIS
Updated old PostGIS function names to work with PostGIS2.0 (buffer, intersect, intersection and srid)
-djq
This function uses the deldir library in R to generate voronoi polygons for
an input set of points in a PostGIS table.
Original function by Mike Leahy mgleahy at alumni.uwaterloo.ca
Stop number Name without locality Locality Locality number Code Name NaPTAN stop class NaPTANId Easting Northing
1 Pearse Street (Pearse Avenue) Sallynoggin E0825024 ->NE2 Stop No. 3234 BCT 8250DB003234 724091 726427
1 Pearse Street (Pearse Avenue) Sallynoggin E0825024 ->SW1 Stop No. 3210 BCT 8250DB003210 724087 726412
2 Lr. Drumcondra Road Drumcondra (Dublin) E0822021 1 Drumcondra Road Lower BCT 825000101 715947 736197
2 Lr. Drumcondra Road Drumcondra (Dublin) E0822021 2 Drumcondra Road Lower BCT 8250B1001201 715929 736199
3 Clontarf Road Junction Strandville Avenu Clontarf E0822038 1 Stop No. 1741 BCT 8220DB001741 718428 736222
4 College Green Dublin City South E0822091 1 Taxi Rank TXR 8220TR000078 715797 734107
4 College Green Dublin City South E0822091 2 Stop No. 1359 BCT 8220DB001359 715770 734095
4 College Green Dublin City South E0822091 3 College Green BCT 825000157 715769 734095
4 College Green Dublin City South E0822091 4 Stop No. 4522 BCT 8220DB004522 715821 734081
@djq
djq / gist:2846196
Last active September 27, 2022 04:12 — forked from rolo/gist:1481128
Install Postgres 9.1, PostGIS 2.0.2 and PG Routing on Ubuntu 12.04 (Precise Pangolin)
#!/bin/bash
#
# Install Postgres 9.1, PostGIS 2.0 and pgRouting on a clean Ubuntu 12.04 install (64 bit)
# updated to PostGIS 2.0.1
# basics
apt-get install python-software-properties
apt-add-repository ppa:sharpie/for-science # To get GEOS 3.3.3
# install the following pacakages