Skip to content

Instantly share code, notes, and snippets.

View gene1wood's full-sized avatar
🎩

Gene Wood gene1wood

🎩
View GitHub Profile
@gene1wood
gene1wood / [Action Advised] Timeline (formerly known as Location History) is changing.pdf
Last active June 6, 2024 21:55
[Action Advised] Timeline (formerly known as Location History) is changing
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@gene1wood
gene1wood / assume-role.bash
Last active April 11, 2024 17:09
One liner to assume an AWS IAM role and set environment variables to use the resulting STS credentials
#!/bin/bash -x
# Session duration
# DURATION=43200
DURATION=3600
unset AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY AWS_SESSION_TOKEN
if ! sts=( $(
aws sts assume-role \
@gene1wood
gene1wood / remove-keys.bash
Last active April 29, 2024 03:41
Command to remove all apt gpg keys in /etc/apt/keyrings from /etc/apt/trusted.gpg
for keyfile in /etc/apt/keyrings/*.asc; do echo "$keyfile"; cat "$keyfile" | gpg --with-colons --import-options show-only --import | awk -F: '$1 == "fpr" {print $10}' | xargs --verbose -L 1 apt-key del; done
@gene1wood
gene1wood / mount-netbird-nfs.bash
Last active January 13, 2024 19:06
Script to mount and unmount all /etc/fstab mount points that use NFS over Netbird
#!/bin/bash
if [ -z "$1" -o "$1" = "mount" ]; then
action=mount
elif [ "$1" = "umount" ]; then
action=umount
elif [ "$1" = "wait" ]; then
action=wait
else
echo "missing action"
@gene1wood
gene1wood / unifi-network-application-troubleshooting.md
Created December 10, 2023 06:51
How to get dockerized Unifi Network Application to adopt AP after "Server Reject" and How to factory reset a Unifi AC AP Pro (UAP-AC-PRO)

How to get dockerized Unifi Network Application to adopt AP after "Server Reject"

If you're running the linuxserver.io dockerized Unifi Network Application / Unifi Controller and you've SSH'd into the Unifi AP and set the inform URL as described in the README by running

set-inform http://$address:8080/inform

and when you run the info command to see the result you see the message

@gene1wood
gene1wood / mount-netbird-nfs.bash
Last active July 20, 2023 21:35
Make Netbird umount all of the NFS mounts which point to other devices on the Netbird mesh network when the Netbird service stops
#!/bin/bash
if [ -z "$1" -o "$1" = "mount" ]; then
action=mount
elif [ "$1" = "umount" ]; then
action=umount
else
echo "missing action"
exit 1
fi
@gene1wood
gene1wood / Livermore Valley Craft Beer Festival - Brewery Instructions.md
Last active May 9, 2023 23:31
Livermore Valley Craft Beer Festival - Brewery Instructions

Livermore Valley Craft Beer Festival - Brewery Instructions

@gene1wood
gene1wood / Problem-updating-Dell-PowerEdge-VRTX-firmware.md
Last active April 1, 2024 21:11
Description of a problem updating the firmware of a Dell PowerEdge VRTX Storage Component (PERC8) and solution.

I went to update the Storage Component on my Dell PowerEdge VRTX from 23.13.16.0017 23.14.06.0013_A08. I uploaded the Dell Shared PERC8 firmware for Dell PowerEdge VRTX-Fault Tolerant version 23.14.06.0013_A08 (filename VRTX_SAS-RAID_Firmware_THVJ9_WN64_23.14.06.0013_A08.EXE ). The upload completed successfully. I applied the update. The UI showed that the update was "in-progress" for the next 8 hours. After 8 hours I gave up and powered off the Chassis from the CMC.

I powered the Chassis back on and the storage firmware showed as still being 23.13.16.0017

I uploaded the same file again and again initiated an update and this time it worked in fairly short order.

@gene1wood
gene1wood / first_and_third_thursday.ics
Created January 30, 2023 19:16
iCalendar ICS file with an event on the first and third Thursday of each month
BEGIN:VCALENDAR
PRODID:-//Google Inc//Google Calendar 70.9054//EN
VERSION:2.0
CALSCALE:GREGORIAN
METHOD:PUBLISH
X-WR-CALNAME:Temp
X-WR-TIMEZONE:America/Los_Angeles
BEGIN:VTIMEZONE
TZID:America/Los_Angeles
X-LIC-LOCATION:America/Los_Angeles
@gene1wood
gene1wood / ca-sos-bizfileonline-edit-account-bug.md
Last active January 4, 2023 23:48
A description of a bug in the CA Secretary of State bizfileonline system preventing users from editing their accounts.

There's a bug in the California Secretary of State bizfileonline site that prevents users from editing their account.

Steps to reproduce

  1. Browse to https://bizfileonline.sos.ca.gov/ and click Login
  2. Login with as a valid user account
  3. Click your user's name/email address in the upper right to show the Logout / My Account drop down
  4. Click My Account which brings up the modal dialog titled "My Account"
  5. Click the Edit my account button