This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// create table with srid=4326 | |
CREATE TABLE testbert1 | |
( | |
id bigserial NOT NULL, | |
description character varying(500), | |
encodingtype integer, | |
location public.geometry(geometry,4326) | |
) | |
// insert geometry |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Apache Kafka hello World | |
1] Zookeeper | |
docker run -d -p 2181:2181 --name zookeeper jplock/zookeeper | |
2] Kafka | |
docker run -d --name kafka --link zookeeper:zookeeper ches/kafka | |
3] Create Consumer: | |
docker run -t -i --rm geertvb/kafkacat kafkacat -C -b 172.17.0.3:9092 -t testtopic | |
4] Create Producer: | |
docker run -t -i --rm geertvb/kafkacat kafkacat -P -b 172.17.0.3:9092 -t testtopic |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tip: use Python 2.7 (not 3.5) and the right bit version (64) otherwise | |
things will go wrong | |
1] Install | |
linux: | |
sudo apt-get install libgeos-dev | |
pip install shapely | |
sudo -H pip install quantized-mesh-tile | |
mac: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
How to enable NuGet package publishing on AppVeyor | |
1] Create nuspec file next to .csproj file in GitHub (same name) | |
2] Enable NuGet packaging | |
AppVeyor -> settings- > Build -> MsBuild -> Automatic packaging -> check 'Package NuGet projects' | |
3] Add NuGet Api key | |
AppVeyor -> settings -> deployment -> deployment provider -> select NuGet -> Api Key -> fill in your NuGet api key | |
Optional: secure api key with https://ci.appveyor.com/tools/encrypt | |
4] Add version number patching | |
AppVeyor -> settings -> General -> AssemblyInfo patching -> Check 'On' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict" | |
let UA_KEY = 'your_Universal_analytics_key (starts with UA)' | |
var ua = require('universal-analytics'); | |
let visitor = ua(UA_KEY); | |
let value= 35; | |
visitor.event('sensor 1', value,function (err){ | |
if (err) return console.log("error:" + err); | |
console.log('Sent event to GA', 'Gesture', value); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias dev='cd /mnt/d/dev/github.com' | |
alias godev='cd /mnt/d/dev/go/src/github.com' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget https://storage.googleapis.com/golang/go1.8.3.linux-armv6l.tar.gz | |
sudo tar -C /usr/local -xzf go1.8.3.linux-armv6l.tar.gz | |
export PATH=$PATH:/usr/local/go/bin |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
api tdf2017 | |
// teams | |
http://fep-api.dimensiondata.com/v2/teams | |
// riders (race=19) | |
http://fep-api.dimensiondata.com/v2/rider/v2/19 | |
// stages | |
http://fep-api.dimensiondata.com/v2/race/19/stages |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var connection = new HubConnectionBuilder() | |
.WithUrl("http://localhost:5000/chat") | |
.WithConsoleLogger() | |
.Build(); | |
connection.On<string>("Send", data => | |
{ | |
Console.WriteLine($"Received: {data}"); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"net/http" | |
"sort" | |
"strings" | |
) | |
func handler(w http.ResponseWriter, r *http.Request) { |