Skip to content

Instantly share code, notes, and snippets.

View willjasen's full-sized avatar
💭
making the nodes magically talk to each other

willjasen

💭
making the nodes magically talk to each other
View GitHub Profile
@willjasen
willjasen / check-ntp.sh
Last active March 5, 2025 23:26
test NTP accuracy of local Starlink dish vs. ntp.org
#!/bin/bash
########
# test NTP accuracy of local Starlink dish vs. ntp.org
########
# List of NTP servers; Starlink is first, followed by ntp.org
SERVERS=("192.168.100.1" "us.pool.ntp.org")
COUNT=10 # Number of times to run sntp per server
SUMMARY_FILE=$(mktemp) # Store summary results
# Variables
DISK=da0;
ROOT_PART_NUM=3;
SWAP_PART_NUM=4;
ROOT_FS=/dev/gpt/rootfs;
SWAP_FS=/dev/gpt/swapfs;
SWAP_PART="/dev/${DISK}p${SWAP_PART_NUM}"
# Show info
gpart show;
#!/bin/sh
###
### Current image script version -- v1.1
###
### IMAGE HISTORY
# - v1.0 -- base install of Ubuntu 24 Server with / as btrfs and no swap partition, no commands or scripts have been applied
@willjasen
willjasen / clean-up-media-folder.sh
Last active August 8, 2024 18:06
clean up the media folder
#!/bin/sh
MEDIA_FOLDER=/mnt/crypt/runtipi/media/data;
RED="\e[31m";
GREEN="\e[32m";
YELLOW="\e[33m";
BLUE="\e[34m";
echo "${YELLOW}-- This clean up script has started! --";
echo "${BLUE}---------------------------------------";
@willjasen
willjasen / ubuntu-24.04-image.sh
Last active October 11, 2024 19:26
set up an image of ubuntu 24.04 for me
#!/bin/sh
###
### Image script version -- v1.1
###
### HISTORY
# - v1.0 -- base install of Ubuntu with / as btrfs and no swap partition, no commands or scripts have been applied
# - v1.1 -- installed needed apps and updates; make GRUB boot screen only 3 seconds
@willjasen
willjasen / systemd-dependencies-on-tailscale.md
Last active May 24, 2024 21:30
Debian systemd dependencies on Tailscale

Prologue

Some services in Debian/Ubuntu need to start after the Tailscale service is not only started/active, but has fully come up (in so much that it passes network traffic, which can take 5-10 seconds after the service starts). This is crucial when binding services solely to the Tailscale interface such that they require it to be fully operational before binding can successfully complete. Some services like the Zabbix agent may initially fail but will retry and start successfully once Tailscale is fully operational, but other services like netatalk (used for Apple file sharing) will generally fail to start or bind and will not reattempt, forcing a manual intervention of restarting that service.

To account for this, a "ExecStartPost" within the Tailscale systemd config monitors when the host can successfully ping 100.100.100.100 (the "localhost" IP within Tailscale) such that other services that depend on Tailscale won't attempt to start until the ping is successful. From there, the dependent services

@willjasen
willjasen / proxmox-cluster-over-tailscale.md
Last active April 20, 2025 22:48
Create a Proxmox cluster that communicates over Tailscale

🚛 THIS GIST HAS BEEN MOVED 🚛

I have developed a script to faciliate the setup of clustering Proxmox hosts together under the project tailmox

This gist guide has been moved into that project. No further updates of this gist guide will be made.


‼️ DANGER ‼️

@willjasen
willjasen / etc-network-interfaces
Created April 1, 2024 20:09
interfaces config for a proxmox host with only one network interface
auto eno1
iface eno1 inet manual
auto vmbr1
iface vmbr1 inet static
address x.x.x.2/29
gateway x.x.x.1
bridge-ports eno1
bridge-stp off
bridge-fd 0
@willjasen
willjasen / omnifocus_calendar.scpt
Last active March 16, 2024 21:45
Create calendar events from OmniFocus tasks
-- MOVED THIS GIST TO REPO --
-- https://github.com/willjasen/omnifocus-tasks-to-calendar --
-- ***********************************************************
property calendar_name : "OmniFocus" -- This is the name of your calendar
property default_duration : 30 --minutes
-- Rosemary Orchard
-- Modified from a script by unlocked2412
@willjasen
willjasen / setup.sh
Last active March 11, 2024 01:36
setup chocolatey test environment
# Allow this user to not require sudo password
#USER_TO_ALLOW=choco-test; SUDO_FILE=/etc/sudoers.d/no-password-$USER_TO_ALLOW; test -f $SUDO_FILE || echo "$USER_TO_ALLOW ALL=(ALL) NOPASSWD:ALL" | sudo tee $SUDO_FILE; sudo chmod 440 $SUDO_FILE; sudo visudo -c;
# Install git
#sudo apt update;
#sudo apt install -y git;
# Install Vagrant
wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg;
echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list;