Skip to content

Instantly share code, notes, and snippets.

View matkoniecz's full-sized avatar

Mateusz Konieczny matkoniecz

View GitHub Profile
new = ['accessories', 'agrarian', 'anime', 'antiques', 'appliance', 'art', 'auto_parts', 'baby_goods', 'bathroom', 'bathroom_furnishing', 'bed', 'boat', 'bookmaker', 'boutique', 'builder', 'building_materials', 'cafe', 'camera', 'candy', 'car_service', 'carpet', 'catalogue', 'charity', 'cheese', 'chocolate', 'coffee', 'communication', 'craft', 'curtain', 'dairy', 'deli', 'discount', 'doors', 'e-cigarette', 'electrical', 'energy', 'erotic', 'estate_agent', 'fabric', 'fishing', 'fishmonger', 'flooring', 'food', 'frame', 'frozen_food', 'funeral_directors', 'furnace', 'gallery', 'games', 'gas', 'general', 'glass', 'glaziery', 'grocery', 'haberdashery', 'health', 'health_food', 'hearing_aids', 'herbalist', 'hobby', 'household', 'houseware', 'hunting', 'interior_decoration', 'kitchen', 'lamps', 'leather', 'lighting', 'locksmith', 'lottery', 'market', 'marketplace', 'massage', 'medical', 'medical_supply', 'money_lender', 'motorcycle_repair', 'music', 'nutrition_supplements', 'office_supplies', 'organic', 'paint', 'p
#!/usr/bin/ruby
require 'net/http'
require 'json'
require 'pp'
url = URI.parse('http://taginfo.openstreetmap.org/api/4/key/values?key=shop&sortname=count&sortorder=desc')
req = Net::HTTP::Get.new(url.to_s)
res = Net::HTTP.start(url.host, url.port) {|http|
http.request(req)
@matkoniecz
matkoniecz / footpathway.md
Last active September 21, 2015 19:25 — forked from gravitystorm/footpathway.md
highway=path vs highway=footway

"path is only needed when footway, cycleway or bridleway are misleading"

"There's no clear default for path, footway or every cycleway about surface. The obvious answer is that surface tags should be used."

"without any further access tags, path is neutral and open to all unmotorized means of transport (unlike footway, cycleway etc.)"

"highway=footway is meant to be the same as highway=path and foot=designated"

"But =footway and =path mean different things in different regions"

@matkoniecz
matkoniecz / test.rb
Last active August 29, 2015 14:08
find bad text-dy
# encoding: UTF-8
require 'fileutils'
def main
style_filenames = Dir[get_style_path+"*.mss"]
for style_filename in style_filenames
puts style_filename
style_file = open(style_filename)
style = style_file.read()
matched = style.scan(/\[feature = '(man_made|[^_]+)_([^']+)'\]/)
tag = nil
@matkoniecz
matkoniecz / count.py
Created August 20, 2014 21:41
bicycle_parking_statistics (GNU GPLv3 license)
# coding=utf-8
import urllib2
import os.path
import argparse
import decimal
from lxml import etree
import sys