Skip to content

Instantly share code, notes, and snippets.


Peter pteich

View GitHub Profile
pteich / main.go
Last active Aug 5, 2020
Example for using go's sync.errgroup together with signal detection signal.Notify to stop all running goroutines
View main.go
package main
import (

Keybase proof

I hereby claim:

  • I am pteich on github.
  • I am pteich ( on keybase.
  • I have a public key ASCLynuk3IisbBsZktWF5fB9yF3mP1zgsv2aKsGNdR-Cvwo

To claim this, I am signing this object:

pteich / Dockerfile
Created Jul 12, 2016
Tomcat Dockerfile Description
View Dockerfile
FROM tomcat:7-jre8-alpine
MAINTAINER Peter Teich <>
# mit RUN werden beim Bauen des Image Shell-Befehle IM Container ausgeführt
# möglichst viele Befehle miteinmal ausführen, da nach jedem RUN ein neuer Layer im Container gespeichert wird
# Beispiel:
# RUN apt-get update && apt-get install -y build-essential curl && \
# apt-get clean && \
# rm -rf /var/lib/apt/lists/* && \
pteich / request_wowzalisteners.go
Last active Nov 2, 2015
Request Wowza Stream Listeners
View request_wowzalisteners.go
package main
import (
httpDigestAuth ""
pteich / request_icecastlisteners.go
Last active Nov 21, 2018
Request Listeners Stats from Icecast
View request_icecastlisteners.go
package main
import (
pteich / gist:8d43ed6dadfaa74b8b6e
Last active Aug 29, 2015
Fluentd Icecast input with request line split
View gist:8d43ed6dadfaa74b8b6e
^(?<host>[^ ]*) (?<logname>[^ ]*) (?<user>[^ ]*) \[(?<time>[^\]]*)\] \"GET (?<request_uri>[^\?]+)\?(?<request_args>[^ ]*) (?<request_protocol>[^ ]*)\" (?<response>[^ ]*) (?<bytes>[^ ]*) \"(?<referrer>[^\"]*)\" \"(?<agent>[^\"]*)\" (?<duration>[^ ]*)
Time Format:
%d/%b/%Y:%H:%M:%S %z
type tail
path /var/log/foo/bar.log
pteich / .htaccess
Last active Aug 29, 2015
Apache Redirect non www to www subdomain (httpd.conf or .htaccess)
View .htaccess
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(?!www\.)(.+) [NC]
RewriteRule ^(.*) http://www.%1$1 [R=301,NE,L]
pteich /
Created Oct 22, 2014
Bootstrap to setup up Vagrant Ubuntu Box with Apache, PHP, ElasticSearch, Beanstalkd and Beanstalk workers via Supervisord
#!/usr/bin/env bash
sudo apt-get install mc -y
wget -qO - | sudo apt-key add -
echo "deb stable main" | sudo tee -a /etc/apt/sources.list.d/elasticsearch.list
sudo apt-get update
sudo apt-get install openjdk-7-jre-headless -y
sudo apt-get install elasticsearch -y
sudo apt-get install php5-curl -y
sudo /usr/share/elasticsearch/bin/plugin -install mobz/elasticsearch-head
You can’t perform that action at this time.