Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# Check if the database path is provided as an argument
if [ -z "$1" ]; then
echo "Usage: $0 /path/to/your/database.sqlite"
exit 1
fi
# Use the first argument as the database file path
DB_PATH="$1"
@rtrouton
rtrouton / Sequoia-compatible Macs (regex)
Created June 12, 2024 20:58 — forked from talkingmoose/Sequoia-compatible Macs (regex)
Regex looks for all Mac models compatible with macOS Sequoia. May not be up-to-date with newly released models.
https://www.apple.com/macos/macos-sequoia-preview/
Published Date: June 10, 2024
Verification: https://regex101.com/r/bNOMXz/2
1) Exact regex — Matches major model identifier numbers based on Apple's knowledge base article (more accurate):
^(Mac(1[345]|BookPro1[5-8]|BookAir(9|10)|Pro7)|iMac(Pro1|(19|2[01]))|Macmini[89]),\d+$
2) Current or higher regex — Matches model identifiers based on Apple's knowledge base article and may match higher versions before this regex is updated (more future-proof).
@timothyham
timothyham / ipv6guide.md
Last active October 31, 2024 11:49
A Short IPv6 Guide for Home IPv4 Admins

A Short IPv6 Guide for Home IPv4 Admins

This guide is for homelab admins who understand IPv4s well but find setting up IPv6 hard or annoying because things work differently. In some ways, managing an IPv6 network can be simpler than IPv4, one just needs to learn some new concepts and discard some old ones.

Let’s begin.

First of all, there are some concepts that one must unlearn from ipv4:

Concept 1

Statement on MGM Resorts International: Setting the record straight
9/14/2023, 7:46:49 PM
We have made multiple attempts to reach out to MGM Resorts International, "MGM". As reported, MGM shutdown computers inside their network as a response to us. We intend to set the record straight.
No ransomware was deployed prior to the initial take down of their infrastructure by their internal teams.
MGM made the hasty decision to shut down each and every one of their Okta Sync servers after learning that we had been lurking on their Okta Agent servers sniffing passwords of people whose passwords couldn't be cracked from their domain controller hash dumps. Resulting in their Okta being completely locked out. Meanwhile we continued having super administrator privileges to their Okta, along with Global Administrator privileges to their Azure tenant. They made an attempt to evict us after discovering that we had access to their Okta environment, but things did not go according to plan.
On Sunday night, MGM implement
// Silly little XCode Playground for experimenting with the Secure Enclave programming.
// See more at https://developer.apple.com/videos/play/wwdc2019/709
// and also sample code at https://developer.apple.com/documentation/cryptokit/performing_common_cryptographic_operations
import UIKit
import CryptoKit
import LocalAuthentication
// Get access to secure enclave
@PicoMitchell
PicoMitchell / get_compatible_macos_versions-asls.sh
Last active May 22, 2024 02:49
Scripts to get compatible macOS versions from Apple Software Lookup Service (gdmf.apple.com/v2/pmv) or Software Update Catalog (swscan.apple.com[...]sucatalog).
#!/bin/bash
#
# Created by Pico Mitchell (of Random Applications) on 1/5/23
#
# https://gist.github.com/PicoMitchell/877b645b113c9a5db95248ed1d496243#file-get_compatible_macos_versions-asls-sh
#
# MIT License
#
# Copyright (c) 2023 Pico Mitchell (Random Applications)
@pudquick
pudquick / 00-reproducible-mach-o.md
Last active November 4, 2024 00:59
Reproducible Builds for macOS

Reproducible Builds for macOS

There's a neat writeup I stumbled across recently titled "Reproducible codesigning on Apple Silicon" from Keith Smiley about some gotchas when it comes to compiling a binary in a way that's repeatable and always generates the exact same byte output (which would then checksum to the exact same hash) - even if compiled on a different Mac.

In applying the suggestions I found in the blog post, I found a few other corner cases that I just wanted to get documented more explicitly somewhere.

Tools Matter

Footnote 2 from that blog post is important:

@pudquick
pudquick / brew.md
Last active September 28, 2024 08:22
Lightly "sandboxed" homebrew on macOS

brew is a bad neighbor

This isn't a guide about locking down homebrew so that it can't touch the rest of your system security-wise.

This guide doesn't fix the inherent security issues of a package management system that will literally yell at you if you try to do something about "huh, maybe it's not great my executables are writeable by my account without requiring authorization first".

But it absolutely is a guide about shoving it into its own little corner so that you can take it or leave it as you see fit, instead of just letting the project do what it likes like completely taking over permissions and ownership of a directory that might be in use by other software on your Mac and stomping all over their contents.

By following this guide you will:

  • Never have to run sudo to forcefully change permissions of some directory to be owned by your account
@Chenx221
Chenx221 / recovery.json, cloudready_recovery.json
Last active October 30, 2023 17:55
Chrome OS recovery images manual download (Flex)
# Chrome OS recovery images manual download
https://dl.google.com/dl/edgedl/chromeos/recovery/recovery2.json
https://dl.google.com/dl/edgedl/chromeos/recovery/recovery.json
# Google Chrome OS Flex images manual download
https://dl.google.com/dl/edgedl/chromeos/recovery/cloudready_recovery2.json
https://dl.google.com/dl/edgedl/chromeos/recovery/cloudready_recovery.json
@coolaj86
coolaj86 / rip-blu-rays-with-libredrive.md
Created July 12, 2021 21:27
Want to rip backups of your blu-rays? In short, get the LG WH16NS40 + Unitek ‎Y-1099NEW + WH16NS40-SVC50 v1.0.5 (via SDFTool) combo. It'll work.
title description date updated uuid categories permalink
How to Rip Blu-Rays with a LibreDrive
In short, get the LG WH16NS40 + Unitek Y-1099NEW + WH16NS40-SVC50 v1.0.5 (via SDFTool) combo. It'll work.
2021-06-29 5:33:34 pm
2021-07-09 10:33:00 am
4276bef0-c857-47b0-8c86-1e83701d89d9
Nerdom
/articles/how-to-rip-blurays-with-a-libredrive/