Skip to content

Instantly share code, notes, and snippets.

View jmasselink's full-sized avatar
🏠
Working from home

Joel Masselink jmasselink

🏠
Working from home
View GitHub Profile
@jmasselink
jmasselink / Kenya_intermediate.geojson
Last active April 14, 2018 00:06
Kenya - roads, rivers, residential areas.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jmasselink
jmasselink / Kenya_beginner.geojson
Last active April 14, 2018 00:05
Kenya - buildings only
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jmasselink
jmasselink / africa_wilderness.geojson
Last active April 13, 2018 20:19
Mapathon AOIs
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jmasselink
jmasselink / add_XYZ_qgis3.py
Created March 14, 2018 02:37
Add XYZ to QGIS 3.x
"""
poached from: https://raw.githubusercontent.com/klakar/QGIS_resources/master/collections/Geosupportsystem/python/qgis_basemaps.py
This script should be run from the Python console inside QGIS.
It adds online sources to the QGIS Browser.
Each source should contain a list with the folowing items (string type):
[sourcetype, title, authconfig, password, referer, url, username, zmax, zmin]
You can add or remove sources from the sources section of the code.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jmasselink
jmasselink / Awk generate hrefs (HTML)
Created November 29, 2016 16:09
Generate hrefs from list of links
If you have a list of hyperlinks in Markdown, strip out extraneous text and put them into a text file (list.tst).
Using bash, enter the following command:
awk '{ print "<a href=" $o "</a>"}' list.txt > list-edit.txt
@jmasselink
jmasselink / rename.py
Created February 25, 2015 21:52
rename files
__author__ = 't-joelm'
import glob, os
import csv
def rename(dir, pattern, titlePattern)
for pathAndFilename in glob.iglob(os.path.join(dir, pattern)):
title, ext = os.path.splitext(os.path.basename(pathAndFilename))
os.rename(pathAndFilename,
os.path.join(dir, titlePattern % title + ext))