Skip to content

Instantly share code, notes, and snippets.

View notmayo's full-sized avatar

Geoffrey Scott Mayo notmayo

  • SECRET ORGANIZATION
  • USA
  • 04:20 (UTC -05:00)
View GitHub Profile
@notmayo
notmayo / find-confluence-macros-by-page.sh
Created March 27, 2026 19:59
Confluence HTML export - Find all macros used per page
grep -I -oH '<[^>]*macro[^>]*>' ./*.html \
| grep -Fv 'src=confmacro' \
| awk -F: '
{
file=$1
tag=$0
sub(/^[^:]*:/, "", tag)
out=tag
@notmayo
notmayo / find-unique-confluence-macros.sh
Created March 27, 2026 19:58
Confluence HTML export - Find all macros used in pages
grep -I -o '<[^>]*macro[^>]*>' ./*.html \
| grep -Fv 'src=confmacro' \
| awk '
{
tag=$0
out=tag
if (match(tag, /class="[^"]*macro[^"]*"/)) {
out=substr(tag, RSTART+7, RLENGTH-8)
} else if (match(tag, /class='\''[^'\'']*macro[^'\'']*'\''/)) {
@notmayo
notmayo / install-dod-root-certificates-linux.sh
Last active March 18, 2026 13:55
Download & Install DoD Root & Intermediate certificates on Linux (Arch) - 2026
#!/bin/bash
set -euo pipefail
shopt -s nullglob
ZIP_URL="https://dl.dod.cyber.mil/wp-content/uploads/pki-pke/zip/unclass-certificates_pkcs7_DoD.zip"
ANCHORS_DIR="/etc/ca-certificates/trust-source/anchors"
ROOTS_ONLY=0
while [[ $# -gt 0 ]]; do
@notmayo
notmayo / install-dod-root-certificates-mac.sh
Last active March 18, 2026 13:58
Download & Install DoD/DoW Root & Intermediate certificates on Mac - 2026
#!/bin/bash
# Set the directory where certificates will be stored
CERT_DIR="$HOME/DoDCertificates"
# Create the directory if it does not exist
mkdir -p "$CERT_DIR"
# Change to the directory
cd "$CERT_DIR"
@notmayo
notmayo / network-connectivity-monitor.ps1
Last active March 18, 2026 17:03
Crude dashboard to monitor network connectivity in even the most austere network environments.
# ///
# This script was originally written as a crude dashboard to monitor a DoD/DoW deployed network that had dual WANs & a SATCOM NMS server.
# If a connection to the given IP or DNS hostname is successful, the status is printed in green. If the connection fails, the status is printed in red.
# This script can be used with any three WAN or LAN IP addresses or DNS hostnames that you want to monitor. The three categories in the example below are just suggestions.
#
# WAN1: Unclassified (NIPR) - The DoD's unclassified network. Services below are only accessible via NIPR and NOT over commercial internet.
# DISA DNS Servers:
# Primary: 152.229.110.232 | dns1.disa.mil
# Secondary: 131.77.60.232 | dns2.disa.mil
# Tertiary: 214.3.125.232 | dns3.disa.mil