Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Josh Delsman voxxit

🏠
Working from home
View GitHub Profile
@voxxit
voxxit / Dockerfile
Last active Jan 14, 2022
nginx v1.9.3 Dockerfile with HTTP/2 support baked in!
View Dockerfile
FROM alpine:latest
MAINTAINER Joshua Delsman <j@srv.im>
EXPOSE 443
ENV NGINX_VERSION 1.9.3
RUN apk add --update openssl-dev pcre-dev zlib-dev build-base \
&& rm -rf /var/cache/apk/* \
@voxxit
voxxit / RUNBOOK.md
Created Apr 29, 2016
Example of a solid run book/operations manual
View RUNBOOK.md

Run Book / Operations Manual

  1. Table of Contents
  2. System Overview
    • Service Overview
    • Contributing Applications, Daemons, and Windows Services
    • Hours of Operation
    • Execution Design
    • Infrastructure and Network Design
    • Resilience, Fault Tolerance and High-Availability
@voxxit
voxxit / track-import.sh
Last active Aug 9, 2021
Script I use to automate my workflow of importing newly purchased/downloaded tracks from Beatport and elsewhere
View track-import.sh
#!/bin/bash
INPUT_FOLDER="${HOME}/Music/Unprocessed"
OUTPUT_FOLDER="${HOME}/Dropbox/Music/$(date +%Y-%m)"
filecount=$(find "$INPUT_FOLDER" \( -name "*mp3" -o -name "*aif*" -o -name "*wav" \) -type f -print | wc -l)
if [[ $filecount -lt 1 ]]; then
printf "\nNo files found in '%s'. Time to find new beats!\n" "$INPUT_FOLDER"
exit 0
fi
@voxxit
voxxit / USING-VAULT.md
Last active Apr 19, 2021
Consul + Vault + MySQL = <3
View USING-VAULT.md
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
View virtualdj-historian.sh
#!/bin/sh
#
# -- virtualdj-historian.sh --
# A helper script for proper OBS track IDs from Virtual DJ tracklist.txt
#
# USAGE:
#
# 1. Download to your home directory
# 2. chmod +x virtualdj-historian.sh
# 3. ./virtualdj-historian.sh
View Dockerfile
FROM haproxy:1.7
ENV CT_VERS=0.16.0 \
CONSUL_HTTP_ADDR=demo.consul.io
RUN apt-get update \
&& apt-get -y install --no-install-recommends curl ca-certificates unzip \
&& curl -O https://releases.hashicorp.com/consul-template/${CT_VERS}/consul-template_${CT_VERS}_linux_amd64.zip \
&& unzip consul-template_${CT_VERS}_linux_amd64.zip \
&& mv consul-template /usr/local/bin/ \
@voxxit
voxxit / download-slow-query-log.sh
Last active Sep 23, 2020
Downloads RDS slow query logs for the last 24 hours using the AWS CLI
View download-slow-query-log.sh
#!/bin/bash
instanceID=$1
date=$(date +%Y%m%d)
function downloadLog () {
local log=$1
aws rds download-db-log-file-portion \
--output text \
View Apple Live Streaming JS
Event.onDOMReady(function () {
var triggerIDs = ["trigger320", "trigger480", "trigger640"];
var HDMovieURL = "http://stream.qtv.apple.com/events/sep/1009qpeijrfn/1009oiubqherbfoteg_hd_ref.mov";
var HDTrigger = $('triggerHD');
var qt = null; /*snowLeopard url*/
var slURL = "http://qthttp.apple.com.edgesuite.net/1009qpeijrfn/sl.m3u8";
// http://qthttp.apple.com.edgesuite.net/1009qpeijrfn/sl.m3u8
// var slURL= 'http://qthttp.apple.com.edgesuite.net/100716iab73asc/sl_all_w.m3u8';
/* non-snowLeopard url*/
View README.md
brew install xml2
wget https://gist.githubusercontent.com/voxxit/2297cae982cf47e9388502bb03ed4e20/raw/202dbcaae8eaa2aaa9a562774d8dfd9a2c86b11a/gistfile1.txt
mv gistfile1.txt script.sh
chmod +x script.sh
./script.sh "/Applications/RingCentral Meetings.app"
@voxxit
voxxit / POSTMORTEM.md
Last active Mar 10, 2020
Example/outline of a postmortem to be conducted after a site outage/incident
View POSTMORTEM.md

POSTMORTEM: “Event Title Here”

Issue Summary

This should be a short (4-5 sentences) blurb which succinctly describes the event. At the very least, it should include:

  • the duration (with start & end times in the U.S. Pacific time zone):

…which lasted for roughly 10 minutes between 9:02PM and 9:12PM Pacific…

  • the impact to our users: