Skip to content

Instantly share code, notes, and snippets.

@vicmortelmans
vicmortelmans / parish-boundaries.model
Last active May 2, 2018 22:51
QGIS model to generate parish borders based on list of addresses
{
"values": {
"inputs": {
"parishes": {
"values": {
"pos": {
"values": {
"y": 369.0,
"x": 351.0
},
@vicmortelmans
vicmortelmans / assign_parishes.py
Last active May 4, 2018 22:24
QGIS script with as inputs a CRAB address layer and a table defining parishes by address ranges and as output the CRAB layer with parish attribute added
##crab=vector
##parishes=table
##crab_with_parishes=output vector
from qgis.core import *
from PyQt4.QtCore import *
import processing
import re
import csv
import datetime
@vicmortelmans
vicmortelmans / shortcut-keys.txt
Last active June 1, 2019 20:14
Various shortcut keys for my desktop and applications
ubuntu
xbacklight
system-config-printer
pavucontrol
lxrandr
arandr
blueman-manager
udiskie
udiskie-umount -a
@vicmortelmans
vicmortelmans / get_html.py
Created June 18, 2017 12:54
Python on GAE code for refactoring YQL html table query to lxml xpath query
import cookielib
from lxml import html
import urllib2
def element_to_json(e):
# transform a single element
# returns a tuple tag,content,tail where
# - tag is the name of the element
# - content is a dict with the element's attributes and child elements
<link rel="import" href="../polymer/polymer.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
<link rel="import" href="../paper-toast/paper-toast.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<polymer-element name="my-element">
<template>
<style>
:host {
@vicmortelmans
vicmortelmans / radioPlayerLiveConfiguration.json
Last active October 25, 2022 05:52
Radio Player Live configuration
[{"id":0,"name":"Radio Maria Nederland","mrl":"http://www.radiomaria.nl/upload/userfiles/file/webstream.pls","category":"Christian","logo":"","favorite":"fav.png","web":"http://www.radiomaria.nl","source":"Soutcast","type":"MP3"},{"name":"Radio Maria Vlaanderen","mrl":"http://stream.radiomaria.be/RadioMaria-96.m3u","category":"Christian","logo":"","favorite":"fav.png","web":"www.radiomaria.be","id":1,"type":""},{"id":2,"name":"Gregoriaans","mrl":"http://streams.greenhost.nl:8080/gregoriaans","category":"Christian","logo":"","favorite":"fav.png","web":"http://concertzender.nl/"},{"name":"Oude Muziek","mrl":"http://streams.greenhost.nl:8080/oudemuziek","category":"Christian","logo":"","favorite":"fav.png","web":"http://concertzender.nl/","id":3},{"name":"Jazz","mrl":"http://streams.greenhost.nl:8080/jazz","category":"Christian","logo":"","favorite":"fav.png","web":"http://concertzender.nl/","id":4},{"name":"Nieuwe Muziek","mrl":"http://streams.greenhost.nl:8080/nieuwemuziek","category":"Christian","logo":"","fa
@vicmortelmans
vicmortelmans / custom-ruleset-eo-local.parametrized.xml
Created April 12, 2012 18:34
Custom ruleset for LiturgyCalendar XML/XSLT toolset - running locally - only general calendar
<?xml version="1.0" encoding="UTF-8"?>
<liturgicaldays>
<locale>en-us</locale>
<form>eo</form>
<includeliturgicaldays>
https://raw.github.com/vicmortelmans/LiturgyCalendar/master/liturgy.calendar.roman-rite.general.eo.ruleset.parametrized.xml</includeliturgicaldays>
<options>epiphany-std,ascension-std,corpuschristi-std</options>
<cacheservice></cacheservice>
<restservice></restservice>
<cachefolder>file:///C:/temp</cachefolder>
@vicmortelmans
vicmortelmans / custom-ruleset-eo.parametrized.xml
Created April 12, 2012 17:12
Custom ruleset for LiturgyCalendar XML/XSLT toolset
<?xml version="1.0" encoding="UTF-8"?>
<liturgicaldays>
<locale>en-us</locale>
<form>eo</form>
<includeliturgicaldays>https://raw.github.com/vicmortelmans/LiturgyCalendar/master/liturgy.calendar.roman-rite.general.eo.ruleset.parametrized.xml</includeliturgicaldays>
<options>epiphany-alt,ascension-std,corpuschristi-std</options>
<cacheservice>http://prentenmissaal.my28msec.com/cache/cache?doc=calendar&amp;expiration=0&amp;url=$url</cacheservice>
<restservice>http://xslt.childrensmissal.appspot.com/calendar?output=xml&amp;ruleset=$ruleset&amp;mode=$mode&amp;cache=$cache&amp;date=$date&amp;set=$set&amp;score=$score&amp;minrankprecedence=$minrankprecedence&amp;coordinates=$coordinates&amp;year=$year</restservice>
<cachefolder>file:///C:/temp</cachefolder>
<liturgicalday>
@vicmortelmans
vicmortelmans / doctrinafidei.xslt
Created April 7, 2012 21:37
XSLT to turn YQL html open table output for http://www.doctrinafidei.va/ into XML that can be read by Yahoo Pipes to be turned into an RSS feed
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:o="urn:schemas-microsoft-com:office:office"
version="1.0">
<xsl:output indent="yes"/>
<xsl:template match="/">
<data>
<xsl:apply-templates/>
</data>
</xsl:template>