This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am iainmullan on github. | |
* I am iainmullan (https://keybase.io/iainmullan) on keybase. | |
* I have a public key whose fingerprint is F6F1 22F1 7DE8 D09F E105 9792 65A0 B96A 6C65 8647 | |
To claim this, I am signing this object: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"artist":"Elisa Ambrogio", | |
"title":"Superstitious", | |
"pos":100 | |
}, | |
{ | |
"artist":"Steve Gunn", | |
"title":"Milly's Garden", | |
"pos":99 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Compare version numbers of the format X.Y.Z where X,Y,Z are non-negative integers | |
* Values with less than three parts will be padded out with zeros, eg. "1.1" becomes "1.1.0", "1" becomes "1.0.0" | |
* | |
* @return 1 if $a is greater (a later version) than $b, 0 if $a is equal to $b, -1 if $a is less (an earlier version) than $b | |
* | |
*/ | |
function version_cmp($a, $b) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"artist":"Father John Misty", | |
"title":"Hollywood Forever Cemetery Sings", | |
"pos":200, | |
"spotify_uri":"spotify:track:2as9DMML3RYe4uGiBpTvEm" | |
}, | |
{ | |
"artist":"Lindstr\u00f8m & Christabelle", | |
"title":"Lovesick", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Rough method for calculating a geographical midpoint, given a set of lat/lng pairs. | |
* Assumes the earth is flat. This still gives a good approximation when deal with a small enough area. | |
* (eg. My use case is a handful of pubs in a particular part of town) | |
*/ | |
function geo_midpoint($points) { | |
$lats = array(); | |
$lngs = array(); |