Skip to content

Instantly share code, notes, and snippets.

View postlmc's full-sized avatar

Scott Thompson postlmc

View GitHub Profile
@postlmc
postlmc / dc33-prefs-upload.sh
Last active August 9, 2025 20:17
DC33 Meshtastic Settings
#!/bin/bash
# Meshtastic DEF CON 33 Channel Configuration Script
# Based on: https://github.com/meshtastic/firmware/blob/event/defcon33/userPrefs.jsonc
echo "🔧 Configuring Meshtastic DEF CON 33 Channels..."
echo "================================================"
# Check if meshtastic CLI is available
if ! command -v meshtastic &> /dev/null; then
@postlmc
postlmc / cka-bookmarks.html
Last active July 14, 2024 18:43
Bookmarks collected from all over for the CKA exam
<!DOCTYPE NETSCAPE-Bookmark-file-1>
<!-- This is an automatically generated file.
It will be read and overwritten.
DO NOT EDIT! -->
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<TITLE>Bookmarks</TITLE>
<H1>Bookmarks</H1>
<DL>
<p>
<DT>
@postlmc
postlmc / direnvrc
Created January 28, 2024 15:57
My evolving direnv configuration
layout_poetry() {
if [[ -v VIRTUAL_ENV ]]; then
if whence -w deactivate &>/dev/null; then
deactivate
else
log_error "You're already in a virtual environment. Run \`deactivate\` first."
exit 1
fi
fi
@postlmc
postlmc / ec2rd.sh
Created July 17, 2023 00:53
Extract Edge Collection to CSV for import into Raindrop.io
#!/bin/bash
# Raindrop will import text lists of URLs that can be copy-and-pasted directly from
# Edge, but doing it this way will also import the titles and notes.
DB="${HOME}/Library/Application Support/Microsoft Edge/Default/Collections/collectionsSQLite"
# DB="./backup/collectionsSQLite"
sqlite3 "${DB}" << EOF
.mode csv
@postlmc
postlmc / DDTX23.md
Created February 1, 2023 16:18
Data Day Texas 2023 Notes
@postlmc
postlmc / tab-group-extractor.py
Created October 30, 2022 17:25
Extracts Safari tab groups to a Netscape bookmark file
#!/usr/bin/env python
# Quick and dirty script to extract Safari Tab Groups to a bookmarks.html file that can
# be imported into other browsers, or just to serve as a backup. I created this when
# testing Edge and finding that it imports regular bookmarks and the entire Reading List
# from Safari (cool!) but didn't touch the Tab Groups. I would have preferred those just
# be mapped to Edge Collections, but this'll work for now.
# I'm serious about the dirty part -- this is brute-force-y and just plain skips a few
# corner cases that could cause errors.
@postlmc
postlmc / M1-Setup.md
Last active July 29, 2023 16:03
Customizations for my new M1s
@postlmc
postlmc / DDTX22.md
Last active June 15, 2022 14:00
Data Day Texas 2022 Notes

Data Day Texas 2022 Notes

Introduction to Ontologies

Description

Ontology for Data Scientists Michael Uschold - Semantic Arts

We start with an interactive discussion to identify what are the main things that data

@postlmc
postlmc / route53-upsert.py
Created July 31, 2020 14:28
route53-upsert.py
#!/usr/bin/env python
import boto3
import click
import logging
import os
import sys
from datetime import datetime
@postlmc
postlmc / azure-dns-upsert.py
Created July 31, 2020 14:28
azure-dns-upsert.py
#!/usr/bin/env python
# 'sp-dns-upsert' service principal creation:
# SPID=$(az ad sp create-for-rbac -n "http://sp-dns-upsert" --sdk-auth \
# --skip-assignment | \
# tee sp-dns-upsert.json | jq -r '.clientId')
#
# Assign the 'DNS Zone Contributor' role to the new service principal only for a single
# resource group specified in the ${RG} environment variable:
# az role assignment create --assignee ${SPID} --resource-group ${RG} \