Skip to content

Instantly share code, notes, and snippets.

@aendra-rininsland
aendra-rininsland / GoT-screentimes--s06.json
Last active September 7, 2017 13:33
Game Of Thrones total screentimes (Up to and including Season 6)
[
{
"name": "Tyrion Lannister",
"imdbUrl": "http://www.imdb.com/character/ch0146096/",
"screentime": 293.3,
"episodes": 54,
"portrayedBy": {
"name": "Peter Dinklage",
"imdbUrl": "http://www.imdb.com/name/nm0227759/"
}
@emeeks
emeeks / d3-glyphEdge.js
Created September 8, 2016 02:30
Gooey Sankey
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define('d3-glyphEdge', ['exports'], factory) :
factory((global.d3_glyphEdge = {}));
}(this, function (exports) { 'use strict';
function halfArrow(d, nodeTargetSize, bodySize, headSize) {
var diffX = d.target.y - d.source.y;
var diffY = d.target.x - d.source.x;
@yanofsky
yanofsky / Makefile
Last active May 4, 2019 06:45
This is workflow for downloading, processing, and mosaicing Landsat scenes, as a Makefile
# lansatutil directory
LANDSAT = ~/landsat
# scenes to target
LANDSAT_IDS = \
LC81220442016038LGN00 \
LC81220452016038LGN00 \
LC81210442014281LGN00 \
LC81210452014281LGN00
@mbostock
mbostock / .block
Last active July 4, 2016 13:46
ColorBrewer Spline
license: gpl-3.0
height: 620
@sxywu
sxywu / README.md
Last active April 18, 2019 03:35
Animate SVG path on scroll

Make sure to pop out to a new window, and then scroll.

An experiment to see if I can get svg paths to animate only to a certain horizontal line while a user scrolls. Used in my unreleased wongfu side project.

Built with blockbuilder.org

@whatnickcodes
whatnickcodes / chrome-cache-recovery.js
Last active November 23, 2016 05:32
Quick and dirty script to recover images from chrome cache. Just paste this into your console to automatically download all Scotch.io cached images
// Open chrome://cache/ and paste the following script in the console. Feel free to edit the filter variable
var filter = /cask\.scotch\.io(.)*\.(jpg|jpeg|png|gif)/g;
/*! jQuery v2.1.4 | (c) 2005, 2015 jQuery Foundation, Inc. | jquery.org/license */
!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l=a.document,m="2.1.4",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);retu
@chroth7
chroth7 / reactD3rescources.md
Last active December 6, 2017 05:37
React/D3 Resources
@mapmeld
mapmeld / mapboxgl.md
Last active March 4, 2019 15:12
Getting Started with MapBoxGL

Getting Started

I recently made my first map with MapBox's new WebGL+JavaScript API. There aren't many examples of how to do this yet, even on MapBox's API page, so I'll document my own experience here.

The Van Gogh Map

My map is made of several textures taken from Van Gogh paintings. The long-term goal is to allow a user to select which artworks they want to take textures from, but for now there is just one setting.

Why are we changing maps?

@andreasvc
andreasvc / metainfo.py
Last active May 23, 2020 16:39
Extract metadata from Project Gutenberg RDF catalog into a Python dict.
"""Extract metadata from Project Gutenberg RDF catalog into a Python dict.
Based on https://bitbucket.org/c-w/gutenberg/
>>> md = readmetadata()
>>> md[123]
{'LCC': {'PS'},
'author': u'Burroughs, Edgar Rice',
'authoryearofbirth': 1875,
'authoryearofdeath': 1950,
@oobrien
oobrien / README.md
Last active January 22, 2019 13:54
TfL lines and stations. Includes, Tube, DLR, Overground, Tramlink, Emirates Air Line and Crossrail. All as currently running/aligned, except Crossrail. Original data source: OpenStreetMap, which is Copyright OpenStreetMap contributors and available under the Open Database Licence.