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 / Dockerfile
Last active November 2, 2018 18:05
Jenkins for go projects with docker
FROM ubuntu:12.04
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y openjdk-6-jdk curl git-core build-essential bzr
RUN mkdir -p /tmp/downloads
# install go
RUN curl -sf -o /tmp/downloads/go1.1.1.linux-amd64.tar.gz -L https://go.googlecode.com/files/go1.1.1.linux-amd64.tar.gz
RUN mkdir -p /opt && cd /opt && tar xfz /tmp/downloads/go1.1.1.linux-amd64.tar.gz
# install jenkins
RUN curl -sf -o /opt/jenkins-1.523.war -L http://mirrors.jenkins-ci.org/war/1.523/jenkins.war
package main
import (
"context"
"encoding/json"
"fmt"
"log"
"net/http"
"os"
"time"
@tobstarr
tobstarr / keybase.md
Created March 15, 2014 17:08
keybase.md

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 B929 A94D 288F DB66 81D2 B958 FDE9 ED92 6EBC FE12

To claim this, I am signing this object:

@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"
@tobstarr
tobstarr / types.go
Created February 28, 2014 09:59
Cloudformation Golang DSL
package main
import (
"encoding/json"
"strings"
)
// base types
type Hash map[string]interface{}
type List []interface{}
@tobstarr
tobstarr / Makefile
Created July 22, 2013 10:15
Golang SSH client
default:
@go get code.google.com/p/go.crypto/ssh
go build -o bin/test_ssh_client *.go
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 / Makefile
Last active January 6, 2016 13:40
openpgp-issue
default:
go run main.go