Skip to content

Instantly share code, notes, and snippets.

@olafveerman
olafveerman / xform-structure.xml
Created July 15, 2014 10:13
Support material for 'Openrosa for Call centers'
<h:html xmlns="http://www.w3.org/2002/xforms"
xmlns:h="http://www.w3.org/1999/xhtml"
xmlns:ev="http://www.w3.org/2001/xml-events"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:jr="http://openrosa.org/javarosa">
<h:head>
<h:title>Simple Form</h:title>
<model>
@olafveerman
olafveerman / table-test.md
Created August 14, 2014 10:38
Table test
Column 1 Column 2 Enabling framework Finance and Investment Value chains GHG management Other column
1 2.00 ^ Trinidad & Tobago 1.23 1.81 1.98 2.22 null
1 2.00 ^ Trinidad & Tobago 1.23 1.81 1.98 2.22 null
1 2.00 ^ Trinidad & Tobago 1.23 1.81 1.98 2.22 null
1 2.00 ^ Trinidad & Tobago 1.23 1.81 1.98 2.22 null
1 2.00 ^ Trinidad & Tobago 1.23 1.81 1.98 2.22 null
1 2.00 ^ Trinidad & Tobago 1.23 1.81 1.98 2.22 null
1 2.00 ^ Trinidad & Tobago 1.23 1.81 1.98 2.22 null
1 2.00 ^ Trinidad & Tobago 1.23 1.81 1.98 2.22 null
@olafveerman
olafveerman / lisbon.md
Created April 8, 2015 10:01
Visiting Lisbon

Getting around

Lisbon is relatively small and you can get around easily by public transportation. A daily pass costs around € 6 and gives you 24 hours on the metro / bus / tram / train. Definitely worth it, especially if you're planning to take the yellow trams, which are terribly expensive.

Taxis are reasonably inexpensive and in general trustworthy. The ones at the airport are known to scam tourists. Make sure that the meter is running. A trip from the airport to the center shouldn't set you back much more than 12 euros.

Things to do in Lisbon

Lisbon is not a city with major monuments like Paris or Rome. It's mostly about experiencing the city and walking around. That said, the following areas are nice to visit:

  • center, Chiado, castle, bairro alto.
  • Belém, 20 minutes from the center by tram. Nice monastery,...
[
{
"username": "James LC",
"creation date": "2015-06-06 10:55",
"commit text": "Trace Winster building"
},
{
"username": "yourfriendjames",
"creation date": "2015-06-06 10:56",
"commit text": "Xerox building"
@olafveerman
olafveerman / remove-properties.py
Created October 8, 2015 16:40
Reads a geojson and removes all properties except for 'name'
import json
with open('./parksway.geojson','rb') as f:
reader = json.load(f)
for ft in reader["features"]:
for p in ft["properties"].keys():
if not p == 'name':
del ft["properties"][p]
#!/usr/bin/python
# Diff two OSM changesets and output a list with
# node id's that are only in the original changeset
import re
def getIDs(f):
s = set()
for line in f:
@olafveerman
olafveerman / constraint
Created March 5, 2013 12:25
XForm - constraint based on answer of previous question
<?xml version="1.0"?>
<h:html xmlns="http://www.w3.org/2002/xforms" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:jr="http://openrosa.org/javarosa" xmlns:orx="http://openrosa.org/xforms/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<h:head>
<h:title>constraint</h:title>
<model>
<instance>
<constraint id="constraint">
<age/>
<min_years_smoked/>
<years_smoked/>
@olafveerman
olafveerman / if-colors
Created April 5, 2013 16:35
Colors IF
@0: #ffffd7;
@1: #F1C40F;
@2: #F39C12;
@3: #E67E22;
@4: #D35400;
@5: #E74C3C;
@6: #C0392B;
@7: #942C21;
#!/bin/bash
# Favicon and Apple Touch Icon Generator
#
# This bash script takes an image as a parameter, and uses ImageMagick to convert it to several
# other formats used on modern websites. The following copies are generated:
#
# * apple-touch-icon-144x144-precomposed.png
# * apple-touch-icon-114x114-precomposed.png
# * apple-touch-icon-57x57-precomposed.png
@olafveerman
olafveerman / ogp-summit-proposal.md
Last active July 28, 2016 14:24
OGP summit - format for session proposals

What type of session would you like to propose?
More information about the formats is up on this Google Doc
Please send just one proposal per application.

  • Keynote
  • Workshop
  • Speed Geeking / Networking
  • Hackathon
  • Sprint
  • Round table
  • PechaKucha