Skip to content

Instantly share code, notes, and snippets.

#It's NOT Lit: Strategies for Exposing and Eliminating Cultural Appropriation in Marketing

##What is cultural appropriation?

##Examples

@max-mapper
max-mapper / index.js
Last active May 9, 2021 02:20
fast loading of a large dataset into leveldb
// data comes from here http://stat-computing.org/dataexpo/2009/the-data.html
// download 1994.csv.bz2 and unpack by running: cat 1994.csv.bz2 | bzip2 -d > 1994.csv
// 1994.csv should be ~5.2 million lines and 500MB
// importing all rows into leveldb took ~50 seconds on my machine
// there are two main techniques at work here:
// 1: never create JS objects, leave the data as binary the entire time (binary-split does this)
// 2: group lines into 16 MB batches, to take advantage of leveldbs batch API (byte-stream does this)
var level = require('level')
@max-mapper
max-mapper / index.js
Last active December 21, 2015 19:49
download all youtubes from a subreddit
var request = require('request').defaults({json: true})
var url = require('url')
var qs = require('querystring')
var fs = require('fs')
var async = require('async')
var path = require('path')
var ytdl = require('ytdl')
var subredditURL = "http://www.reddit.com/r/Documentaries/search.json?q=bbc+OR+attenborough+OR+pbs+OR+cats&restrict_sr=on&sort=relevance&t=all"
var last = ""
@robinhouston
robinhouston / doyle.js
Last active December 27, 2023 01:09
Doyle spiral circle packing
/* Numerics for Doyle spirals.
* Robin Houston, 2013
*/
(function() {
var pow = Math.pow,
sin = Math.sin,
cos = Math.cos,
pi = Math.PI;