Skip to content

Instantly share code, notes, and snippets.

John Ellis deckerego

Block or report user

Report or block deckerego

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@deckerego
deckerego / helm_package.sh
Created Mar 29, 2018
Update & package a Helm chart
View helm_package.sh
#!/bin/sh
HELM_CHART_DIR="../../helm_charts"
helm dependency update
helm package -d "$HELM_CHART_DIR" .
helm repo index "$HELM_CHART_DIR"
@deckerego
deckerego / docker_prune.sh
Created Mar 28, 2018
Clean up local Docker images
View docker_prune.sh
#!/bin/sh
docker system prune --all --volumes
@deckerego
deckerego / gencert.sh
Created Mar 18, 2018
Generate a wildcard SSL certificate from Let's Encrypt
View gencert.sh
#!/bin/sh
mkdir -p log lib etc
sudo docker run -it --rm --name certbot -v $PWD/etc:/etc/letsencrypt -v $PWD/lib:/var/lib/letsencrypt -v $PWD/log:/var/log/letsencrypt certbot/certbot certonly --debug --manual --preferred-challenges dns --server https://acme-v02.api.letsencrypt.org/directory
@deckerego
deckerego / display-off.conf
Created Feb 9, 2018
Turn off the console monitor when Ubuntu starts
View display-off.conf
start on startup
task
exec /usr/sbin/vbetool dpms off
@deckerego
deckerego / landscape.cfg
Last active Dec 21, 2017
ArchRetro MAME Config Examples
View landscape.cfg
video_allow_rotate = "true"
video_rotation = "3"
aspect_ratio_index = "19"
video_aspect_ratio_auto = false
video_aspect_ratio = .75
@deckerego
deckerego / Dockerfile
Created Dec 5, 2017
A test Docker container with interactive output
View Dockerfile
FROM ubuntu:latest
MAINTAINER john@deckerego.net
RUN apt-get --assume-yes update
RUN apt-get --assume-yes install docker.io iputils-ping net-tools netcat bash
ENV DOCKER_HOST 172.17.0.1
ENTRYPOINT ["ping", "localhost"]
@deckerego
deckerego / launch_wait.sh
Created Oct 19, 2017
Sleep while waiting for a TCP port to open, then execute a command
View launch_wait.sh
#!/bin/bash
HOST="$1"
PORT="$2"
RUNNING=1
while [[ $RUNNING -ne 0 ]]; do
echo "Waiting for $HOST:$PORT..."
sleep 3
nc -z "$HOST" "$PORT"
@deckerego
deckerego / find_port.bash
Last active May 22, 2018
Find IP addresses with an open and listening TCP port
View find_port.bash
#!/bin/bash
if [[ -z $2 ]]; then
echo "$0 SUBNET PORT"
exit -1
fi
CLASSC="$1"
PORT="$2"
@deckerego
deckerego / setup.py
Created Jan 13, 2017
Create a map of tuples for recursively adding files into setup.py's data_files setting
View setup.py
import os
def all_files(newroot, oldroot):
fdtuples = []
for root, dirs, files in os.walk(oldroot):
fds = []
for fd in files:
if not fd[0] is '.':
fds.append(os.path.join(root, fd))
@deckerego
deckerego / sysctl.conf
Created Dec 23, 2016
Tell the Linux kernel to reboot 5 seconds after a kernel panic
View sysctl.conf
kernel.panic = 5
You can’t perform that action at this time.