Skip to content

Instantly share code, notes, and snippets.

@mthh
mthh / .block
Last active March 31, 2017 23:25 — forked from mbostock/.block
Natural Earth II
license: gpl-3.0
height: 960
border: no
@mthh
mthh / .block
Last active April 5, 2017 20:24
Hatano AEA projection
license: gpl-3.0
border: no
@mthh
mthh / .block
Last active April 5, 2017 20:16
Winkel 1 projection
license: gpl-3.0
border: no
"use strict";
var sin = Math.sin,
cos = Math.cos,
tan = Math.tan,
acos = Math.acos,
asin = Math.asin,
atan2 = Math.atan2,
PI = Math.PI;
var ISEA_PLANE = Symbol('ISEA_PLANE'),
@mthh
mthh / .block
Last active April 5, 2017 20:19
Winkel 2 projection
license: gpl-3.0
border: no
@mthh
mthh / SutHodClip.rs
Last active April 6, 2017 21:08
Sutherland-Hodgman clipping algorithm in rust
// Sutherland-Hodgman clipping algorithm, translated naively from :
// http://rosettacode.org/wiki/Sutherland-Hodgman_polygon_clipping#Ruby
// and posted back on :
// http://rosettacode.org/wiki/Sutherland-Hodgman_polygon_clipping#Rust
#[derive(Debug,Clone)]
struct Point {
x: f64,
y: f64
}
# -*- coding: utf-8 -*-
from selenium import webdriver
import time
import geopandas as gpd
try:
import ujson as json
except ImportError:
import json
def get_proj4_text(driver):
@mthh
mthh / .block
Last active June 1, 2017 11:04
Radar Chart d3 v4
height: 600
license: mit
extern crate osmpbfreader;
extern crate geojson;
extern crate serde_json;
extern crate regex;
#[macro_use] extern crate lazy_static;
use osmpbfreader::{OsmPbfReader, OsmObj, Tags};
use geojson::*;
use std::io::Write;
use std::collections::HashMap;
var gulp = require('gulp');
var rollup = require('rollup');
var babel = require('rollup-plugin-babel');
var rename = require('gulp-rename');
var header = require('gulp-header');
var concat = require('gulp-concat');
var uglify = require('gulp-uglify');
var sourcemaps = require('gulp-sourcemaps');
var uuid = require('uuid/v4');
var glob = require("glob");