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
# Check connected wifi | |
/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I | grep SSID |
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
# Find failed commands | |
select count(*) from mobile_device_management_commands where apns_result_status='Error'; | |
# Find failed VPP commands | |
select count(*) from mobile_device_management_commands where command='InstallApplication' and apns_result_status='Error'; | |
# Show devices with failed commands | |
select device_id from mobile_device_management_commands where apns_result_status='Error'; | |
# Show devices with failed VPP commands |
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
# Download | |
https://www.macports.org/install.php | |
# Uncompress | |
tar xjvf MacPorts-2.7.2.tar.bz2 | |
# Install | |
cd MacPorts-2.7.2 | |
./configure --prefix=${HOME}/.macports --with-install-user=${USER} --with-install-group=staff | |
make && make install |
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 all | |
defaults domains | tr ',' '\n' | |
# Global prefs | |
$(defaults read -g AppleLocale) | |
# is the same as | |
$(defaults read .GlobalPreferences AppleLocale) | |
# is the same as |
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 |
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
Get-Content "C:\Program Files\JSS\Logs\JAMFSoftwareServer.log" -Wait |
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
sudo /System/Library/CoreServices/Setup\ Assistant.app/Contents/MacOS/Setup\ Assistant -MBDebug |
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
read -p "Session name: " nameOfSession | |
# Create socket | |
touch /tmp/${nameOfSession} && chgrp serveradmins /tmp/${nameOfSession} | |
# Create session | |
tmux -CC -S /tmp/${nameOfSession} new -s ${nameOfSession} | |
# Connect to the session from the second terminal | |
tmux -S /tmp/${nameOfSession} attach -t ${nameOfSession} |
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
# Connect to server | |
grep sshd.\*Failed /var/log/auth.log | less |