Skip to content

Instantly share code, notes, and snippets.

View stephenutsw's full-sized avatar

Stephen Johnson stephenutsw

  • UT Southwestern Medical Center
  • Dallas, TX
View GitHub Profile
@HenkPoley
HenkPoley / apple_mac_support_matrix.md
Last active July 26, 2025 14:48
Apple Mac OS support matrix.
Model 10.4 10.5 10.6 10.7 10.8 10.9 10.10 10.11 10.12 10.13 10.14 10.15 11 12 13 14 15 26
Year 2005 2007 2009 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025
MacBook (13-inch, Mid 2006)
MacBook Pro (15-inch, Early 2006)
MacBook Pro (17-inch, Early 2006)
iMac (17-inch, Early 2006)
iMac (20-inch, Early 2006)
Mac mini (Early 2006)
Mac mini (Late 2006)
#!/bin/bash
#
# This script retrieves the Mac Hardware UUID, fetches the corresponding Computer ID from Jamf Pro,
# checks for any failed MDM commands, and clears them if found.
#
# Uses JAMF API Client and Roles.
# Add Parameter 4 & 5 with API Client ID & Client Secret when running in JAMF Policy.
# API Role Privileges Required: Read Computers, Flush MDM Commands.
#
# Karthikeyan Marappan
@fellipec
fellipec / pihole-dhcp.md
Last active October 23, 2025 17:31
Pi-Hole DHCP configuration guide

Introduction

Pi-Hole's primary function is to be a DNS server with the ability to block domains, usually used for advertising, tracking or other unwanted sites. It also features a built-in DHCP Server.

Usually, your router will also have a built-in DHCP server, pre-configured from factory, and for most users this is perfectly fine. But in some cases you may want to run another DHCP server instead of relying on your router's one. This guide will help you understand how a DHCP server works and how to configure it without disturbing your network.

If you already know the networking basics, you can cut to the chase and read just the configuration part

Understanding the IP Addressing

@talkingmoose
talkingmoose / Sequoia-compatible Macs (regex)
Last active August 30, 2025 21:44
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/
Published Date: June 10, 2024
Updated November 8, 2024
Updated May 28, 2025
Verification: https://regex101.com/r/bNOMXz/10
1) Exact regex — Matches major model identifier numbers based on Apple's knowledge base article (more accurate):
^(Mac(1[3-6]|BookPro1[5-8]|BookAir(9|10)|Pro7)|iMac(Pro1|(19|2[01]))|Macmini[89]),\d+$
@chrisgrande
chrisgrande / ea_ddm_decalaration.sh
Created January 8, 2024 22:55
macOS Software Update DDM Extension Attribute
#!/bin/bash
# Define the path to the property list file
plist_file="/var/db/softwareupdate/SoftwareUpdateDDMStatePersistence.plist"
# Check if the file exists
if [ -f "$plist_file" ]; then
# Use PlistBuddy to extract the Declarations section
declarations=$(/usr/libexec/PlistBuddy -c "Print SUCorePersistedStatePolicyFields:Declarations" "$plist_file")
@kconner
kconner / macOS Internals.md
Last active October 21, 2025 15:03
macOS Internals

macOS Internals

Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.

Starting Points

How to use this gist

You've got two main options:

@talkingmoose
talkingmoose / Ventura-compatible Macs (regex).txt
Created February 5, 2023 18:41
Regex looks for all Mac models compatible with macOS Ventura. May not be up-to-date with newly released models.
https://support.apple.com/en-us/HT213264
Published Date: October 24, 2022
Verification: https://regex101.com/r/nRkAFo/2
1) Exact regex — Matches major model identifier numbers based on Apple's knowledge base article (more accurate):
^(Mac(1[34]|BookPro1[4-8]|BookAir([89]|10)|Pro7|Book10)|iMac(Pro1|(1[89]|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).
@cyberkryption
cyberkryption / graylog-install.sh
Last active January 15, 2025 17:36
Graylog 5 Install script
#!/bin/bash
echo "[+] Checking for root permissions"
if [ "$EUID" -ne 0 ];then
echo "Please run this script as root"
exit 1
fi
echo "[+] Seeting needrestart to automatic to prevent restart pop ups"
sudo sed -i 's/#$nrconf{restart} = '"'"'i'"'"';/$nrconf{restart} = '"'"'a'"'"';/g' /etc/needrestart/needrestart.conf
@pudquick
pudquick / brew.md
Last active May 5, 2025 21:30
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
@talkingmoose
talkingmoose / RemoveApplication.zsh
Created May 27, 2022 15:39
Remove a drag-and-drop application before performing another task such as a software update.
#!/bin/zsh
<<ABOUT_THIS_SCRIPT
-----------------------------------------------------------------------
Written by:William Smith
Professional Services Engineer
Jamf
bill@talkingmoose.net
https://gist.github.com/bd4abab222685c4e3781967a4d0491f6