Skip to content

Instantly share code, notes, and snippets.

View TimJMartin's full-sized avatar

Tim Martin TimJMartin

  • Ordnance Survey
View GitHub Profile
@TimJMartin
TimJMartin / gist:3e47bfa02add8556fbc4
Last active August 29, 2015 14:06
EC2 Ubuntu Server Setup
Installing NodeJS
http://blog.izs.me/post/87525128203/how-to-install-node-js-and-npm-on-ubuntu-14-04
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs
Install Unzip
sudo apt-get install unzip
@TimJMartin
TimJMartin / AddressBase Premium GAWK Split
Last active August 29, 2015 14:05
AddressBase Premium GAWK Split CSV Files code
#-------------------------------------------------------------------------------
# Name: `AddressBase Premium GAWK Script
# Purpose: `This code is to be used along side the Getting Started Guide
# which explains the process to use GAWK to split the CSV files
# by record identifier.
# Created: `12/08/2014
# Copyright: `Crown Copyright (c) Ordnance Survey 2014
# Licence: `THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
@TimJMartin
TimJMartin / AddressBase Premium Lookup table SQL
Last active August 29, 2015 14:05
AddressBase Premium Lookup table SQL
#-------------------------------------------------------------------------------
# Name: `AddressBase Premium Lookup Table SQL
# Purpose: `This SQL code can be used to create a new lookup table which contains
# the core attributes of AddressBase Premium. This code will work if
# the user has the same table names/structure as described in the Getting
# Started Guide found on the AddressBase Premium product page.
# Created: `12/08/2014
# Copyright: `Crown Copyright (c) Ordnance Survey 2014
# Licence: `THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@TimJMartin
TimJMartin / AddressBase Premium CSV Splitter Python Script
Last active June 7, 2016 11:45
AddressBase Premium CSV Splitter Python Script
#!/usr/bin/env python
"""
PREREQUISITE
Python 2.7 - this script has only been tested against Python 2.7
SYNOPSIS
To run script: python AddressBasePremium_RecordSplitter.py
@TimJMartin
TimJMartin / AddressBase Premium Create Tables SQL
Last active August 29, 2015 14:05
AddressBase Premium Create Tables SQL
#-------------------------------------------------------------------------------
# Name: `AddressBase Premium Create Table SQL
# Purpose: `This SQL code is to be used along side the Getting Started Guide
# to setup the AddressBase Premium tables within a database
# Created: `12/08/2014
# Copyright: `Crown Copyright (c) Ordnance Survey 2014
# Licence: `THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE