Skip to content

Instantly share code, notes, and snippets.

@mterzo
mterzo / helper.sh
Last active January 11, 2017 05:54
Shell function to wrap python development in docker
pyenv(){
if [ $# -gt 0 ]; then
ver=$1
else
ver='2.7'
fi
case $ver in
'2.6')
name="2-6"
@mterzo
mterzo / node.sh
Created January 18, 2017 23:58
Node env wrapper for docker
npmenv(){
if [ $# -gt 0 ]; then
ver=$1
else
ver='4.2.2'
fi
name=$(echo $ver|awk '{sub(/\./, "-"); print}')
container="node:$ver"
docker run --hostname node$name -it -v ${PWD}:/src -w /src \
@mterzo
mterzo / puppetboard.yaml
Created January 25, 2017 21:55
hire configuration for puppetboard
---
classes:
- docker::run_instance
docker::run_instance::instance:
nginx_proxy:
image: 'wilder/nginx-proxy'
volumes:
- '/etc/ssl/private:/etc/nginx/certs:ro'
- '/var/run/docker.sock:/var/run/docker.sock:ro'
@mterzo
mterzo / httpget
Last active January 26, 2017 09:40
report request
/reports/json?draw=2&columns%5B0%5D%5Bdata%5D=0&columns%5B0%5D%5Bname%5D=&columns%5B0%5D%5Bsearchable%5D=true&
columns%5B0%5D%5Borderable%5D=true&columns%5B0%5D%5Bsearch%5D%5Bvalue%5D=&columns%5B0%5D%5Bsearch%5D%5Bregex%5D=false&
columns%5B1%5D%5Bdata%5D=1&columns%5B1%5D%5Bname%5D=&columns%5B1%5D%5Bsearchable%5D=true&columns%5B1%5D%5Borderable%5D=true&
columns%5B1%5D%5Bsearch%5D%5Bvalue%5D=*&columns%5B1%5D%5Bsearch%5D%5Bregex%5D=false&columns%5B2%5D%5Bdata%5D=2&
columns%5B2%5D%5Bname%5D=&columns%5B2%5D%5Bsearchable%5D=true&columns%5B2%5D%5Borderable%5D=true&
columns%5B2%5D%5Bsearch%5D%5Bvalue%5D=&columns%5B2%5D%5Bsearch%5D%5Bregex%5D=false&columns%5B3%5D%5Bdata%5D=3&
columns%5B3%5D%5Bname%5D=&columns%5B3%5D%5Bsearchable%5D=true&columns%5B3%5D%5Borderable%5D=true&
columns%5B3%5D%5Bsearch%5D%5Bvalue%5D=&columns%5B3%5D%5Bsearch%5D%5Bregex%5D=false&columns%5B4%5D%5Bdata%5D=4&
columns%5B4%5D%5Bname%5D=&columns%5B4%5D%5Bsearchable%5D=true&columns%5B4%5D%5Borderable%5D=true&
columns%5B4%5D%5Bsearch
@mterzo
mterzo / .bashrc
Created February 10, 2017 17:14
Quick and dirty json pretty print
prettyjson(){
python -c 'import json, sys; print json.dumps(json.loads(\
sys.stdin.read()), sort_keys=True, indent=2,\
separators=(",", ": "))'
}
# Already have docker flow proxy configured
# http://proxy.dockerflow.com
# Puppetboard uses this to host HTTP.
#
# Volume: /docker/puppetlabs is NFS backed to all the swarm nodes.
#
version: "3.2"
services:
puppet: