chore(osx): improve on gatekeeper snippets

This commit is contained in:
Michele Cereda
2024-10-24 09:05:43 +02:00
parent 2997d5cfd1
commit c54b2cf9a4
2 changed files with 14 additions and 2 deletions

View File

@@ -5,6 +5,15 @@ scutil --set 'ComputerName' "$(defaults read '/Library/Preferences/SystemConfigu
scutil --set 'HostName' "$(defaults read '/Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName')"
scutil --set 'LocalHostName' "$(defaults read '/Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName')"
# Bypass Gatekeeper for currently installed versions
xattr -c '/Applications/Spotify.app'
# Bypass Gatekeeper for all versions of apps
xattr -d 'com.apple.quarantine' '/Applications/LibreWolf.app'
xattr -d 'com.apple.quarantine' '/Applications/Zen Browser.app'
# Clear the DNS cache
sudo dscacheutil -flushcache; sudo killall -HUP 'mDNSResponder'
@@ -22,11 +31,14 @@ scutil --dns | grep -C '3' '192.168.1.254'
dscacheutil -q 'host' -a 'name' '192.168.1.35'
dscacheutil -q 'host' -a 'name' 'gitlab.lan'
# Change the number of columns and rows in the springboard
defaults write 'com.apple.dock' 'springboard-columns' -int '9'
defaults write 'com.apple.dock' 'springboard-rows' -int '7'
# Need to be followed by a restart of the modified component
killall 'Dock'
# Install Xcode cli tools if missing
[[ -d "$(xcode-select --print-path)" ]] || xcode-select --install