Skip to content

Instantly share code, notes, and snippets.

View bertt's full-sized avatar

Bert Temme bertt

View GitHub Profile
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
@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)
package main
import (
"fmt"
"net/http"
"sort"
"strings"
)
func handler(w http.ResponseWriter, r *http.Request) {
@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}");
});
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 / 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: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'
"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);
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'
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: