Skip to content

Instantly share code, notes, and snippets.

View RichardTMiles's full-sized avatar
Kick it to Richard@Miles.Systems

Richard T. Miles RichardTMiles

Kick it to Richard@Miles.Systems
View GitHub Profile
# Generated by Powerlevel10k configuration wizard on 2025-01-13 at 02:26 MST.
# Based on romkatv/powerlevel10k/config/p10k-lean.zsh, checksum 26839.
# Wizard options: nerdfont-complete + powerline, small icons, unicode, lean, 24h time,
# 1 line, compact, many icons, concise, instant_prompt=verbose.
# Type `p10k configure` to generate another config.
#
# Config for Powerlevel10k with lean prompt style. Type `p10k configure` to generate
# your own config based on it.
#
# Tip: Looking for a nice color? Here's a one-liner to print colormap.
#!/bin/sh
apk update
apk add wpa_supplicant iw dhcpcd
ip link
ip link set wlan0 up
iw dev wlan0 scan | grep SSID
wpa_passphrase "YourSSID" "YourPassword" > /etc/wpa_supplicant/wpa_supplicant.conf
wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf
dhcpcd wlan0
@RichardTMiles
RichardTMiles / ApacheSetup.sh
Last active February 1, 2025 06:00
Alpine Linux Raspberry Pi Webserver Setup
#!/bin/sh
set -eEx
echo "http://dl-cdn.alpinelinux.org/alpine/latest-stable/main" | tee -a /etc/apk/repositories > /dev/null
echo "http://dl-cdn.alpinelinux.org/alpine/latest-stable/community" | tee -a /etc/apk/repositories > /dev/null
apk update
apk add apache2
@RichardTMiles
RichardTMiles / nvx
Last active July 4, 2025 03:08
NVM wrapper to make execution pass through the systems PATH bypassing the need for shell profile edits
#!/usr/bin/env bash
# ---------------------------------------------------------------------------
# nvx — self‑installing, self‑initialising, shell‑agnostic wrapper around nvm
# ---------------------------------------------------------------------------
# • Installs **nvm** (≥ $MIN_VERSION) the first time it runs.
# • Loads nvm with NVM_AUTO_MODE=install so `nvm use` auto‑installs versions.
# • Always activates an .nvmrc auto‑switch hook—no NVX_AUTO flag needed.
# • On first run it appends a single line to the user’s shell rc file:
# source /path/to/nvx
# so future shells initialise nvx automatically.
@RichardTMiles
RichardTMiles / proxmoxGithubActionsSetup.sh
Last active September 12, 2025 09:23
Setup Github Actions on a Proxmox Server
#!/usr/bin/env bash
# Proxmox "GOD SCRIPT" — idempotent, hands-free GitHub runner VM
# - Ensures storage/snippets
# - Downloads Ubuntu cloud image
# - Creates/repairs VM (disk flags, cloud-init, boot order)
# - Resizes VM disk and auto-grows root FS on first boot
# - Injects SSH key
# - Writes cloud-init user-data that installs qemu-guest-agent + GitHub Actions runner
# - Starts VM and verifies runner service via guest agent