Skip to content

Instantly share code, notes, and snippets.

View soakes's full-sized avatar

Simon Oakes soakes

View GitHub Profile
@soakes
soakes / cloudflare-ddns-update.sh
Created November 1, 2019 14:02 — forked from foobarhl/cloudflare-ddns-update.sh
A bash script to update a Cloudflare DNS A record with the external IP of the source machine
#!/bin/bash
# A bash script to update a Cloudflare DNS A record with the external IP of the source machine
# Used to provide DDNS service for my home
# Needs the DNS record pre-creating on Cloudflare
## Based on https://gist.github.com/Tras2/cba88201b17d765ec065ccbedfb16d9a with updates to use
## per-zone configurable access tokens available in the API sections of your Cloudflare profile
## - info@foo-games.com
@soakes
soakes / pixelbook-dev-setup.md
Created January 21, 2020 22:20 — forked from cassiozen/pixelbook-dev-setup.md
Notes on setting up Pixelbook for development

Pixelbook Setup

Change your channel

Some of the features mentioned in this document only work on the beta or Dev channel. To change your channel:

  1. chrome://help in a browser window
  2. Click Detailed Build Information
  3. Change Channel
  4. Select Beta (Or Dev, if you're feeling adventurous)
@soakes
soakes / docker-compose.yml
Created February 4, 2020 15:09 — forked from dyusupov/docker-compose.yml
single-node docker-compose file
version: '2.4'
services:
target:
privileged: true
network_mode: "host"
ipc: "host"
restart: always
volumes:
- '/etc/localtime:/etc/localtime:ro'
- '/edgefs/var/run:/opt/nedge/var/run:z'
@soakes
soakes / README-Template.md
Created February 9, 2020 20:19 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@soakes
soakes / README.md
Created June 19, 2020 19:43 — forked from zealot128/README.md
Gitlab Autoscaling Infrastructure on Hcloud with internal caching

Order and provision a Hetzner Cloud based Gitlab-Runner Docker-machine autoscaling infrastructure

See my blog for more information.

  • Adjust settings in vars.auto.tfvars.
  • Run with terraform init && terraform apply

Content:

@soakes
soakes / 00-update-vault.sh
Created January 22, 2021 23:17 — forked from teamblack-ci/00-update-vault.sh
Let's Encrypt certificate management using Certbot and Vault
#!/bin/sh
#
# Perform certificate updates in Vault.
set -eo pipefail
if ! vault token lookup > /dev/null; then
echo "Login to Vault first."
exit 1
fi
@soakes
soakes / zfs_alerts.sh
Created April 6, 2021 20:31 — forked from ryanburnette/zfs_alerts.sh
zfs health alerts in bash with mailgun api alert
#!/usr/bin/env bash
hostname=`hostname`
emaildomain=''
alertemail=''
mailgunapikey=''
# max capacity % before getting capacity alert
maxCapacity=80
@soakes
soakes / zfs_health.sh
Created April 6, 2021 20:31 — forked from petervanderdoes/zfs_health.sh
ZFS Health Check Script
#! /usr/local/bin/bash
#
# Calomel.org
# https://calomel.org/zfs_health_check_script.html
# FreeBSD 9.1 ZFS Health Check script
# zfs_health.sh @ Version 0.15
# Check health of ZFS volumes and drives. On any faults send email. In FreeBSD
# 10 there is supposed to be a ZFSd daemon to monitor the health of the ZFS
# pools. For now, in FreeBSD 9, we will make our own checks and run this script
@soakes
soakes / self-signed-certificate-with-custom-ca.md
Created April 27, 2021 19:25 — forked from fntlnz/self-signed-certificate-with-custom-ca.md
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096
- name: Create temporary directory
tempfile:
prefix: ansible-tmp-
state: directory
register: vault_unseal__mktemp
- name: Check vault unseal package checksum file
stat:
path: "{{vault_unseal__mktemp.path }}/{{ vault_unseal_shasums }}"
register: vault_unseal__checksum