Skip to content

Instantly share code, notes, and snippets.

@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).
@tokyoneon
tokyoneon / apfs_brute.sh
Created April 20, 2019 07:25
Brute Force FileVault Protected Partitions
#!/bin/bash
# https://null-byte.wonderhowto.com/how-to/hacking-macos-break-into-macbook-encrypted-with-filevault-0185177/
# checks to ensure all 3 args are present
if [[ ! $3 ]]; then
echo -e "\nusage: $ ./script.sh /dev/sdaX passwords.list -killswitch\n"
exit 0
fi
@jonathantneal
jonathantneal / recovery.sh
Last active November 10, 2023 01:01
Create or update macOS Big Sur (or Catalina, or Mojave) Recovery Partition Without Reinstalling
#!/bin/sh
# Set the macOS installer path as a variable
MACOS_INSTALLER="/Applications/$(ls /Applications | grep "Install macOS")"
MOUNT_POINT="$MACOS_INSTALLER/Contents/SharedSupport"
echo "macOS installer is \"$MACOS_INSTALLER\""
# Set the target disk as a variable
TARGET=$(diskutil info "$(bless --info --getBoot)" | awk -F':' '/Volume Name/ { print $2 }' | sed -e 's/^[[:space:]]*//')
echo "Target disk is \"$TARGET\""
@talkingmoose
talkingmoose / Download and Install Microsoft product.zsh
Last active April 22, 2024 23:51
**Download the latest version of this script from: https://gist.github.com/b6637160b65b751824943ede022daa17 .** Downloads and installs the latest available Microsoft product specified directly on the client. This avoids having to manually download and store an up-to-date installer on a distribution server every month.
#!/bin/zsh
:<<'ABOUT_THIS_SCRIPT'
-----------------------------------------------------------------------
Written by:William Smith
Partner Program Manager
Jamf
bill@talkingmoose.net
https://gist.github.com/b6637160b65b751824943ede022daa17
@reidransom
reidransom / gist:6042016
Created July 19, 2013 20:13
Auto-starting VirtualBox VMs on OS X

Auto-starting VirtualBox VMs on OS X

After finding a lot of other posts on the topic that didn't work out for me this one did the trick so I'm reposting for my own sense of self preservation.

Link to original article.

Copy the Virtualbox autostart plist template file to your system's LaunchDaemons folder.

sudo cp \

/Applications/VirtualBox.app/Contents/MacOS/org.virtualbox.vboxautostart.plist \

@superdaigo
superdaigo / zabbix-alert-smtp.sh
Created September 20, 2012 04:58
Zabbix SMTP Alert script for gmail
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Zabbix SMTP Alert script for gmail.
"""
import sys
import smtplib
from email.MIMEText import MIMEText
from email.Header import Header