Skip to content

Instantly share code, notes, and snippets.

View hamishcampbell's full-sized avatar
🚀
rockets

Hamish Campbell hamishcampbell

🚀
rockets
View GitHub Profile
@hamishcampbell
hamishcampbell / SilverStripeBuildUpdater.sh
Created March 6, 2011 22:11
Simple Bash script to automate updating of SilverStripe build submodules.
branches=( master 2.4 )
modules=( sapphire cms themes )
for branch in "${branches[@]}"
do
echo "================"
echo "Updating $branch"
echo "----------------"
echo " * pull"
git pull 1> /dev/null
@hamishcampbell
hamishcampbell / gist:837545
Created February 21, 2011 19:18
Example statement to determine linear chainage from line segment (PostgreSQL + PostGIS)
/**
* @lon = longitude of selected point
* @lat = latitude of selected point
*/
SELECT
name,
CAST(
offset +
ST_Length(the_geom) * ST_Line_Locate_Point(the_geom, ST_Point(@lon, @lat))
) AS Double)
@hamishcampbell
hamishcampbell / SoT2015.md
Created August 7, 2015 23:03
SoT Hackfest API Suff

SoT Hackfest Auckland 2015

Welcome! This is a brief, opinionated guide to getting started building a browser-based web app with RESTful APIs. The intention is to provide a starting point for building stuff for SoT Hackfest 2015, and provides just one approach. It is not the only approach, nor is it necessarily the best approach for a production system, but it's a good way to jumpstart your hack.

Useful references

@hamishcampbell
hamishcampbell / keybase.md
Created December 15, 2014 22:38
Keybase proof

Keybase proof

I hereby claim:

  • I am hamishcampbell on github.
  • I am polemic (https://keybase.io/polemic) on keybase.
  • I have a public key whose fingerprint is DAD5 7EEC 292E 8C9E B5DA 3CF8 63D3 ADE1 5625 3865

To claim this, I am signing this object: