Skip to content

Instantly share code, notes, and snippets.

View pnorman's full-sized avatar

Paul Norman pnorman

View GitHub Profile
@pnorman
pnorman / 90-zfs-vdev.rules
Created December 11, 2015 16:57
ZFS setup stuff
# Create by-id links in /dev as well for zfs vdev. Needed by grub
# Force ata_id for USB disks
KERNEL=="sd*[!0-9]", SUBSYSTEMS=="usb", IMPORT{program}="ata_id --export $devnode"
# Force ata_id when ID_VENDOR=ATA
KERNEL=="sd*[!0-9]", ENV{ID_VENDOR}=="ATA", IMPORT{program}="ata_id --export $devnode"
# Create links for all disk and partitions. Needed for L2ARC (not covered in this howto)
KERNEL=="sd*[!0-9]", IMPORT{parent}=="ID_*", SYMLINK+="$env{ID_BUS}-$env{ID_SERIAL}"
# Add links for zfs_member only
KERNEL=="sd*[0-9]", IMPORT{parent}=="ID_*", ENV{ID_FS_TYPE}=="zfs_member", SYMLINK+="$env{ID_BUS}-$env{ID_SERIAL}-part%n"
KERNEL=="sd*[0-9]", IMPORT{parent}=="ID_*", ENV{ID_FS_TYPE}=="zfs_member", SYMLINK+="$env{ID_BUS}-$env{ID_SERIAL}"
@pnorman
pnorman / comments.txt
Created November 13, 2015 11:37
mapbox unresponded dump
┌──────────────┬─────────────────────┬───────────────────┬─────────────────────┬───────────────────────────────────────────────────────────────────────────────┐
│ changeset_id │ changeset_user_name │ comment_user_name │ comment_date │ comment_text │
├──────────────┼─────────────────────┼───────────────────┼─────────────────────┼───────────────────────────────────────────────────────────────────────────────┤
│ 34823048 │ abel801 │ mfuji │ 2015-10-28 15:12:33 │ Please don't break our data! ↵│
│ │ │ │ │ ↵│
│ │ │ │ │ You have deleted the SECONDARY roads #335726311 and #313944874 by merging int…│
│ │ │ │
@pnorman
pnorman / notes.md
Last active August 29, 2015 14:27
v2.33.0 openstreetmap carto release notes

OpenStreetMap Carto 2.33.0 has been released. This release focuses on cartographic style improvements, but the release notes also include 2.32.0.

The biggest changes are

  • A randomized symbology for forests for natural=wood and landuse=forest #1728 #1242

A long time in the works, this improvement has finally landed. The two tags were merged - they are indistinguishable to the data consumer. A randomized symbology was first suggested by SK53 at SOTM-EU 2014, and this feature would not have happened without his extensive research, or imagico tools for creating an [irregular but uniformly distributed and periodic dot pat

@pnorman
pnorman / CHANGELOG.md
Last active August 29, 2015 14:26
openstreetmap carto changelog
@pnorman
pnorman / multitest.json
Created January 28, 2015 18:02
osm2pgsql #267 testcase that does not reproduce
[
{
"name": "foo",
"type": "point",
"tagtransform": "multitest.lua",
"tagtransform-node-function": "foo_nodes",
"tagtransform-way-function": "drop_all",
"tagtransform-relation-function": "drop_all",
"tagtransform-relation-member-function": "drop_all",
"tags": [
@pnorman
pnorman / announce.md
Last active August 29, 2015 14:07
OpenStreetMap Carto v2.22.0 Announcement

OpenStreetMap Carto v2.22.0

Labels on Shelf

OpenStreetMap Carto v2.22.0 has been released. This release focuses on labels.

The biggest change is a rewrite of landcover labelling. A landcover label is text connected to a background colour or pattern rendering, and not connected to an icon. This has been demoed extensively, and well received. It was also sent to the mailing list. The big changes are making colours better connected to the background, rendering labels on some features where they weren't before, and sizing labels based on area.

The last deserves a better explanation. Previously, the selection and choice of what labels to render didn't include area. It now does, avoiding placing labels on features that are only a few pixels in area at low and middle zooms, and selecting font size based on feature area. This results in a much

@pnorman
pnorman / 01_results.txt
Last active August 29, 2015 14:07
Analysis of OpenStreetMap US board candidate edits
Name │ First edit │ Changes │ Changesets │ US changes │ US changesets │ Changes │ Changesets │ Weeks where US edit │ "Average" state[1]
│ │ │ │ │ │ in last year │ in last year │ made in last year │
Martijn van Exel │ 2007-06-10 │ 216635 │ 3485 │ 166989 │ 2545 │ 58763 │ 1179 │ 52 │ Illinois
Andrew Wiseman │ 2011-02-12 │ 82543 │ 1222 │ 5200 │ 198 │ 34643 │ 582 │ 19 │ Cape Verde[2]
Richard Welty │ 2009-04-04 │ 382843 │ 8831 │ 382589 │ 8720 │ 76168 │ 838 │ 45 │ New York
Dale Kunce │ 2013-05-30 │ 63770 │ 201 │ 18432 │ 92 │ 53055 │ 147 │ 13 │ Cape Verde
Alex Barth │ 2012-02-10 │ 82565 │ 1192 │ 33266 │ 633 │ 31436
@pnorman
pnorman / osm2pgsql_stats.sql
Created September 25, 2014 17:43
SQL to generate statistics about an osm2pgsql database for verification of output
\x
SELECT COUNT(*), SUM(array_length(nodes, 1)) AS nodes, SUM(array_length(tags, 1)) AS tags FROM planet_osm_ways;
SELECT COUNT(*), SUM(array_length(parts, 1)) AS parts, SUM(array_length(members, 1)) AS members, SUM(array_length(tags, 1)) AS tags FROM planet_osm_rels;
SELECT COUNT(*) AS point_count FROM planet_osm_point;
SELECT COUNT(*), SUM(ST_Length(way)) AS st_length FROM planet_osm_line;
SELECT COUNT(*), SUM(way_area) AS way_area, SUM(ST_Area(way)) AS st_area, SUM(ST_Perimeter(way)) AS st_perimeter FROM planet_osm_polygon;
SELECT COUNT(*), SUM(ST_Length(way)) AS st_length FROM planet_osm_roads;
@pnorman
pnorman / initial.sh
Last active December 4, 2015 19:04
zfs setup
gpart create -s GPT da8
gpart create -s GPT da9
gpart add -s 222 -a 4k -t freebsd-boot -l boot0 da8
gpart add -a 4k -t freebsd-zfs -l disk0 -s 650GB da8
gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 da8
gpart add -s 222 -a 4k -t freebsd-boot -l boot1 da9
gpart add -a 4k -t freebsd-zfs -l disk1 -s 650GB da9
gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 da9