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
# Add group `everyone` to `lpadmin` group | |
dseditgroup -o edit -n /Local/Default -a everyone -t group lpadmin |
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
# Allow text selection in Quicklook | |
defaults write com.apple.finder QLEnableTextSelection -bool true && killall Finder |
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
# XML | |
xmllint --format "/Library/Application Support/JAMF/.blacklist.xml" | |
# JSON | |
cat "/Library/Application Support/JAMF/.jmf_settings.json" |
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
# Mount EFI partiton (Windows, Linux etc) | |
sudo bless --folder /Volumes/efi/EFI/Boot/ --label "wegopc" | |
# With SIP disabled | |
sudo bless --folder /System/Library/CoreServices --label "wegomac" |
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
username="" | |
sudo dscl . -passwd /Users/"${username}" <password1> <password2> |
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
# Connect to server | |
grep sshd.\*Failed /var/log/auth.log | less |
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
# On the Mac | |
system_profiler SPHardwareDataType | awk '/Serial/ {print $4}' | |
ioreg -l | grep IOPlatformSerialNumber | awk '{print $4}' | sed 's/"//g' |
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
# As other user | |
open smb://other_username:*@server.name.here |
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
# Create certificate bundle with private key and cert, and intermediate certs | |
openssl pkcs12 -export -out <certBundle>.pfx -inkey <privateKey>.key -in <serverCert>.crt -certfile <intermediateCert>.crt |
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
# Show connections | |
netstat -tn 2>/dev/null | grep :8443 | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -nr | head | |
# Show routing table | |
netstat -nr | |
# Show all connections | |
netstat -na |
OlderNewer