Skip to content

Instantly share code, notes, and snippets.

View bertt's full-sized avatar

Bert Temme bertt

View GitHub Profile
"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);
@bertt
bertt / gist:39775ec987f3a3a62481904baf111ff2
Created June 29, 2017 07:30
Aliases for developing on WSL
alias dev='cd /mnt/d/dev/github.com'
alias godev='cd /mnt/d/dev/go/src/github.com'
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
@bertt
bertt / connection.cs
Last active September 15, 2017 07:53 — forked from glennc/connection.cs
SignalRAnnouncement
var connection = new HubConnectionBuilder()
.WithUrl("http://localhost:5000/chat")
.WithConsoleLogger()
.Build();
connection.On<string>("Send", data =>
{
Console.WriteLine($"Received: {data}");
});
package main
import (
"fmt"
"net/http"
"sort"
"strings"
)
func handler(w http.ResponseWriter, r *http.Request) {
@bertt
bertt / Generated Javascript file
Created January 6, 2013 12:30
TypeScript and JQuery sample
var Person = (function () {
function Person(name) {
this.name = name;
}
return Person;
})();
function greeter(person) {
return "hallo " + person.name;
}
var person = new Person("bert");
@bertt
bertt / gist:c35ef7852374c1e58905c70a526258f7
Created July 6, 2017 07:12
Install golang 1.8.3 on Raspberry Pi
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
@bertt
bertt / gist:452190a661592f9384e8148cc51aaecb
Created February 27, 2018 09:14
Microsoft.Spatial test
using System;
using System.IO;
using Microsoft.Spatial;
namespace TestSpatial2
{
class Program
{
static void Main(string[] args)
How to debug your Android application over WIFI
0] Preparations
- Connect Android phone to usb
- Put your IDE in debug mode
- get adb tool working on command line
# Sample datat set: New York City taxicab data (10 milion records)
## 1] met timescaledb
d:\> cd D:\gisdata\nyc_cabs
d:\gisdata\nyc_cabs> bash
// start database docker
$ docker run -d --name timescaledb -p 5432:5432 -e POSTGRES_PASSWORD=postgres timescale/timescaledb-postgis
// create schema for taxi rides
$ psql -U postgres -d postgres -h localhost < nyc_data.sql