Skip to content

Instantly share code, notes, and snippets.

@weedkiller
weedkiller / .block
Created January 28, 2019 06:16 — forked from varun-raj/.block
Interactive Gantt Chart
border: no
@weedkiller
weedkiller / index.html
Created January 26, 2019 21:26 — forked from billdwhite/index.html
d3 treemap with child highlighting
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>Treemap - Neat Zoom Effect</title>
<script type="text/javascript" src="http://www.billdwhite.com/wordpress/wp-content/js/browserdetect/browserdetect.js"></script>
<script type="text/javascript" src="http://www.billdwhite.com/wordpress/wp-content/js/d3/d3.js"></script>
<style type="text/css">
body {
overflow: hidden;
#!/usr/bin/php
<?php
error_reporting(E_ALL);
if (count($argv) <= 1) {
print("usage: createMockup source_dir dest_dir images_dir\n");
print("\tsource_dir: the directory containing all bmml file to convert\n");
print("\tdest_dir: the directory where all html files will be written to\n");
print("\timages_dir: a directory containing the exported PNGs of all .bmml files in source_dir (will be copied to dest_dir/images)\n");
exit(1);
}
@weedkiller
weedkiller / index.html
Created July 21, 2018 06:00
WMTS in EPSG:3857 using Leaflet
<div id="map"></div>
@weedkiller
weedkiller / index.html
Created July 21, 2018 06:00
Running GeoJSON & leaflet
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet/v0.7.7/leaflet.css" />
<link href='https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,480' rel='stylesheet' type='text/css'>
<script src="https://code.jquery.com/jquery.min.js"></script>
<script src="http://cdn.leafletjs.com/leaflet/v0.7.7/leaflet.js"></script>
<script src="https://leaflet.github.io/Leaflet.heat/dist/leaflet-heat.js"></script>
<p>Some of my Garmin Connect running data turned into a heatmap using Leaflet.js.</p>
<div id="mymap" style="width:520px;height:400px;"></div>
@weedkiller
weedkiller / build-a-store-locator-with-mapbox-js.markdown
Created July 21, 2018 05:57
Build a store locator with Mapbox.js
@weedkiller
weedkiller / index.html
Created July 21, 2018 05:53
Test adding OSM GeoJSON to Leaflet Map
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css" />
<script src="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.js"></script>
<script>var OSMBuildings=function(){function wa(a,b){var c=a.x-b.x,d=a.y-b.y;return c*c+d*d}function Sa(a){for(var b=Infinity,c=-Infinity,d=Infinity,e=-Infinity,f=0,h=a.length-3;f<h;f+=2)b=T(b,a[f]),c=O(c,a[f]),d=T(d,a[f+1]),e=O(e,a[f+1]);return{x:b+(c-b)/2<<0,y:d+(e-d)/2<<0}}function Z(a,b){var c={};a/=U;b/=U;c[Ta]=0>=b?90:1<=b?-90:xa*(2*Ua(Va(A*(1-2*b)))-P);c[Wa]=360*(1===a?1:(a%1+1)%1)-180;return c}function ya(a,b,c){function d(a){if("XDomainRequest"in B&&a!==e.readyState&&(e.readyState=a,e.onreadystatechange))e.onreadystatechange()}
a=a.replace(/\{ *([\w_]+) *\}/g,function(a,c){return b[c]||a});var e="XDomainRequest"in B?new XDomainRequest:new XMLHttpRequest;e.onerror=function(){e.status=500;e.statusText="Error";d(4)};e.ontimeout=function(){e.status=408;e.statusText="Timeout";d(4)};e.onprogress=function(){d(3)};e.onload=function(){e.status=200;e.st
@weedkiller
weedkiller / index.pug
Created July 21, 2018 05:52
Parcel location tracker
.container
.map
.map__inner#map
.sidebar
h1 Location History
.timeline#timeline
@weedkiller
weedkiller / index.html
Created July 21, 2018 05:52
Leaflet + Turf.js
<div class="buttons">
<button id="add-data">Add Data</button>
<button id="add-data">Add Data</button>
</div>
<div id="map" class="map"></div>
@weedkiller
weedkiller / i-want-my-data-points-on-the-map-esri-leaflet.markdown
Created July 21, 2018 05:51
I Want My Data Points on the Map - Esri Leaflet