Skip to content

Instantly share code, notes, and snippets.

@ix4
ix4 / regex.rb
Created February 18, 2020 17:58 — forked from benbalter/regex.rb
Regular expression to find government domains for websites / email addresses
# regex to match government emails. Should detect:
# foo.gov, foo.mil
# foo.gov.uk, foo.mil.uk
# foo.fed.us
# foo.govt.nz, foo.gc.ca, foo.guv.ro, gub.uy
# note: foo.gouvt, foo.gc, foo.fed.uk, etc. will technically pass, but they are invalid domains
regex = /(\.g[ou]{1,2}(v|b|vt)|\.mil|\.gc|\.fed)(\.[a-z]{2})?$/i
@ix4
ix4 / sample.png
Created February 18, 2020 13:55 — forked from jirutka/sample.png
Nested numbered list with correct indentation in CSS. Live example at http://jsfiddle.net/a84enL8k/.
sample.png
@ix4
ix4 / geojson-conversion.sh
Created February 13, 2020 15:58 — forked from benbalter/geojson-conversion.sh
Bulk convert shapefiles to geojson using ogr2ogr
# Bulk convert shapefiles to geojson using ogr2ogr
# For more information, see http://ben.balter.com/2013/06/26/how-to-convert-shapefiles-to-geojson-for-use-on-github/
# Note: Assumes you're in a folder with one or more zip files containing shape files
# and Outputs as geojson with the crs:84 SRS (for use on GitHub or elsewhere)
#geojson conversion
function shp2geojson() {
ogr2ogr -f GeoJSON -t_srs crs:84 "$1.geojson" "$1.shp"
}
@ix4
ix4 / .block
Created February 1, 2020 08:57 — forked from mbostock/.block
New York Population Density
license: gpl-3.0
@ix4
ix4 / .block
Created February 1, 2020 08:53 — forked from mbostock/.block
Maze Hover
license: gpl-3.0
@ix4
ix4 / .block
Created February 1, 2020 08:52 — forked from mbostock/.block
Swiss Cantons & Lakes
license: gpl-3.0
@ix4
ix4 / .block
Created February 1, 2020 08:48 — forked from mbostock/.block
See-Through Globe II
license: gpl-3.0
@ix4
ix4 / .block
Created February 1, 2020 08:29 — forked from mbostock/.block
New York Block Groups
license: gpl-3.0
@ix4
ix4 / .block
Last active February 1, 2020 08:27 — forked from mbostock/.block
d3.geoPath + node-canvas
license: GPL-3.0
height: 600
border: no
@ix4
ix4 / index.html
Created January 31, 2020 17:36 — forked from biovisualize/index.html
MapD3 chart update
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="./mapd3.min.css">
<style>
.chart1 {
margin-top: 80px;
margin-left: 40px;
}
.mapd3 {