Skip to content

Instantly share code, notes, and snippets.

View zerebubuth's full-sized avatar

Matt Amos zerebubuth

View GitHub Profile
@zerebubuth
zerebubuth / gist:1876695
Created February 21, 2012 13:59
Draft new README

Description

This is the Rails port, the Ruby on Rails application that powers OpenStreetMap.

The Rails port provides almost all the services which are available on the OpenStreetMap site, including:

  • The web site itself, including the edit pages.
  • The editing API.
@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:1817398
Created February 13, 2012 14:52
Draft new README

Description

This is the Rails port, the Ruby on Rails application that powers OpenStreetMap.

Something more about what the rails port is for here...

Running it

You can find documentation on [how to setup and

@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