This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# A create-server utility as it would have been written by 'Robert I'. | |
# A wrapper around the OpenStack SDK to try (and try again) to create | |
# OpenStack server instances. | |
# | |
# Note: This module DOES NOT provide all the functionality of | |
# ---- the underlying API, just those bits I need for my work. | |
# | |
# You will need your OpenStack environment variables defined |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# A simple example using the Clubhouse API | |
# to get exiting labels and update them - | |
# in this case, change their colour. | |
# | |
# You'll need: - | |
# | |
# curl | |
# jq | |
# List labels |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# (Notes written from an OSX host) | |
# Assuming you've... | |
# | |
# - Done 'touch ssh' on the SSD before instering it into the Pi | |
# - Added a suitable `wpa_supplicant.conf` (if relying on WiFi) | |
# | |
# ...here are the first important actions on first boot of the OS. | |
# Login to the Pi, using the default password 'raspberry': - |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Fixed IP4 address are handy. | |
# To avoid DHCP you can set a fixed address | |
# by editing '/etc/dhcpcd.conf'. | |
##### | |
# 0 # | |
##### | |
# For newer RPi operatign systems (like Debian Bookworm) | |
# you might need to use this method: - | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# You'll need to patch the Pi's `/boot/cmdline.txt` | |
# by adding `cgroup_enable=cpuset cgroup_enable=memory cgroup_memory=1` | |
# to the end of the existing line (see https://github.com/k3s-io/k3s/issues/2067) | |
# | |
# i.e. `/boot/cmdline.txt` should look like something like this: - | |
console=serial0,115200 console=tty1 root=PARTUUID=b9075e12-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait cgroup_enable=cpuset cgroup_enable=memory cgroup_memory=1 | |
# Reboot and you should be able to install k3s | |
# and its agents: - |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Starting with a Pi flashed with 'Raspberry Pi OS Lite (32-bit)' | |
# | |
# I used the following: | |
# | |
# - Raspberry Pi 4 Model B Rev 1.1 (4Gi) [cat /proc/cpuinfo] | |
# - Debian 11.1 [cat /etc/debian_version] | |
# - Raspbian GNU/Linux 11 (bullseye) [cat /etc/os-release] | |
# | |
# And the instructions (pivpn) installs: - | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The PiStation Case (for the Raspberry Pi 4) | |
# is a well built fun case, especially for those | |
# with a passion for retro-gaming consoles. | |
# Personally, I love it. | |
# | |
# - https://shop.pimoroni.com/products/pistation-case | |
# | |
# But installing the 'safe shutdown' feature may get you frustrated. | |
# The hardware's brilliant, but the shutdown script installation | |
# needs a little work. There are a number of |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Simple No-ip.com Dynamic DNS Updater | |
# | |
# By Nathan Giesbrecht (http://nathangiesbrecht.com) | |
# | |
# 1) Install binary as described in no-ip.com's source file (assuming results in /usr/local/bin) | |
# https://www.noip.com/support/knowledgebase/install-ip-duc-onto-raspberry-pi/ | |
# | |
# mkdir /home/pi/noip | |
# cd /home/pi/noip | |
# wget https://www.noip.com/client/linux/noip-duc-linux.tar.gz |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The juice4halt super-capacitor board for the RaspberryPi | |
# can be configured to operate using systemd scripts. | |
# There are a set from https://github.com/skhg/juice4halt | |
# that I've forked to https://github.com/alanbchristie/juice4halt. | |
# To seup the follow the simple instructions in the repo, i.e. ... | |
sudo apt -y install git | |
git clone https://github.com/alanbchristie/juice4halt.git | |
cd juice4halt | |
sudo ./setup.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# | |
# Simple utility to watch the stats for a single docker container. | |
# It writes stats to two files 'max-cpu.txt' and 'max-mem.txt' | |
# for the maximum observed CPU and memory. | |
# The utility runs the stats every 60 seconds. | |
# | |
# Stats look like this... | |
# | |
# CONTAINER ID NAME CPU % MEM USAGE / LIMIT MEM % NET I/O BLOCK I/O PIDS |