Skip to content

Instantly share code, notes, and snippets.

@juliepagano
juliepagano / 101_off_limits.md
Last active December 16, 2020 09:37
101 conversations I generally don't want to have...

This list now exists over at http://juliepagano.com/blog/2013/11/02/101-off-limits/ and will be updated there.

I keep saying that impromptu, unwanted feminism 101 discussions are exhausting and not a good use of my resources. Then people ask what I mean by 101, so I'm starting to make a list. This list will change over time - I recommend checking back.

I highly recommend checking this list before engaging with me about feminism if you're new to it. It'll save both of us a lot of time and frustration.

Diversity in tech

Women aren't equally represented in tech because biology

Nope. This argument is bad and the science does not support it. Unfortunately, every time you say this out loud, you are contributing to cultural problems that do decrease the number of women in tech.

/* does effectively this, but without all that fancy
* stream mumbo jumbo:
var net = require('net');
var server = net.createServer(function(socket) {
socket.pipe(socket);
});
server.listen(PORT, function() {
@andrewxhill
andrewxhill / kmeans.sql
Created November 29, 2012 19:44
Super naive but fast kmeans
--50,000 records ~ 1.2s, 500,000 records ~ 25s
--Number of iterations is at 20, which is probably very high
--You can reduce it by replace 20 in both iterations < and iteration =
WITH RECURSIVE dims AS (SELECT 3 as d, 4 as i), --d^2 max # clusters, i = iterations to refine
series AS (SELECT GENERATE_SERIES(1,d*d) s FROM dims),
bx AS (SELECT ST_Envelope(ST_Collect(the_geom)) as bx_g FROM occurrence_search_coords),
grd AS (SELECT CDB_RectangleGrid(bx_g,((ST_XMax(bx_g)-ST_XMin(bx_g))/50),((ST_YMax(bx_g)-ST_YMin(bx_g))/50) ) as grd_g FROM bx),
simple AS (SELECT ST_Centroid(grd_g) as the_geom FROM grd,occurrence_search_coords WHERE ST_Intersects(grd_g,the_geom) GROUP BY grd_g),
env AS (SELECT ST_Envelope(ST_Collect(the_geom)) as geom FROM simple),
grid AS (SELECT ST_Centroid(CDB_RectangleGrid(
@mbostock
mbostock / .block
Last active March 6, 2024 04:06
Gradient Along Stroke
license: gpl-3.0
@mbostock
mbostock / .block
Last active June 21, 2023 17:50
Zoomable Map Tiles
license: gpl-3.0
redirect: https://observablehq.com/@d3/zoomable-map-tiles
@tmcw
tmcw / index.html
Created November 20, 2012 21:16
Download and canvas tiles
<!DOCTYPE html>
<style>
img.tile {
position:absolute;
}
#download {
position:absolute;
top:10px;
left:10px;
}
@glenrobertson
glenrobertson / leaflet-geojson-gpolydecode.js
Created November 13, 2012 03:11
Handling for Google encoded polygons inside GeoJSON in Leaflet
// extend GeoJSON to handle google-encoded linestrings
// assumes that any array of coordinates that make up a linestring are replaced with the google encoded line string
L.extend(L.GeoJSON, {
// This function is from Google's polyline utility.
// Borrowed from: http://facstaff.unca.edu/mcmcclur/GoogleMaps/EncodePolyline/decode.js
// Changed to return lng/lats instead of lat/lngs
decodeLine: function (encoded) {
var len = encoded.length;
var index = 0;
var array = [];
@bnoordhuis
bnoordhuis / results.txt
Created October 30, 2012 22:52
show difference between mmap() and malloc()
$ gcc -DUSE_MMAP=0 tmp/rss.c && ./a.out
rss 360448
==============
rss 360448
rss 1429504
rss 552960
==============
rss 552960
rss 1359872
rss 1359872
@glenrobertson
glenrobertson / TileLayer.GeoJSON.js
Created September 15, 2012 00:02
GeoJSON Leaflet Tile Layer
/*
GeoJSON layer with mouse hover events to properties for each feature
Requires JQuery to handle the AJAX requests
Currently only supports FeatureCollections
Features must have ID's, so they can be deduplicated across tiles (not rendered twice).
*/
/*
Control that shows HTML content for a point on hover
*/
@ingenieroariel
ingenieroariel / cmake.sh
Created September 13, 2012 00:07
Installing QGIS from sources on Mountain Lion
Quantum-GIS > cmake -DCMAKE_INSTALL_PREFIX=~/Applications -DCMAKE_BUILD_TYPE=Release -DCMAKE_BUILD_TYPE=MinSizeRel -DWITH_INTERNAL_SPATIALITE=TRUE -DQWT_INCLUDE_DIR=/usr/local/Cellar/qwt/6.0.1/lib/qwt.framework/Headers -DSPATIALINDEX_INCLUDE_DIR=/usr/local/Cellar/spatialindex/1.7.1/include -DSPATIALINDEX_LIBRARY=/usr/local/Cellar/spatialindex/1.7.1/lib/libspatialindex.dylib
-- The C compiler identification is GNU 4.2.1
-- The CXX compiler identification is Clang 4.0.0
-- Checking whether C compiler has -isysroot
-- Checking whether C compiler has -isysroot - yes
-- Checking whether C compiler supports OSX deployment target flag
-- Checking whether C compiler supports OSX deployment target flag - yes
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info