Skip to content

Instantly share code, notes, and snippets.

View zerebubuth's full-sized avatar

Matt Amos zerebubuth

View GitHub Profile
@zerebubuth
zerebubuth / all_kind_detail.md
Created January 15, 2019 16:26
All layers, kind and kind_details in vector-datasource
LAYER KIND KIND_DETAIL MIN_ZOOM SORT_RANK
admin_areas admin_area None 5 None
boundaries aboriginal_lands None 8 250
boundaries aboriginal_lands 2 8 250
boundaries aboriginal_lands 4 8 250
boundaries aboriginal_lands 6 8 250
boundaries aboriginal_lands 8 8 250
boundaries country 2 0 262
boundaries county 6 10 254
@zerebubuth
zerebubuth / roads_12_1206_1540.geojson
Last active November 20, 2018 13:42
GeoJSON encoding of the roads layer from tile `12/1206/1540` after https://github.com/tilezen/vector-datasource/pull/1707 - tile data from OpenStreetMap contributors, available under the ODbL.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
require 'xml/libxml'
require 'set'
require 'open-uri'
node_ids = Set.new
way_ids = Set.new
rel_ids = Set.new
ARGV.each do |file|
data = XML::Parser.file(file).parse
@zerebubuth
zerebubuth / timeout_test.rb
Created November 28, 2016 02:01
Trying to figure out why timeout errors cause commits
require 'timeout'
# loosely based on https://github.com/rails/rails/blob/v4.2.7.1/activerecord/lib/active_record/connection_adapters/abstract/transaction.rb#L182-L201
def transaction
yield
rescue Exception => error
STDERR.puts "Rescued exception: #{error.to_s}"
raise
@zerebubuth
zerebubuth / gist:70905f2bb5ec3f451cbac2176142d01e
Created November 15, 2016 20:13
output of IPMICFG-Linux.x86_64 -pminfo on karm
[SlaveAddress = B0h] [Module 1]
Item | Value
---- | -----
Status | ON (00 02)
Input Voltage | 227.0 V
Input Current | 0.59 A
Main Output Voltage | 12.26 V
Main Output Current | 8.34 A
Temperature 1 | 32C/90F
Temperature 2 | 40C/104F
@zerebubuth
zerebubuth / 1.patch
Created October 24, 2016 16:49
Patch to hack query param support into osm-auth.js
diff --git a/index.js b/index.js
index ebb19f4..c48dff1 100644
--- a/index.js
+++ b/index.js
@@ -169,6 +169,13 @@ module.exports = function(o) {
oauth_token_secret = token('oauth_token_secret');
var url = (options.prefix !== false) ? o.url + options.path : options.path;
+ var url_parts = url.split('?', 2),
+ base_url = url_parts[0];
gbp:debug: ['git', 'rev-parse', '--show-cdup']
gbp:debug: ['git', 'rev-parse', '--is-bare-repository']
gbp:debug: fakeroot debian/rules clean [] []
dh clean ---parallel --list-missing --with autoreconf
dh_testdir -O---parallel -O--list-missing
dh_auto_clean -O---parallel -O--list-missing
dh_autoreconf_clean -O---parallel -O--list-missing
dh_clean -O---parallel -O--list-missing
rm -f debian/debhelper-build-stamp
rm -f debian/libcgimap-dev.substvars
@zerebubuth
zerebubuth / ramoth_ethtool_eth0.log
Created July 19, 2016 11:30
Ramoth's ethtool offload parameters
Offload parameters for eth0:
rx-checksumming: on
tx-checksumming: on
scatter-gather: on
tcp-segmentation-offload: on
udp-fragmentation-offload: off
generic-segmentation-offload: on
generic-receive-offload: on
large-receive-offload: off
rx-vlan-offload: on
@zerebubuth
zerebubuth / kern.log
Created July 19, 2016 11:18
Kernel warnings about ipv6 slow path?
Jul 19 11:17:52 ramoth kernel: [5545563.660472] ------------[ cut here ]------------
Jul 19 11:17:52 ramoth kernel: [5545563.660475] WARNING: CPU: 18 PID: 22691 at /build/linux-lts-trusty-buxpxv/linux-lts-trusty-3.13.0/net/core/dst.c:286 dst_release+0x50/0x60()
Jul 19 11:17:52 ramoth kernel: [5545563.660476] Modules linked in: btrfs(X) raid6_pq(X) xor(X) ufs(X) qnx4(X) hfsplus(X) hfs(X) minix(X) ntfs(X) msdos(X) jfs(X) reiserfs(X) nfsv3 ipmi_si act_police cls_basic cls_flow cls_fw cls_u32 sch_tbf sch_prio sch_htb sch_hfsc sch_ingress sch_sfq xt_LOG xt_time xt_connlimit xt_realm xt_addrtype iptable_raw xt_comment xt_recent xt_policy xt_nat ipt_ULOG ipt_REJECT ipt_MASQUERADE ipt_ECN ipt_CLUSTERIP ipt_ah xt_set ip_set nf_nat_tftp nf_nat_snmp_basic nf_conntrack_snmp nf_nat_sip nf_nat_pptp nf_nat_proto_gre nf_nat_irc nf_nat_h323 nf_nat_ftp nf_nat_amanda ts_kmp nf_conntrack_amanda nf_conntrack_sane nf_conntrack_tftp nf_conntrack_sip nf_conntrack_proto_sctp nf_conntrack_pptp nf_conntrack_proto_gre nf_conntrack_netli
@zerebubuth
zerebubuth / kernel_oops_karm.txt
Created July 13, 2016 19:21
Kernel oops on karm after changing LBA size on NVMe drives.
[13193.501603] blk_update_request: I/O error, dev nvme5n1, sector 3907028992
[13223.504244] blk_update_request: I/O error, dev nvme5n1, sector 3907029152
[13223.626232] BUG: unable to handle kernel NULL pointer dereference at 0000000000000008
[13223.634147] IP: [<ffffffff813f19b9>] __rb_insert_augmented+0x29/0x210
[13223.640636] PGD 1fbd573067 PUD 1fe6dcb067 PMD 0
[13223.645343] Oops: 0000 [#1] SMP
[13223.648643] Modules linked in: xt_recent iptable_nat nf_nat_ipv4 xt_comment xt_hashlimit ipt_REJECT nf_reject_ipv4 xt_addrtype xt_mark iptable_mangle xt_tcpudp xt_CT iptable_raw xt_multiport nf_conntrack_ipv4 nf_defrag_ipv4 xt_conntrack xt_NFLOG nfnetlink_log xt_LOG nf_log_ipv4 nf_log_common nf_nat_tftp nf_nat_snmp_basic nf_conntrack_snmp nf_nat_sip nf_nat_pptp nf_nat_proto_gre nf_nat_irc nf_nat_h323 nf_nat_ftp nf_nat_amanda ts_kmp nf_conntrack_amanda nf_nat nf_conntrack_sane nf_conntrack_tftp nf_conntrack_sip nf_conntrack_proto_udplite nf_conntrack_proto_sctp nf_conntrack_pptp nf_conntrack_proto_gre nf_conntr