Skip to content

Instantly share code, notes, and snippets.

@chris-cooper
chris-cooper / flytrex-kml-to-gpx.style
Last active August 29, 2015 14:06
Flytrex KML to GPX (gpsbabel style)
# gpsbabel XCSV style file
#
# Format: Flytrex KML to GPX (output only)
# Author: Chris Cooper
#
DESCRIPTION Flytrex KML to GPX
SHORTLEN 8
# FILE LAYOUT DEFINITIIONS:
@chris-cooper
chris-cooper / gist:590465f9b0dadd7fc91b
Created June 25, 2015 23:18
Cesium low level textured quad
var viewer = new Cesium.Viewer('cesiumContainer');
var scene = viewer.scene;
var flatten = function(ar) {
return [].concat.apply([], ar);
};
var extract = function(p) {
return [p.x, p.y, p.z];
};
import requests
doarama_api_url = "https://www.doarama.com/api/0.2"
doarama_params = {'api-name': 'MY_API_NAME', 'api-key': 'MY_API_KEY', 'Accept': 'application/JSON'}
# Query Activity Types
r = requests.get(doarama_api_url+"/activityType", headers=doarama_params)
print("Doarama Activity Types: {}".format(r.text))
# Test Upload Activity
@chris-cooper
chris-cooper / simple.dzml
Created October 11, 2015 23:05
A simple DZML example for doarama.com
[{
"id": "document",
"version": "1.0"
}, {
"id": "Office",
"availability": "2012-06-20T16:00:00Z/2020-06-20T16:02:00Z",
"position": {
"cartographicDegrees": [151.1951317, -33.9053295, 0.0]
},
"billboard": {
@chris-cooper
chris-cooper / doarama-api-test.sh
Created October 19, 2015 03:57
Doarama API curl example
#!/bin/bash
# A self contained Doarama API example tested under Ubuntu bash (may also work on Windows under git bash or cygwin)
API_NAME='YOUR_API_NAME'
API_KEY='YOUR_API_KEY'
USER_ID='1'
#API='https://doarama-thirdparty-dev.herokuapp.com/api/0.2'
API='https://api.doarama.com/api/0.2'