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
#!/usr/bin/env node | |
/* | |
* cat my-features.json | ./simplify.js 0.0001 > my-simplified-features.json | |
*/ | |
'use strict'; | |
var simplify = require('turf-simplify'); | |
var concat = require('concat-stream'); | |
var TOLERANCE = 0.01; |
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
[ | |
{ "name": "foo", "location": [37.8045, -122.402] }, | |
{ "name": "bar", "location": [37.78, -122.391] }, | |
{ "name": "baz", "location": [37.7753, -122.3954] } | |
] |
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
#!/usr/bin/env node | |
/*jslint node:true */ | |
'use strict'; | |
/* | |
* Usage: | |
* ./deploy-slug.js my-cool-git-free-app slug.tgz `heroku auth:token` | |
*/ | |
var fs = require('fs'); |
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
/** | |
* Fix an issue where checkbox questions were stored with the name "undefined" | |
* - Saves the data in the format QUESTION_NAME-ANSWER_NAME | |
* - Removes the undefined keys | |
* | |
* Usage: | |
* $ mongo server:port/database_name -u username -p password fixGaryMultiples.js | |
* | |
*/ |
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
#!/bin/sh | |
/usr/bin/opendiff "$2" "$5" -merge "$1" |
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
$.ajax(create_url, { | |
contentType: 'application/json', | |
dataType: 'json', | |
type: 'POST', | |
data: JSON.stringify(data) | |
}) | |
.done(function(result) { | |
var id = result.surveys[0].id; | |
navigateToSurvey(id); | |
}); |