Skip to content

Instantly share code, notes, and snippets.

@b0gdanw
b0gdanw / disable.sh
Last active April 25, 2025 22:12
Disable bunch of #$!@ in Catalina
# Credit: pwnsdx https://gist.github.com/pwnsdx/1217727ca57de2dd2a372afdd7a0fc21; nebular https://gist.github.com/pwnsdx/d87b034c4c0210b988040ad2f85a68d3#gistcomment-3019082
# IMPORTANT: Don't forget to logout from your Apple ID in the settings before running it!
# IMPORTANT: You will need to disable SIP: Reboot to Recovery, in Terminal csrutil disable
# WARNING: It might disable things that you may not like. Please double check the services in the TODISABLE vars.
# Get active services: launchctl list | grep -v "\-\t0"
# Find a service: grep -lR [service] /System/Library/Launch* /Library/Launch* ~/Library/LaunchAgents
# List disabled services: launchctl print-disabled user/501 |grep true & launchctl print-disabled system |grep true
@b0gdanw
b0gdanw / keybase.md
Created October 25, 2019 12:29
Keybase

Keybase proof

I hereby claim:

  • I am b0gdanw on github.
  • I am bogdanw (https://keybase.io/bogdanw) on keybase.
  • I have a public key ASBV3CBAxrkGpuOk4i2vEKKsHdc5ySKl5czwuggGpVCEcAo

To claim this, I am signing this object:

@b0gdanw
b0gdanw / GetSysInfo.scpt
Last active September 9, 2024 23:24
macOS Catalina - get current system information
# https://macadmins.slack.com/archives/general/p1449604450017318
# https://gist.github.com/clburlison/db6aaf4a717eb8ef3545
# https://www.jamf.com/jamf-nation/feature-requests/5158/built-in-inventory-fields-for-os-x-macos-security-and-malware-protection-systems
# https://www.jamf.com/jamf-nation/discussions/19111/xprotect-status-extension-attribute
set MacOSName to do shell script "defaults read /System/Library/CoreServices/SystemVersion.plist ProductName"
set MacOSVers to do shell script "defaults read /System/Library/CoreServices/SystemVersion.plist ProductVersion"
set MacOSBuild to do shell script "defaults read /System/Library/CoreServices/SystemVersion.plist ProductBuildVersion"
set XProtectVers to do shell script "defaults read /Library/Apple/System/Library/CoreServices/XProtect.bundle/Contents/version.plist CFBundleShortVersionString"
@b0gdanw
b0gdanw / GetSysInfo.scpt
Last active December 9, 2021 13:59 — forked from clburlison/get_sys_info.scpt
macOS Mojave - get current system information
# https://macadmins.slack.com/archives/general/p1449604450017318
# https://gist.github.com/clburlison/db6aaf4a717eb8ef3545
# https://www.jamf.com/jamf-nation/feature-requests/5158/built-in-inventory-fields-for-os-x-macos-security-and-malware-protection-systems
# https://www.jamf.com/jamf-nation/discussions/19111/xprotect-status-extension-attribute
set MacOSVers to do shell script "defaults read /System/Library/CoreServices/SystemVersion.plist ProductVersion"
set MacOSBuild to do shell script "defaults read /System/Library/CoreServices/SystemVersion.plist ProductBuildVersion"
set XProtectVers to do shell script "defaults read /System/Library/CoreServices/XProtect.bundle/Contents/Resources/XProtect.meta.plist Version"
set XProtectDate to do shell script "GetFileInfo -d /System/Library/CoreServices/XProtect.bundle/Contents/Resources/XProtect.meta.plist"
@b0gdanw
b0gdanw / IgnoreCatalina.txt
Created October 24, 2019 07:46
Ignore macOS Catalina upgrade
sudo softwareupdate --ignore 'macOS Catalina'
defaults delete com.apple.systempreferences AttentionPrefBundleIDs
rm ~/Library/Preferences/com.apple.preferences.softwareupdate.plist
killall Dock
@b0gdanw
b0gdanw / DisableStartUsingiCloud.txt
Created October 24, 2019 07:41
Disable Start Using iCloud notification in macOS Catalina 10.15
mv /Volumes/Macintosh\ HD/System/Library/LaunchAgents/com.apple.followupd.plist /Volumes/Macintosh\ HD/System/Library/LaunchAgents/com.apple.followupd.bak
defaults delete com.apple.systempreferences AttentionPrefBundleIDs; killall Dock
@b0gdanw
b0gdanw / Java.scpt
Created October 24, 2019 07:35
Java for OS X 2017-001 on macOS Catalina 10.15
# Download Java for OS X 2017-001 https://support.apple.com/kb/DL1572
set theDMG to choose file with prompt "Please select javaforosx.dmg:" of type {"dmg"}
do shell script "hdiutil mount " & quoted form of POSIX path of theDMG & " -noverify -nobrowse"
do shell script "pkgutil --expand /Volumes/Java\\ for\\ macOS\\ 2017-001/JavaForOSX.pkg ~/tmp"
do shell script "hdiutil unmount /Volumes/Java\\ for\\ macOS\\ 2017-001/"
do shell script "sed -i '' 's/return false/return true/g' ~/tmp/Distribution"
do shell script "pkgutil --flatten ~/tmp ~/Desktop/Java.pkg"
do shell script "rm -rf ~/tmp"
display dialog "Modified Java.pkg saved on desktop" buttons {"Ok"}
@b0gdanw
b0gdanw / iTunes12.9.scpt
Created October 24, 2019 07:32
iTunes 12.9.5.5 on macOS Catalina 10.15
set theAPP to choose file with prompt "Please select iTunes app:" of type {"app"}
do shell script "mkdir ~/tmp"
do shell script "ditto " & POSIX path of theAPP & " ~/tmp/iTunes.app" with administrator privileges
do shell script "plutil -replace CFBundleGetInfoString -string 'iTunes 13.9.5.5' ~/tmp/iTunes.app/Contents/Info.plist" with administrator privileges
do shell script "plutil -replace CFBundleShortVersionString -string 13.9.5 ~/tmp/iTunes.app/Contents/Info.plist" with administrator privileges
do shell script "plutil -replace CFBundleVersion -string 13.9.5 ~/tmp/iTunes.app/Contents/Info.plist" with administrator privileges
do shell script "plutil -replace CFBundleVersion -string 'iTunes 13.9.5.5' ~/tmp/iTunes.app/Contents/version.plist" with administrator privileges
do shell script "plutil -replace CFBundleShortVersionString -string 13.9.5 ~/tmp/iTunes.app/Contents/version.plist" with administrator privileges
do shell script "pkgbuild --component ~/tmp/iTunes.app --install-location /Applications ~/Deskto
@b0gdanw
b0gdanw / iTunes.scpt
Created October 24, 2019 07:30
iTunes 12.6.5.3 on macOS Catalina 10.15
#iTunes 12.6.5.3 https://support.apple.com/HT208079
#iTunes 12.8.2 https://support.apple.com/kb/dl1977
set theDMG to choose file with prompt "Please select iTunes dmg file:" of type {"dmg"}
do shell script "hdiutil mount " & quoted form of POSIX path of theDMG
do shell script "pkgutil --expand /Volumes/iTunes/Install\\ iTunes.pkg ~/tmp"
do shell script "hdiutil unmount /Volumes/iTunes/"
do shell script "cd ~/tmp/iTunesX.pkg;" & "cat Payload | gunzip -dc |cpio -i;" & "ditto ~/tmp/iTunesX.pkg/Applications/iTunes.app ~/tmp/iTunes.app;"
do shell script "plutil -replace CFBundleGetInfoString -string 'iTunes 13.6.5.3' ~/tmp/iTunes.app/Contents/Info.plist"
do shell script "plutil -replace CFBundleShortVersionString -string 13.6.5 ~/tmp/iTunes.app/Contents/Info.plist"
OSX 10.9 Mavericks
https://apps.apple.com/app/id675248567
OS X 10.10 Yosemite
https://apps.apple.com/app/id915041082
OS X 10.11 El Capitan
https://apps.apple.com/app/id1147835434
macOS 10.12 Sierra