Skip to content

Instantly share code, notes, and snippets.

This file has been truncated, but you can view the full file.
<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>
<gpx version="1.1" xmlns="http://www.topografix.com/GPX/1/1" xmlns:geotracker="http://ilyabogdanovich.com/gpx/extensions/geotracker" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd" creator="Geo Tracker 3.3.0.1338 for Android by Ilya Bogdanovich">
<metadata>
<name>26 août 2018 10:17:38 AM</name>
<author>
<name>Enregistré par Geo Tracker pour Android de Ilya Bogdanovich</name>
<link href="https://play.google.com/store/apps/details?id=com.ilyabogdanovich.geotracker" />
</author>
<link href="https://play.google.com/store/apps/details?id=com.ilyabogdanovich.geotracker" />
<time>2018-08-26T08:17:38.237Z</time>
@gfoo
gfoo / Create permission
Last active December 7, 2018 16:48
Create permission
alias urlencode='python2 -c "import sys, urllib as ul; print ul.quote_plus(sys.argv[1])"'
res_id=$(curl -s -u admin_test@unil.ch:test -X POST -H "Content-Type: application/json" -d @user.json http://localhost:3333/v2/resources |jq -r '."@id"')
echo $res_id
curl -s http://localhost:3333/v2/resources/$(urlencode $res_id)
sed -e 's,@OWNER@,'"${res_id}"',g' collection.json | curl -s -u gilles.faucherand@unil.ch:test -X POST -H "Content-Type: application/json" -d @- http://localhost:3333/v2/resources
@gfoo
gfoo / create and update
Last active November 23, 2018 12:45
Knora API v2 curl tests
alias urlencode='python2 -c "import sys, urllib as ul; print ul.quote_plus(sys.argv[1])"'
res_id=$(curl -s -u root@example.com:test -X POST -H "Content-Type: application/json" -d @create.json http://localhost:3333/v2/resources |jq -r '."@id"')
# echo $res_id
#curl -s http://localhost:3333/v2/resources/$(urlencode $res_id)
prop_id=$(curl -s http://localhost:3333/v2/resources/$(urlencode $res_id) |jq -r '."anything:hasRichtext"."@id"')