Skip to content

Instantly share code, notes, and snippets.

View puppet-swarm.yml
# 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:
@mterzo
mterzo / .bashrc
Created Feb 10, 2017
Quick and dirty json pretty print
View .bashrc
prettyjson(){
python -c 'import json, sys; print json.dumps(json.loads(\
sys.stdin.read()), sort_keys=True, indent=2,\
separators=(",", ": "))'
}
@mterzo
mterzo / httpget
Last active Jan 26, 2017
report request
View httpget
/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 / puppetboard.yaml
Created Jan 25, 2017
hire configuration for puppetboard
View puppetboard.yaml
---
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 / node.sh
Created Jan 18, 2017
Node env wrapper for docker
View node.sh
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 / helper.sh
Last active Jan 11, 2017
Shell function to wrap python development in docker
View helper.sh
pyenv(){
if [ $# -gt 0 ]; then
ver=$1
else
ver='2.7'
fi
case $ver in
'2.6')
name="2-6"
You can’t perform that action at this time.