Skip to content

Instantly share code, notes, and snippets.

@tylermenezes
tylermenezes / remove-rdio-garbage.js
Created December 9, 2012 10:01
Removes unavailable and preview albums from rdio. This is particularly useful after using the "Sync" feature, since it's useless and generates hundreds of "Unavailable" albums. Scroll to the bottom of your collection first, since it's lazy loaded.
(function(){
var i = 0;
var count = $('.Album.unavailable,.Album.preview').length;
console.log('Found ' + count + ' albums to remove');
var timeout = 0;
$('.Album.unavailable,.Album.preview').each(function(){
var instance_i = i++;
var album = $(this);
album.trigger('mouseover').mouseenter();
album.find('a,div,span,image').trigger('mouseover').mouseenter();
@emeeks
emeeks / firm.csv
Last active March 17, 2016 02:08
Modularity Mini-Map
source target weight
1 3 5
1 8 3
1 9 3
1 12 3
1 15 2
1 23 3
1 26 2
1 37 2
1 46 2
@emeeks
emeeks / d3-force.js
Created September 16, 2016 17:03
Working Rectangular Collide
// https://d3js.org/d3-force/ Version 1.0.0. Copyright 2016 Mike Bostock.
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('d3-quadtree'), require('d3-collection'), require('d3-dispatch'), require('d3-timer')) :
typeof define === 'function' && define.amd ? define(['exports', 'd3-quadtree', 'd3-collection', 'd3-dispatch', 'd3-timer'], factory) :
(factory((global.d3 = global.d3 || {}),global.d3,global.d3,global.d3,global.d3));
}(this, function (exports,d3Quadtree,d3Collection,d3Dispatch,d3Timer) { 'use strict';
function center(x, y) {
var nodes;
@cmpolis
cmpolis / .block
Last active September 20, 2016 08:44
Scatterplot with d3-annotate
license: gpl-3.0
@springmeyer
springmeyer / re-concoct.xml
Created August 27, 2012 19:37
Re-implement the visualization from https://github.com/shawnbot/concoct in one fell swoop using Mapnik 2.1
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE Map [
<!-- compositing mode: https://github.com/mapnik/mapnik/blob/master/include/mapnik/image_compositing.hpp#L42-79 -->
<!ENTITY comp_op "darken">
<!-- leave blank to render all data or set to some integer to render faster -->
<!ENTITY row_limit "">
<!-- size of marker ellipse -->
@mbostock
mbostock / .block
Last active September 26, 2018 01:31
Projected TopoJSON
license: gpl-3.0
height: 800
@deanhu2
deanhu2 / perlin-noise.gd
Last active October 16, 2018 19:19
Godot heightmap generator using perlin-noise
#If you would like to contribute or modify the content's
#of this script, please consider contribution to the original
#repository - https://github.com/deanhu2/Perlin-Noise-Godot
tool
extends ImageTexture
export(int,1,100) var octave= 5 setget set_octave, get_octave
export(int,1,512) var width= 256 setget set_width, get_width
export(int,1,512) var height= 256 setget set_height, get_height
@hamishcampbell
hamishcampbell / description.txt
Created March 13, 2019 00:41
Mostly Geocoded NZ Pokie Machine Locations December 2018
Pokie machies by location (Dec 2018), CC-BY DIA NZ from:
https://www.dia.govt.nz/diawebsite.nsf/wpg_URL/Resource-material-Information-We-Provide-All-Venues-and-Numbers-by-Territorial-AuthorityDistrict
Geocoded with addy.co.nz 13th March 2019 by Hamish Campbell
There are a few unfound addresses and no manual checking of other results has been done.
@veltman
veltman / README.md
Last active October 28, 2019 10:45
Strip map

Version with labels

Creating an automatic strip map based on some geographic features and a chosen "spine." The approximate steps:

  1. Pick a LineString (e.g. the California coast) to straighten out.
  2. Simplify that LineString.
  3. Turn that simplified LineString into a set of zones, one per segment.
  4. Rotate/translate each zone to its destination position, anchoring it to the end of the previous segment and rotating it to match the desired angle (e.g. horizontal).
  5. Warp the contents of each zone to the resulting rectangle with a bilinear warp.
@gka
gka / index.html
Last active December 10, 2019 23:18
Parliament seating diagrams
<!DOCTYPE html>
<html>
<head>
<script src="http://d3js.org/d3.v3.min.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
<style id="jsbin-css">
path { stroke: red; fill: none; stroke-width:2; opacity: 0.4}
</style>
</head>