Skip to content

Instantly share code, notes, and snippets.

View joshuaspence's full-sized avatar

Joshua Spence joshuaspence

  • Sydney, NSW, Australia
View GitHub Profile
@joshuaspence
joshuaspence / sample.json
Created June 29, 2016 23:14
Sample data
[
{
"pricing": {
"ap-south-1": {
"linux": {
"ondemand": "N/A"
}
},
"us-east-1": {
"linux": {

Keybase proof

I hereby claim:

  • I am joshuaspence on github.
  • I am joshuaspence (https://keybase.io/joshuaspence) on keybase.
  • I have a public key ASBRtB4TuBUekuZKqP2pKkCosTgjMFyNuwBorKlt3RXS3Qo

To claim this, I am signing this object:

#!/bin/bash
set -o errexit
set -o nounset
set -o pipefail
# Create a temporary directory.
SCRATCH_DIR=$(mktemp --directory)
function cleanup() {
#!/usr/bin/env bash
set -o errexit
set -o nounset
set -o pipefail
alias ffmpeg='ffmpeg -hide_banner -loglevel warning'
function process_video() {
local -r VIDEO="$1"
#!/bin/bash
set -o errexit
set -o nounset
set -o pipefail
readonly SCRIPT_DIR="${HOME}/workspace/personal/pocketsmith_backup"
readonly OUTPUT_DIR="${HOME}/Desktop/budget"
readonly BACKUP_DIR="${OUTPUT_DIR}.bak"
@joshuaspence
joshuaspence / cloud.cfg
Created May 5, 2021 00:36
Default cloud-init configuration
# The top level settings are used as module
# and system configuration.
# A set of users which may be applied and/or used by various modules
# when a 'default' entry is found it will reference the 'default_user'
# from the distro configuration specified below
users:
- default
# If this is set, 'root' will not be able to ssh in and they
@joshuaspence
joshuaspence / Dockerfile
Last active January 9, 2023 23:36
multicast-relay
FROM docker.io/scyto/multicast-relay:latest
RUN \
apk update && \
apk add --no-cache git && \
git -C /multicast-relay/ -c pull.ff=only pull origin pull/69/head && \
apk del git
@joshuaspence
joshuaspence / README.md
Last active February 2, 2024 13:37
UXG on-boot-script

on-boot-script is a popular method for extending the UniFi Dream Machine to execute init.d style scripts on boot. It works by installing a custom systemd service into the unifi-os container, but this method doesn't work on the UXG-Pro. The bootstrap.sh script below allows similar functionality to work on the UXG-Pro using a different approach (modify the Docker entrypoint script in the main uxg-setup container).

To install, either copy bootstrap.sh onto the UXG-Pro and execute it with sh bootstrap.sh or execute the script directly with curl -LsS https://gist.github.com/joshuaspence/a745426ab7d72631b1a4313f15e1774a/raw/bootstrap.sh | sh.

@joshuaspence
joshuaspence / clusters
Created March 23, 2023 02:27
Envoy metrics
httpbin::observability_name::httpbin
httpbin::default_priority::max_connections::1024
httpbin::default_priority::max_pending_requests::1024
httpbin::default_priority::max_requests::1024
httpbin::default_priority::max_retries::3
httpbin::high_priority::max_connections::1024
httpbin::high_priority::max_pending_requests::1024
httpbin::high_priority::max_requests::1024
httpbin::high_priority::max_retries::3
httpbin::added_via_api::false