Skip to content

Instantly share code, notes, and snippets.

@MaxPeal
MaxPeal / debug.log
Created December 30, 2018 00:29 — forked from ssccio/debug.log
Vagrant up debug
INFO global: Vagrant version: 2.2.2
INFO global: Ruby version: 2.4.4
INFO global: RubyGems version: 2.6.14.1
INFO global: VAGRANT_LOG="debug"
INFO global: VAGRANT_INSTALLER_VERSION="2"
INFO global: VAGRANT_INSTALLER_ENV="1"
INFO global: VAGRANT_INSTALLER_EMBEDDED_DIR="/opt/vagrant/embedded"
INFO global: VAGRANT_EXECUTABLE="/opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/bin/vagrant"
WARN global: resolv replacement has not been enabled!
DEBUG global: Loading core plugin: /opt/vagrant/embedded/gems/2.2.2/gems/vagrant-2.2.2/plugins/synced_folders/nfs/plugin.rb
@MaxPeal
MaxPeal / Caddyfile
Created March 26, 2020 17:24 — forked from Ocramius/Caddyfile
Example docker + docker-compose + caddy + traefik setup that routes to multiple apps from one exposed HTTP port
:80 {
root /serve
}
@MaxPeal
MaxPeal / docker-tags.sh
Created May 16, 2020 09:40 — forked from nealey/docker-tags.sh
List Docker Image Tags using Bourne shell (including Bash)
#! /bin/sh
image="$1"; shift
if [ -z "$image" ] || [ "$image" == "--help" ]; then
echo "Usage: $0 IMAGE"
echo
echo "Prints all tags associated with IMAGE in a docker repository"
exit 1
fi
@MaxPeal
MaxPeal / docker-install.sh
Created September 2, 2020 18:54 — forked from wdullaer/install.sh
Install Latest Docker and Docker-compose on Ubuntu
# Ask for the user password
# Script only works if sudo caches the password for a few minutes
sudo true
# Install kernel extra's to enable docker aufs support
# sudo apt-get -y install linux-image-extra-$(uname -r)
# Add Docker PPA and install latest version
# sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
# sudo sh -c "echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list"
@MaxPeal
MaxPeal / docker-cleanup
Last active September 2, 2020 18:55 — forked from wdullaer/docker-cleanup
Cleanup unused Docker images and containers
#!/bin/sh
# Cleanup docker files: untagged containers and images.
#
# Use `docker-cleanup -n` for a dry run to see what would be deleted.
untagged_containers() {
# Print containers using untagged images: $1 is used with awk's print: 0=line, 1=column 1.
# NOTE: "[0-9a-f]{12}" does not work with GNU Awk 3.1.7 (RHEL6).
# Ref: https://github.com/blueyed/dotfiles/commit/a14f0b4b#commitcomment-6736470
docker ps -a | tail -n +2 | awk '$2 ~ "^[0-9a-f]+$" {print $'$1'}'
@MaxPeal
MaxPeal / reregister-qemu-binfmt.sh
Last active September 28, 2020 11:45 — forked from ArturKlauser/reregister-qemu-binfmt.sh
Building Multi-Architecture Docker Images With Buildx
#!/bin/bash
# (c) Artur.Klauser@computer.org
#
# This script tries to reregister QEMU's binfmt_misc handlers with the
# fix-binary (F) flag in order to be usable with 'docker buildx' to build
# multi-architecture images.
# For more information see:
# https://nexus.eddiesinentropy.net/2020/01/12/Building-Multi-architecture-Docker-Images-With-Buildx/
function remove_binfmt() {
@MaxPeal
MaxPeal / check-qemu-binfmt.sh
Last active September 28, 2020 11:46 — forked from ArturKlauser/check-qemu-binfmt.sh
Building Multi-Architecture Docker Images With Buildx
#!/bin/bash
# (c) Artur.Klauser@computer.org
#
# This script checks if all software requirements are met in a Linux environment
# in order to use 'docker buildx' to build multi-architecture images.
# For more information see:
# https://nexus.eddiesinentropy.net/2020/01/12/Building-Multi-architecture-Docker-Images-With-Buildx/
set -vx
@MaxPeal
MaxPeal / multi-arch-docker-ci.sh
Last active September 28, 2020 11:47 — forked from ArturKlauser/multi-arch-docker-ci.sh
Building Multi-Architecture Docker Images With Buildx
#!/bin/bash
# (c) Artur.Klauser@computer.org
#
# This script installs support for building multi-architecture docker images
# with docker buildx on CI/CD pipelines like Github Actions or Travis. It is
# assumed that you start of with a fresh VM every time you run this and have to
# install everything necessary to support 'docker buildx build' from scratch.
#
# Example usage in Travis stage:
#
@MaxPeal
MaxPeal / dhcpd.conf
Last active March 22, 2021 08:03 — forked from robinsmidsrod/dhcpd.conf
Trying to chainload iPXE with full feature set from a lesser featured one, whilst still being able to boot non-supported cards with UNDI
ddns-update-style none;
deny bootp; #default
authoritative;
include "/etc/dhcp/ipxe-option-space.conf";
# GREEN
subnet 10.1.1.0 netmask 255.255.255.0 {
range 10.1.1.100 10.1.1.199;
option subnet-mask 255.255.255.0;
@MaxPeal
MaxPeal / ssh-deploy-key-wrapper.sh
Created October 5, 2021 07:23 — forked from mpdude/ssh-deploy-key-wrapper.sh
Wrapper around `ssh` to pick the right one from several GitHub deploy keys
#!/bin/bash
# The last argument is the command to be executed on the remote end, which is something
# like "git-upload-pack 'webfactory/ssh-agent.git'". We need the repo path only, so we
# loop over this last argument to get the last part of if.
for last in ${!#}; do :; done
# Don't use "exec" to run "ssh" below; then the trap won't work.
key_file=$(mktemp -u)
trap "rm -f $key_file" EXIT