Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am bdon on github.
  • I am bdon (https://keybase.io/bdon) on keybase.
  • I have a public key whose fingerprint is D140 7385 A561 4467 5F8B 2FAC 5FD3 F7D8 BF67 2414

To claim this, I am signing this object:

bdon@bdon-H87N-WIFI:~$ osm2pgsql -d osm --slim --flat-nodes flat-nodes.bin --number-processes 6 -C 2000 -H /tmp/ north-america-latest.osm.pbf
osm2pgsql SVN version 0.84.0 (64bit id space)
Using projection SRS 900913 (Spherical Mercator)
Setting up table: planet_osm_point
NOTICE: table "planet_osm_point" does not exist, skipping
NOTICE: table "planet_osm_point_tmp" does not exist, skipping
Setting up table: planet_osm_line
NOTICE: table "planet_osm_line" does not exist, skipping
NOTICE: table "planet_osm_line_tmp" does not exist, skipping
@bdon
bdon / README.md
Last active August 29, 2015 14:01
Moon Phases
@bdon
bdon / gist:2ab08080b9e975a82052
Created July 9, 2014 20:40
California - broken Multipolygon relations
http://openstreetmap.org/relation/1124439
http://openstreetmap.org/relation/112444
http://openstreetmap.org/relation/112534
http://openstreetmap.org/relation/112620
http://openstreetmap.org/relation/2144459
http://openstreetmap.org/relation/2538329
http://openstreetmap.org/relation/253967
http://openstreetmap.org/relation/3179629
http://openstreetmap.org/relation/9477479
http://openstreetmap.org/relation/946480
@bdon
bdon / openterrain-extent.geojson
Created June 24, 2015 15:08
OpenTerrain extent 6/24/2015
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bdon
bdon / gitaliases
Created April 5, 2012 05:12
Git aliases I use often
[alias]
st = status
co = checkout
lg = log --graph --oneline --all --decorate
gap = add --patch --interactive
@bdon
bdon / gist:2886527
Created June 7, 2012 04:21
simple fulltext search with postgres + sequel
if params[:query].present?
# not doing :* prefix matching right now.
# Preprocess the string into what TSvector wants. spaces -> ?
# Then only letters, numbers, underscores and qmarks are left.
query = params[:query].gsub(/\s+/, '?').gsub(/[^\w\?]/, '')
@results = @results.select { [ts_headline('english', :text, to_tsquery('english', query), 'MaxFragments=2').as(headline), id, title, happened_at]}
@results = @results.filter("ts_text @@ to_tsquery('english', ?::text)", query)
end
@bdon
bdon / index.html
Created October 13, 2012 01:55
lombard
<!doctype html>
<html>
<head>
<script src="http://bdon.org/js/d3.v2.js"></script>
<script src="http://bdon.org/js/Three.js"></script>
</head>
<body>
<section>
<div id="chart">
</div>
@bdon
bdon / index.html
Last active December 11, 2015 14:58
<!DOCTYPE html>
<meta charset="utf-8">
<script src="http://d3js.org/d3.v3.min.js"></script>
<style type="text/css">
body {
font-family: "Helvetica";
font-size: 10px;
}
.brush .extent {