Skip to content

Instantly share code, notes, and snippets.

View alistairjcbrown's full-sized avatar

Alistair Brown alistairjcbrown

View GitHub Profile
@stiucsib86
stiucsib86 / gist:6150321
Created August 4, 2013 13:31
[Google Maps v3] Get Rectangle area with computeArea
var _computeRectangleArea = function(bounds) {
if (!bounds) {
return 0;
}
var sw = bounds.getSouthWest();
var ne = bounds.getNorthEast();
var southWest = new google.maps.LatLng(sw.lat(), sw.lng());
var northEast = new google.maps.LatLng(ne.lat(), ne.lng());
var southEast = new google.maps.LatLng(sw.lat(), ne.lng());
var northWest = new google.maps.LatLng(ne.lat(), sw.lng());
@madrobby
madrobby / gist:9476733
Created March 10, 2014 23:34
Download a single file from a private GitHub repo. You'll need an access token as described in this GitHub Help article: https://help.github.com/articles/creating-an-access-token-for-command-line-use
curl -H 'Authorization: token INSERTACCESSTOKENHERE' -H 'Accept: application/vnd.github.v3.raw' -O -L https://api.github.com/repos/owner/repo/contents/path