This file contains 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
log stream --debug --predicate 'process == "cfprefsd" && eventMessage CONTAINS "wrote the key"' |
This file contains 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
runAsUser defaults write com.apple.loginwindow TALLogoutSavesState -bool false | |
runAsUser defaults write com.apple.loginwindow LoginwindowLaunchesRelaunchApps -bool false |
This file contains 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
iMac (24-inch, 2024) Mac16,2 Mac16,3 | |
Mac mini (2024) Mac16,10 Mac16,11 | |
Mac Pro (2023) Mac14,8 | |
Mac Studio (2023) Mac14,13 Mac14,14 | |
MacBook Air (13-inch, M3, 2024) Mac15,12 | |
MacBook Air (15-inch, M3, 2024) Mac15,13 | |
MacBook Pro (14-inch, M4 Pro, 2024) Mac16,8 | |
MacBook Pro (14-inch, M4 Max, 2024) Mac16,6 | |
MacBook Pro (14-inch, M4, 2024) Mac16,1 | |
MacBook Pro (16-inch, 2024) Mac16,7 Mac16,5 |
This file contains 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
set theDialogText to "The current date and time is " & (current date) & "." | |
display dialog theDialogText | |
--> Result: {button returned:"OK"} |
This file contains 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
startosinstall command & syntax | |
Command: startosinstall | |
Requires root access: Yes | |
Parameters: | |
- -usage: Displays all parameters available for the command. | |
- -agreetolicense: Agrees to the license agreement during deployment (Required for automated deployments). |
This file contains 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
cat /System/Library/Sandbox/rootless.conf | |
ls -ale # and look for com.apple.rootless |
This file contains 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 | |
ibridge="$(/usr/sbin/system_profiler SPiBridgeDataType | /usr/bin/grep 'Model Name')" | |
if [[ "$ibridge" == "" ]] ; | |
then | |
defaults write /Library/Preferences/org.myorg.machineDetails.plist awesomechip -string "None" | |
else | |
defaults write /Library/Preferences/org.myorg.machineDetails.plist awesomechip -string "$ibridge" | |
fi |
This file contains 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
# Output to a file, overwriting it if it exists | |
ls > ~/Desktop/file.txt | |
# Output to a file, appending to it if it exists | |
ls >> ~/Desktop/file.txt | |
# Pipe output to an application, the "-fe" tag will instruct to read the piped input and open it as a new unsaved file | |
ls | open -fe | |
# Pipe output to the Mac's clipboard |
This file contains 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
log show --predicate 'eventMessage contains "Previous shutdown cause"' --last 24h |
This file contains 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
# 10.10.4-Current | |
sudo killall -HUP mDNSResponder | |
# 10.10.0-10.10.3 | |
sudo discoveryutil mdnsflushcache | |
# 10.7-10.9 | |
sudo killall -HUP mDNSResponder | |
# 10.5-10.6 |
NewerOlder