Skip to content

Instantly share code, notes, and snippets.

View tobstarr's full-sized avatar

Tobias Schwab tobstarr

View GitHub Profile
defmodule Dynasty.Sonos.Discovery do
use GenServer
@playersearch ~S"""
M-SEARCH * HTTP/1.1
HOST: 239.255.255.250:1900
MAN: "ssdp:discover"
MX: 1
ST: urn:schemas-upnp-org:device:ZonePlayer:1
"""
@tobstarr
tobstarr / cloudSettings
Last active February 27, 2018 07:42
Visual Studio Code Settings Sync Gist
{"lastUpload":"2018-02-27T07:42:13.854Z","extensionVersion":"v2.8.7"}
FROM ruby:2.4.1
# add nodejs and yarn dependencies for the frontend
RUN curl -sL https://deb.nodesource.com/setup_6.x | bash - && \
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
# install bundler in specific version
RUN gem install bundler --version "1.15.3"
package main
import (
"context"
"encoding/json"
"fmt"
"log"
"net/http"
"os"
"time"
testing go version go1.4.3 linux/amd64
user=18.36 system=2.86 total=8.34 max_rss=606004kB status=0 nvim -u syntastic.rc +wq /home/tobias/github.com/kubernetes/kubernetes/cmd/kubectl/kubectl.go
user=18.49 system=2.58 total=8.28 max_rss=605960kB status=0 nvim -u syntastic.rc +wq /home/tobias/github.com/kubernetes/kubernetes/cmd/kubectl/kubectl.go
user=18.49 system=2.68 total=8.24 max_rss=606016kB status=0 nvim -u syntastic.rc +wq /home/tobias/github.com/kubernetes/kubernetes/cmd/kubectl/kubectl.go
user=18.58 system=2.65 total=8.20 max_rss=606040kB status=0 nvim -u syntastic.rc +wq /home/tobias/github.com/kubernetes/kubernetes/cmd/kubectl/kubectl.go
user=18.42 system=2.65 total=8.15 max_rss=606012kB status=0 nvim -u syntastic.rc +wq /home/tobias/github.com/kubernetes/kubernetes/cmd/kubectl/kubectl.go
user=0.07 system=0.07 total=0.16 max_rss=24164kB status=0 nvim -u no_syntastic.rc +wq /home/tobias/github.com/kubernetes/kubernetes/cmd/kubectl/kubectl.go
user=0.07 system=0.09 total=0.18 max_rss=23900kB status=0 nv
@tobstarr
tobstarr / go-perf.txt
Created January 6, 2016 08:16
Go build performance by version
go version go1.4.3 linux/amd64
user=27.26 system=3.68 total=14.95 max_rss=125776kB status=0 go build github.com/dynport/dgtk/...
user=26.53 system=3.09 total=8.54 max_rss=125780kB status=0 go build github.com/dynport/dgtk/...
user=26.19 system=3.30 total=8.40 max_rss=125772kB status=0 go build github.com/dynport/dgtk/...
user=26.44 system=3.34 total=8.50 max_rss=125992kB status=0 go build github.com/dynport/dgtk/...
user=26.54 system=3.08 total=8.49 max_rss=125772kB status=0 go build github.com/dynport/dgtk/...
user=26.40 system=3.32 total=8.63 max_rss=126344kB status=0 go build github.com/dynport/dgtk/...
user=26.30 system=3.23 total=8.50 max_rss=125772kB status=0 go build github.com/dynport/dgtk/...
user=26.50 system=3.23 total=8.54 max_rss=125772kB status=0 go build github.com/dynport/dgtk/...
user=26.44 system=3.24 total=8.59 max_rss=125776kB status=0 go build github.com/dynport/dgtk/...
@tobstarr
tobstarr / Makefile
Last active January 6, 2016 13:40
openpgp-issue
default:
go run main.go
@tobstarr
tobstarr / Makefile
Last active September 25, 2015 19:43
logs:
docker logs -f nginx
start:
docker rm -f nginx
docker run --name nginx -d -p 8080:8080 -v $(shell pwd)/nginx.conf:/etc/nginx/nginx.conf:ro nginx:1.9.3
test:
curl -H 'User-Agent: User Agent with " Double Quotes' 'http://127.0.0.1:8080/path with space and " quotes'
@tobstarr
tobstarr / trace.txt
Created September 18, 2015 13:50
trace aws
traceroute to 54.77.43.92 (54.77.43.92), 30 hops max, 60 byte packets
1 speedport.ip (192.168.2.1) 0.512 ms 0.646 ms 0.622 ms
2 87.186.224.104 (87.186.224.104) 18.048 ms 18.453 ms 18.887 ms
3 87.186.202.162 (87.186.202.162) 24.174 ms 24.195 ms 24.182 ms
4 hh-eb5-i.HH.DE.NET.DTAG.DE (62.154.32.222) 25.474 ms 26.223 ms 26.227 ms
5 * * *
6 * * *
7 * * *
8 213.242.106.86 (213.242.106.86) 80.796 ms 212.73.251.102 (212.73.251.102) 86.979 ms 213.242.106.86 (213.242.106.86) 78.496 ms
9 178.236.0.126 (178.236.0.126) 79.640 ms 178.236.0.128 (178.236.0.128) 76.919 ms 178.236.0.126 (178.236.0.126) 80.213 ms
### Keybase proof
I hereby claim:
* I am tobstarr on github.
* I am tobstarr (https://keybase.io/tobstarr) on keybase.
* I have a public key whose fingerprint is 17C0 8185 AD46 9086 E682 1F5B D469 0F65 7ABB 812F
To claim this, I am signing this object: