Skip to content

Instantly share code, notes, and snippets.

var map = L.map('map').setView([3, 3], 5);
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
}).addTo(map);
// Target polygon to be hulled.
const target = turf.polygon([
[[0, 0], [7, 0], [6, 3], [7, 7], [4, 7], [4, 3], [0, 3], [0, 0]]
]);
@dpmcmlxxvi
dpmcmlxxvi / auto-deploy.md
Created July 3, 2016 00:51 — forked from domenic/0-github-actions.md
Auto-deploying built products to gh-pages with Travis

Auto-deploying built products to gh-pages with Travis

This is a set up for projects which want to check in only their source files, but have their gh-pages branch automatically updated with some compiled output every time they push.

Create a compile script

You want a script that does a local compile to e.g. an out/ directory. Let's call this compile.sh for our purposes, but for your project it might be npm build or gulp make-docs or anything similar.

The out/ directory should contain everything you want deployed to gh-pages. That almost always includes an index.html.

@dpmcmlxxvi
dpmcmlxxvi / highlightvalue.m
Last active August 29, 2015 14:27
Example of a custom colormap to highlight a value
%
% Example of a custom colormap to highlight a value
% @author Daniel Pulido <[email protected]>
% @copyright Copyright (c) 2015 Daniel Pulido <[email protected]>
% @file highlightvalue.m
% @license MIT License (http://opensource.org/licenses/MIT)
%
% ==================================================
% DEFINE DATA
@dpmcmlxxvi
dpmcmlxxvi / extremepts.m
Last active August 29, 2015 14:27
Compute the extreme points of a convex hull from an observation point
%
% Compute the extreme points of a convex hull from an observation point
% @author Daniel Pulido <[email protected]>
% @copyright Copyright (c) 2015 Daniel Pulido <[email protected]>
% @file extremepts.m
% @license MIT License (http://opensource.org/licenses/MIT)
%
function [extremes] = extremepts()
@dpmcmlxxvi
dpmcmlxxvi / uniquelines.py
Last active August 29, 2015 14:26
Compute the number of unique lines in a grid
#!/usr/bin/python
#
# Compute the number of unique lines in a grid
# @author Daniel Pulido <[email protected]>
# @copyright Copyright (c) 2015 Daniel Pulido <[email protected]>
# @file uniquelines.py
# @license MIT License (http://opensource.org/licenses/MIT)
#