Skip to content

Instantly share code, notes, and snippets.

View jdhoek's full-sized avatar

Jeroen Hoek jdhoek

View GitHub Profile
@jdhoek
jdhoek / convert_kruidvat.py
Created February 19, 2022 12:46
Kruidvat website-tag fixer
#!/usr/bin/env python3
import sys
from lxml import etree
def show_help():
print("{} INPUT > OUTPUT".format(sys.argv[0]))
@jdhoek
jdhoek / Styles_Sidewalks-style.mapcss
Created January 15, 2021 13:30
Sidewalks Map Paint Style with sidewalk=separate
meta {
title: "Sidewalks";
description: "Visualizes the sidewalk attribute of highways. sidewalk=* is rendered as a thick dashed line, separately mapped sidewalks tagged footway=sidewalk are rendered thicker.";
link: "https://wiki.openstreetmap.org/wiki/Key:sidewalk";
author: "Cobra";
version: "0.6_2019-04-09";
min-josm-version: "4399";
}
@jdhoek
jdhoek / git-branch-cleaner
Created February 8, 2016 13:03
Bash script for cleaning up old git branches from local and remote repositories
#!/bin/bash
ME=$(basename $0)
function showHelp {
cat << EOF
Clean-up old git branches
Usage: $ME local show-last [AGE_IN_WEEKS]
$ME remote show-last REMOTE [AGE_IN_WEEKS]
@jdhoek
jdhoek / ClientSideSSLConnectIT.java
Created November 2, 2014 18:49
Apache HttpComponents httpclient: connect to client-side SSL secured server
package org.example.test;
import org.apache.http.HttpEntity;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.config.Registry;
import org.apache.http.config.RegistryBuilder;
import org.apache.http.conn.HttpClientConnectionManager;
import org.apache.http.conn.socket.ConnectionSocketFactory;
import org.apache.http.conn.socket.PlainConnectionSocketFactory;