Skip to content

Instantly share code, notes, and snippets.

View ericgreene's full-sized avatar

Eric Greene ericgreene

View GitHub Profile
@ericgreene
ericgreene / split_keyboards.md
Created February 8, 2019 05:03 — forked from itod/split_keyboards.md
Every "split" mechanical keyboard currently being sold that I know of
@ericgreene
ericgreene / cleanup_docker.sh
Created February 1, 2018 22:07 — forked from jaronkk/cleanup_docker.sh
Cleanup and reset docker on Jenkins workers / slaves
#!/bin/bash
# This script should be located on each Jenkins slave, and the jenkins user should have permission to run it with sudo
# Attempts to cleanly stop and remove all containers, volumes and images.
docker ps -q | xargs --no-run-if-empty docker stop
docker ps -q -a | xargs --no-run-if-empty docker rm --force --volumes
docker volume ls -q | xargs --no-run-if-empty docker volume rm
docker images -a -q | xargs --no-run-if-empty docker rmi -f
# Stops the docker service, unmounts all docker-related mounts, removes the entire docker directory, and starts docker again.
# Ubuntu upstart file at /etc/init/mms-agent.conf
description "MongoDB Monitoring Service (MMS) Agent"
pre-start script
mkdir -p /var/log/mms-agent/
end script
post-stop script
echo "$(date +'%Y-%m-%d %T,000') INFO mms-agent stopped" >> /var/log/mms-agent/agent.log