Skip to content

Instantly share code, notes, and snippets.

@vmiller
vmiller / brew.md
Created September 18, 2026 16:36 — forked from pudquick/brew.md
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
@vmiller
vmiller / example.sh
Created July 7, 2025 13:36
Example Gist
#!/bin/sh
echo "This is just an example"
"IOClass" = "AirPort_Brcm4360"
"IOFirmwareVersion" = "Broadcom BCM43xx 1.0 (7.21.171.130.1a1)"
Model Identifier: MacBookPro11,1
ProductName: Mac OS X
ProductVersion: 10.12.6
BuildVersion: 16G29
@vmiller
vmiller / clean-profiles.sh
Created November 8, 2016 16:27
Script to delete user account profiles
#!/bin/bash
#
# Script to delete user profile directories excluding a list of known
# users to keep. Must be run as root, and is intended to run as a launch
# daemon
#
# define users to keep in an array
# (use spaces between items)
@vmiller
vmiller / SPSS.make
Created October 6, 2016 18:09
Luggage Makefile to repackage SPSS
include /usr/local/share/luggage/luggage.make
TITLE=SPSS
PACKAGE_VERSION=24
REVERSE_DOMAIN=org.domain
PAYLOAD=pack-from-applications-IBM \
pack-Library-Application-Support-IBM \
pack-script-pb-postinstall
pack-Library-Application-Support-IBM: l_Library_Application_Support
@sudo ${CP} -R /Library/Application\ Support/IBM ${WORK_D}/Library/Application\ Support/
<key>installer_choices_xml</key>
<array>
<dict>
<key>attributeSetting</key>
<integer>1</integer>
<key>choiceAttribute</key>
<string>selected</string>
<key>choiceIdentifier</key>
<string>com.avid.pkg.sibelius.app</string>
</dict>
#!/bin/bash -x
VERSION=24
AUTHCODE=<redacted>
APPPATH="/Applications/IBM/SPSS/Statistics/$VERSION/SPSSStatistics.app/"
cd "$APPPATH/Contents/bin"
"$APPPATH/Contents/PlugIns/jre1.8.0_71.jre/Contents/Home/bin/java" -jar "$APPPATH/Contents/bin/licenseactivator.jar" SILENTMODE CODES=$AUTHCODE
@vmiller
vmiller / finale.plist
Created October 21, 2014 15:55
Finale pkginfo
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>_metadata</key>
<dict>
<key>created_by</key>
<string>millerva</string>
<key>creation_date</key>
<date>2014-10-06T13:31:15Z</date>
@vmiller
vmiller / run_sync.sh
Last active August 29, 2015 14:03
Script to run a Reposado repo sync and email an admin(s) only if there are changes.
#!/bin/bash
# Based on a script found here :
# https://groups.google.com/forum/#!topic/reposado/F8-rTWdb5ho
#
RUSER=reposado
RECIPIENTS="user@company.com"
PATH="/usr/share/reposado"
/usr/bin/python /usr/share/reposado/code/repo_sync --log /var/log/reposync.log