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 / 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))
@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
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.
@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 / 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 / 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 / Virunga_beginner.geojson
Created April 14, 2018 00:13
Virunga, DRC - buildings
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jmasselink
jmasselink / Virunga_intermediate.geojson
Last active April 14, 2018 00:15
Virunga - residential areas, roads
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jmasselink
jmasselink / mapathon_aoi.geojson
Created April 14, 2018 00:17
mapathon_aois_joelm - 2 Kenya, 2 DRC
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.