Skip to content

Instantly share code, notes, and snippets.

@freenerd
freenerd / install.sh
Last active April 18, 2016 17:03 — forked from springmeyer/install.sh
Install osmium-tool with mason
git clone https://github.com/mapbox/mason.git
export MASON_DIR=$(pwd)/mason
./mason/mason install osmium-tool latest
./mason/mason link osmium-tool latest
ln -s $(pwd)/mason_packages/.link/bin/osmium /usr/bin/osmium
osmium
@freenerd
freenerd / github-file-branch-to-commit.md
Last active August 29, 2015 14:23
GitHub Bookmarklet for Link File to Commit

This is a bookmarklet that transforms a link to a file from going to a branch to the specific current HEAD commit. This allows to keep links consistent, even when files change. This is specifically useful when linking to specific lines (which loose their meaning over time when line numbers change).

This is the transformation:

Before

https://github.com/mapbox/mapbox.js/blob/mb-pages/package.json#L25

After

https://github.com/mapbox/mapbox.js/blob/e13cd8b00072fc208cd4670411292478e0718b91/package.json#L25

@freenerd
freenerd / gist:4d5e525f0b153135252d
Created February 26, 2015 11:55
*.ec2.archive.ubuntu.com dig results
Executed Feb 26th 2015 from Berlin Germany
There are two blocks of resolutions:
ap-northeast-1
ap-southeast-1
ap-southeast-2
sa-east-1
resolve to the same blocks, which geoip points locates in Boston/US.
@freenerd
freenerd / dynamo-capacity.js
Created February 4, 2015 10:38
Sum up provisioned write and read capacity for DynamoDB tables in a region
// to install
// brew install node
// npm install aws-sdk queue-async
// to run
// fill your shell with aws credentials http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html
// node dynamo-capacity.js
var AWS = require('aws-sdk');
var queue = require('queue-async');
### Keybase proof
I hereby claim:
* I am freenerd on github.
* I am freenerd (https://keybase.io/freenerd) on keybase.
* I have a public key whose fingerprint is E317 76D9 B249 C525 6992 FB0E 26A4 0AE6 7143 D483
To claim this, I am signing this object:
@freenerd
freenerd / gist:1362191
Created November 13, 2011 14:57
Traveling South India Sept-Nov 11
this is a copy of the lonely planet thorn tree forum thread here
http://www.lonelyplanet.com/thorntree/thread.jspa?threadID=2110147
------------------------------------------------------------------------------
We started in Mumbai, stayed in Anjali Inn. It's a bit out of town but Raj is
very nice and takes care. A great place to stay and a good base to discover
Mumbai.
We traveled via Tourist Quota on an overnight train to Solapur afterwards. The