Skip to content

Instantly share code, notes, and snippets.

View aubergene's full-sized avatar

Julian Burgess aubergene

View GitHub Profile
@LingDong-
LingDong- / findcontours.js
Last active April 22, 2024 14:53
Finding contours in binary images and approximating polylines. Implements the same algorithms as OpenCV's findContours and approxPolyDP.
/** Finding contours in binary images and approximating polylines.
* Implements the same algorithms as OpenCV's findContours and approxPolyDP.
* <p>
* Made possible with support from The Frank-Ratchye STUDIO For Creative Inquiry
* At Carnegie Mellon University. http://studioforcreativeinquiry.org/
* @author Lingdong Huang
*/
var FindContours = new function(){let that = this;
let N_PIXEL_NEIGHBOR = 8;
@erikh
erikh / hack.sh
Created March 31, 2012 07:02 — forked from DAddYE/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@paulirish
paulirish / rAF.js
Last active March 22, 2024 00:00
requestAnimationFrame polyfill
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating
// requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel
// MIT license
(function() {
var lastTime = 0;
var vendors = ['ms', 'moz', 'webkit', 'o'];
@mbostock
mbostock / .block
Last active March 19, 2024 07:45
Wrapping Long Labels
license: gpl-3.0
@Rich-Harris
Rich-Harris / README.md
Created December 14, 2017 15:35
svelte-kit-scroller

Am planning to open source this when I get some breathing room, but a gist will do for now.

Usage:

<Scroller top=0.2 bottom=0.8 threshold=0.5 bind:index bind:offset bind:progress parallax>
  <div slot='background'>
    <!-- fixed, or parallaxing (if the parallax option is set) background -->
  </div>
@tmcw
tmcw / README.md
Last active November 9, 2021 04:55 — forked from anonymous/README.md
Jenks Natural Breaks with simple-statistics and d3
@gamesbyangelina
gamesbyangelina / yahoo-answers-mbmbam
Created October 8, 2019 13:31
MBMBAM Yahoo Answers (Ep 1 - 472, filtered)
I went on a first date with this guy; I didn’t know what to say to him?
What is the first song that comes to mind when I say the word “party”?
Can birds get allergies?
Why did my gf who said she loved me cheat on me rite in fornt of me and not care?
How long does it take to get THC out of your system if you only smoke on the weekends?
My girlfriend threw my dog off my balcony when I broke up with her Im not sure what to do?
Can toenails be swallowed?
Is it okay to bring jelly beans on a plane?
is masturbation create problem?
I’m in LOVE with Krista from Fern Gully. Are there any websites devoted to her?
@mbostock
mbostock / .block
Last active January 16, 2020 09:23
Percentage Change II
license: gpl-3.0
@veltman
veltman / README.md
Last active November 25, 2019 20:16
Smoother polygon transitions

Smooth transitioning US tour in the same vein as this example. Steps:

  1. Compares both shapes and adds evenly-spaced points to whichever polygon has fewer so that both have the same number of points
  2. Picks the winding of the first polygon that minimizes the sum of the squared distances between point pairs

Some possible improvements:

  • Adding additional points to both shapes first such that every segment longer than a certain distance is bisected
  • Tweaking the placement of added points with simulated annealing
  • Using a cost function that factors in self-intersections at the halfway mark in addition to distance traveled
@mbostock
mbostock / .block
Last active October 23, 2019 22:17
Arc Clock
license: gpl-3.0