This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
APP_PROCESS_NAMES=( "ESET NOD32 Antivirus" \ | |
"esets_ctl" \ | |
"esets_daemon" \ | |
"esets_kac" \ | |
"esets_mac" ) | |
DAEMON_PATHS=( "/Library/LaunchDaemons/com.eset.esets_daemon.plist") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
currentUser=$(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");') | |
launchctl asuser "$currentUser" open "/Applications/Google Drive.app/" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# WARNING: this script is potentially dangerous, it modifies the authorizationdb | |
# in a way that is far from best practice. your funeral | |
APP_PROCESS_NAME="TeamViewer" | |
DAEMON_PATHS=( "/Library/LaunchDaemons/com.teamviewer.Helper.plist" | |
"/Library/LaunchDaemons/com.teamviewer.teamviewer_service.plist" ) | |
REMOVE_PATHS=( "/Applications/TeamViewer.app" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# this is not following best practices | |
# removing explicit familyControlsEnabled keys to mitigate high parentalcontrolsd cpu usage | |
rm -rf /Library/Managed\ Preferences/com.apple.applicationaccess.new.plist | |
rm -rf /Library/Managed\ Preferences/*/com.apple.applicationaccess.new.plist | |
if pgrep 'parentalcontrolsd'; then | |
killall -STOP parentalcontrolsd | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import objc | |
from Foundation import NSBundle | |
CG_bundle = NSBundle.bundleWithIdentifier_('com.apple.CoreGraphics') | |
functions = [("CGSSessionCopyAllSessionProperties", b"@"),] | |
objc.loadBundleFunctions(CG_bundle, globals(), functions) | |
allSessionProperties = CGSSessionCopyAllSessionProperties() | |
for session in allSessionProperties: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# pretty dang sure this is intended for root | |
# -now: check for updates now | |
# -later: for performing updates queued for later | |
# -nmos: for faking major OS available message | |
/System/Library/PrivateFrameworks/CommerceKit.framework/Versions/Current/Resources/appstoreupdateagent -now |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
help.apple.com pages: | |
https://help.apple.com/accessibility/mac/control/10.12/ | |
https://help.apple.com/deployment/macos/ | |
https://help.apple.com/deployment/ios/ | |
https://help.apple.com/deployment/business/ | |
https://help.apple.com/education/ | |
https://help.apple.com/deployment/education/ | |
https://help.apple.com/machelp/mac/10.12/ | |
https://help.apple.com/serverapp/mac/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
CHOICES_XML_PATH="/tmp/office2016-choices.xml" | |
MSO2016_PKG_PATH="/tmp/microsoft_office2016_volumeinstaller.pkg" | |
MSO2016_SERIALIZER_PATH="/tmp/Microsoft_Office_2016_VL_Serializer.pkg" | |
INSTALLER_TARGET="/" | |
MAU_APP_PATH="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app" | |
DOUBLE_SECRET_MAU_PATH="/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/MacOS/Microsoft AU Daemon.app" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
VECTORWORKS_PLIST_PATH="/Library/Preferences/net.nemetschek.vectorworks.license.2016.plist" | |
currentUser=$(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");') | |
currentUserHomeDirectory=$(dscl . -read "/users/$currentUser" NFSHomeDirectory | cut -d " " -f 2) | |
if [ -d "/Applications/Vectorworks 2016" ]; then | |
if [ -f "$currentUserHomeDirectory$VECTORWORKS_PLIST_PATH" ]; then | |
vectorworksUser=$(defaults read "$currentUserHomeDirectory$VECTORWORKS_PLIST_PATH" "NNA Registered User") | |
vectorworksOrg=$(defaults read "$currentUserHomeDirectory$VECTORWORKS_PLIST_PATH" "NNA Registered Organization") | |
vectorworksLicense=$(defaults read "$currentUserHomeDirectory$VECTORWORKS_PLIST_PATH" "NNA User License") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
SPSS_STATISTICS_PATH="/Applications/IBM/SPSS/Statistics/" | |
SPSS_DAEMONHOST="mycooldaemonhost" | |
if [ -d "$SPSS_STATISTICS_PATH" ]; then | |
spssVersion=$(ls "$SPSS_STATISTICS_PATH" | tail -n 1) | |
spssInfPath='/Applications/IBM/SPSS/Statistics/'"$spssVersion"'/Contents/bin/spssprod.inf' | |
if [ -f "$spssInfPath" ]; then | |
sed -i.bak "s/DaemonHost=.*/DaemonHost=$SPSS_DAEMONHOST/" "$spssInfPath" | |
else |