Skip to content

Instantly share code, notes, and snippets.

View ddnn55's full-sized avatar

David Stolarsky ddnn55

View GitHub Profile
@ddnn55
ddnn55 / README.md
Last active January 26, 2021 08:32 — forked from pecigonzalo/delete_all_object_versions.sh
Remove all latest delete markers under an s3 prefix, thereby "restoring a deleted directory"

Usage

./s3_remove_delete_markers_recursive.sh <bucket_name> <prefix>

Dependencies

@ddnn55
ddnn55 / .block
Created June 24, 2017 13:17 — forked from mbostock/.block
Zoomable Map Tiles
license: gpl-3.0
@ddnn55
ddnn55 / README.md
Created March 14, 2016 23:32 — forked from mbostock/README.md
Quadtree

This example demonstrates accelerated two-dimensional filtering enabled by d3.geom.quadtree. A quadtree recursively subdivides square cells into four equal-sized subcells. Each leaf node of the quadtree contains a single point. If a given quadtree cell does not intersect the brush extent, then none of the points contained in that subtree can be selected, and thus do not need to be scanned. Above, orange indicates points that are scanned but not selected. Without a quadtree, all points would need to be scanned!

Fun with vector maps

Quick TopoJSON vector tile demo map, derived from an earlier GeoJSON demo. Original README follows.

A goofy slippy map of various vector tile data sources. With some fun colours, greetz to Aaron and Mike and Mike and the whole Prettymaps crew.

Sacramento, CA

@ddnn55
ddnn55 / gist:9925775
Last active August 29, 2015 13:57 — forked from idan/gist:3135754

[+d3](javascript:(function()%7Bfunction callback()%7Bfunction noop() %7B%7D%7Dvar s%3Ddocument.createElement("script")%3Bs.src%3D"http%3A%2F%2Fd3js.org%2Fd3.v3.min.js"%3Bif(s.addEventListener)%7Bs.addEventListener("load"%2Ccallback%2Cfalse)%7Delse if(s.readyState)%7Bs.onreadystatechange%3Dcallback%7Ddocument.body.appendChild(s)%3B%7D)())

IMG_0874

(defn debounce [func wait immediate]
(let [timeout (atom nil)]
(fn []
(this-as this
(let [context this
args js/arguments
later (fn []
(reset! timeout nil)
(when-not immediate
(.apply func context args)))]
@ddnn55
ddnn55 / README.md
Last active December 18, 2015 01:58 — forked from mbostock/.block

2012 Mango Movement by Origin

This simple force-directed graph shows character co-occurence in Les Misérables. A physical simulation of charged particles and springs places related characters in closer proximity, while unrelated characters are farther apart. Layout algorithm inspired by Tim Dwyer and Thomas Jakobsen. Data based on character coappearence in Victor Hugo's Les Misérables, compiled by Donald Knuth.

@ddnn55
ddnn55 / index.html
Created December 7, 2012 19:23 — forked from jlong/uri.js
gist/bl.ocks Toggle Bookmarklet
<html>
<body>
<h1><a href="javascript:window.location=(window.location.hostname.indexOf('gist')>-1?'http://bl.ocks.org':'http://gist.github.com')+window.location.pathname;">gist/bl.ocks Toggle Bookmarklet</a></h1>
</body>
</html>
@ddnn55
ddnn55 / README.md
Created December 3, 2012 18:55 — forked from mbostock/.block
state flags