Skip to content

Instantly share code, notes, and snippets.

View soundsnw's full-sized avatar

soundsnw

View GitHub Profile
<?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>allowDiagnosticSubmission</key>
<false/>
</dict>
</plist>
<?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>forceLimitAdTracking</key>
<true/>
<key>AD_DEVICE_IDFA</key>
<string>00000000-0000-0000-0000-000000000000</string>
</dict>
</plist>
@soundsnw
soundsnw / approve-mau-daemon.sh
Created July 18, 2019 21:08
approve-mau-daemon.sh
#!/bin/bash
# Pre-approve the popup that asks the user to approve running the MAU daemon
# Get the logged in user
loggedInUser=$( scutil <<< "show State:/Users/ConsoleUser" | awk '/Name :/ && ! /loginwindow/ { print $3 }' )
# Register MAU
#!/bin/bash
loggedInUser=$( /usr/sbin/scutil <<< "show State:/Users/ConsoleUser" | awk -F’: ‘ ‘/[[:space:]]+Name[[:space:]]:/ { if ( $2 != "loginwindow" ) { print $2 }}’ )
sudo -u $loggedInUser chflags -R nouchg /Users/$loggedInUser
diskutil resetUserPermissions / $loggedInUser
exit 0
@soundsnw
soundsnw / standard-user-access.sh
Created June 11, 2019 12:33
Give macOS standard users access to networking, printing and more
#!/bin/sh
#
# Provides standard user access to preference panels they would expect to be able to access, and might need access to.
#
# Provides standard users access to system preferences
/usr/bin/security authorizationdb write system.preferences allow
@soundsnw
soundsnw / Preload Chrome bookmarks on macOS
Last active June 10, 2019 22:01
preload-chrome-bookmarks.sh
#!/bin/bash
# Output Chrome Bookmarks to /Library/Google/bookmarks.html
if [ ! -d "/Library/Google" ]
then
mkdir "/Library/Google"
fi
(
#!/bin/bash
# macOS printer script: if color queue is selected, revert to grayscale
# Get logged in user
loggedInUser=$(/usr/bin/python -c 'from SystemConfiguration import SCDynamicStoreCopyConsoleUser; import sys; username = (SCDynamicStoreCopyConsoleUser(None, None, None) or [None])[0]; username = [username,""][username in [u"loginwindow", None, u""]]; sys.stdout.write(username + "\n");')
# If the print queues have been deleted, re-add them