Skip to content

Instantly share code, notes, and snippets.

View donmontalvo's full-sized avatar

Don Montalvo donmontalvo

View GitHub Profile
@talkingmoose
talkingmoose / Get App Install Date.zsh
Created April 10, 2020 18:19
Returns the installation date for an app installed uisng an Apple Installer package. In Terminal run /path/to/script /path/to/Bundle.app (drag the app into the window).
#!/bin/bash
# in Terminal run /path/to/script /path/to/Bundle.app
installedApp=$1
# get the app's bundle identifier
bundleID=$( /usr/bin/defaults read "$installedApp/Contents/Info.plist" CFBundleIdentifier )
# get the installation epoch date for the bundle identifier
installEpoch=$( /usr/sbin/pkgutil --pkg-info="$bundleID" | /usr/bin/grep "install-time" | /usr/bin/awk '{ print $2 }' )
@applch
applch / macOS 10.14 Mojave rootless.conf
Created October 7, 2019 02:08
Apple's System Integrity Protection(SIP) conf
cat /System/Library/Sandbox/rootless.conf
/Applications/Safari.app
/Library/Apple
TCC /Library/Application Support/com.apple.TCC
CoreAnalytics /Library/CoreAnalytics
NetFSPlugins /Library/Filesystems/NetFSPlugins/Staged
NetFSPlugins /Library/Filesystems/NetFSPlugins/Valid
/Library/Frameworks/iTunesLibrary.framework
KernelExtensionManagement /Library/GPUBundles
MessageTracer /Library/MessageTracer
@n8felton
n8felton / extract_printer_icon.sh
Last active March 16, 2020 19:22
Small snippet to extract printer icons from macOS printer drivers
MODEL="Xerox WorkCentre 6655"
ICON=$(gunzip -c "/Library/Printers/PPDs/Contents/Resources/${MODEL}.gz" | awk '/APPrinterIconPath/ {gsub(/"/,"",$2); print $2}')
/usr/bin/sips -s format png "${ICON}" --out "${MODEL}.png" --addIcon --resampleHeightWidthMax 512
@poundbangbash
poundbangbash / com.microsoft.office.mobileconfig
Last active March 6, 2018 09:08
com.microsoft.office preference management mobileconfig for Office 15.33+
<?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>PayloadContent</key>
<array>
<dict>
<key>PayloadContent</key>
<dict>
<key>com.microsoft.office</key>