Skip to content

Instantly share code, notes, and snippets.

View voxxit's full-sized avatar

Josh Delsman voxxit

View GitHub Profile
@voxxit
voxxit / hashicorp.vault.server.plist
Created August 7, 2015 22:09
LaunchAgent for Vault
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>KeepAlive</key>
<true/>
<key>Label</key>
<string>hashicorp.vault.server</string>
<key>ProgramArguments</key>
<array>
@voxxit
voxxit / hashicorp.consul.server.plist
Created August 7, 2015 22:01
LaunchAgent for Consul & Consul UI
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>KeepAlive</key>
<true/>
<key>Label</key>
<string>hashicorp.consul.server</string>
<key>ProgramArguments</key>
<array>
@voxxit
voxxit / install-dd-agent.sh
Last active August 29, 2015 14:21
Reworked install script for the Python-based Datadog agent — curl -L http://git.io/vTyed | sh
#!/bin/bash
set -x
# Root user required
if [ "$(id -u)" != "0" ]; then
echo "Sorry, you must be root to install dd-agent" && exit 1
fi
# Python and sysstat are required
if ! command -v python &>/dev/null; then echo "Python not installed" && exit 1; fi
@voxxit
voxxit / USING-VAULT.md
Last active July 7, 2022 03:02
Consul + Vault + MySQL = <3
git clone https://gist.github.com/dd6f95398c1bdc9f1038.git vault
cd vault
docker-compose up -d
export VAULT_ADDR=http://192.168.99.100:8200

Initializing a vault:

vault init
@voxxit
voxxit / mkarch.sh
Last active August 29, 2015 14:19
curl -sSL http://git.io/vvDYD > mkarch; chmod +x mkarch; disk=/dev/sdb ./mkarch
#!/bin/bash
set -e
set -x
disk="/dev/sdb"
rootfs="ArchLinuxARM-rpi-2-latest.tar.gz"
pushd $(mktemp -d)
mkdir root boot
@voxxit
voxxit / install-deis-osx.sh
Last active August 29, 2015 14:19
installation steps for deis on OS X
# the following are the commands to get deis up and running
# on your OS X machine. i've made the assumption that you have
# the latest versions of vagrant & virtualbox already
# installed.
#
# if not...
#
# vagrant: https://www.vagrantup.com/downloads.html
# virtualbox: https://www.virtualbox.org/wiki/Downloads
@voxxit
voxxit / digitalocean-dyndns
Last active July 14, 2019 12:45
Dynamic DNS script for DigitalOcean. For example: to use with OpenWRT routers, install bash (opkg install bash) then place this script in /etc/hotplug.d/iface/
#!/usr/bin/env bash
set -x
# Domain you wish to update
DOMAIN="example.com"
# Get the v4/v6 addresses from icanhazip.com [pretty reliable!]
IPV4_ADDR=`wget -4 -q -O - icanhazip.com`
IPV6_ADDR=`wget -6 -q -O - icanhazip.com`
[Unit]
Description=Set system hostname to Ethernet MAC address
[Service]
Type=oneshot
ExecStart=/bin/bash -c "hostnamectl set-hostname $(cat /sys/class/net/eth0/address | tr -d ':')"
[Install]
WantedBy=multi-user.target
@voxxit
voxxit / hosts
Created February 2, 2015 08:49
Salt minion configuration for Arch Linux Vagrantfile
127.0.0.1 localhost.localdomain localhost
::1 localhost.localdomain localhost
192.168.99.1 salt
@voxxit
voxxit / docker-tcp.socket
Last active August 29, 2015 14:14
Docker TCP socket systemd unit file
[Unit]
Description=Docker TCP Socket
PartOf=docker.service
[Socket]
ListenStream=2375
BindIPv6Only=both
Service=docker.service
[Install]