- download the Natural Earth 1:10m Time Zone Data (GeoJSON available from CartoDB)
- run
topojson --post-quantization 1e3 --simplify 1e-5 --out timezones.json -- ne_10m_time_zones.geojson
The result is this 181 KB timezones.json
(36 KB with gzip)
topojson --post-quantization 1e3 --simplify 1e-5 --out timezones.json -- ne_10m_time_zones.geojson
The result is this 181 KB timezones.json
(36 KB with gzip)
/node_modules/ | |
bundle.js |
git config --global alias.tidy '!for r in `git remote`; do git remote prune $r; done && git branch --merged | grep -v "\*" | xargs -n 1 git branch -d' |
This example is a slight tweak on the best-practices example for working with Go modules as development dependencies.
The downside of the existing example is that someone who git clone
s your module to make a contribution, would not be able to run go generate
(without extra work).
$ go generate
painkiller.go:5: running "stringer": exec: "stringer": executable file not found in $PATH
/node_modules/ | |
bundle.js |
/** | |
* 1. Go to http://labs.strava.com/gpx-to-route/ | |
* 2. Enter a Strava activity URL | |
* 3. Run this snippet | |
*/ | |
map.eachLayer(layer => { | |
if (layer.getLatLngs) { | |
const coordinates = layer.getLatLngs().map(latLng => { | |
return [latLng.lng, latLng.lat]; | |
}); |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Test Promise.resolve() in a Worker</title> | |
</head> | |
<body> | |
This is a simple smoke test for <code>Promise.resolve()</code> in a Worker. | |
You should see an alert telling you if things worked or not. | |
<script src="./main.js"></script> |
import java.util.Arrays; | |
import java.util.List; | |
import org.mozilla.javascript.Context; | |
import org.mozilla.javascript.Function; | |
import org.mozilla.javascript.Scriptable; | |
import org.mozilla.javascript.commonjs.module.Require; | |
import org.mozilla.javascript.tools.shell.Global; | |
The purpose of this style guide is to suggest formatting conventions for AngularJS modules that result in readible, maintainable, and lint free code (see the linter configurations for JSHint and gjslint.py.
Typically, an AngularJS application would be structured with many modules in separate files. The example below shows a monolithic module to illustrate the formatting conventions for various module methods.
angular.module('module.name', [
#!/bin/bash | |
set -o errexit | |
# This script gives you git bash completion and a minimal | |
# prompt displaying the branch name. | |
PROFILE="" | |
if [ -f "$HOME/.bashrc" ]; then | |
PROFILE="$HOME/.bashrc" | |
elif [ -f "$HOME/.bash_profile" ]; then |