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 |
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
# Run in Terminal, no restart required. | |
sudo sysctl debug.lowpri_throttle_enabled=0 | |
# Reverted at restart. |
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
1) Choose Power on to Firmware from the Virtual Machine menu | |
2) then Enter Setup | |
3) Boot from a file | |
4) Arrow down to Recovery HD | |
5) Hit enter until you can pick boot.efi | |
6) select boot.efi | |
7) hit enter |
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
profiles -C -o stdout-xml | grep -A 1 ProfileIdentifier |
NewerOlder