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/zsh | |
:<<'ABOUT_THIS_SCRIPT' | |
----------------------------------------------------------------------- | |
Written by:William Smith | |
Partner Program Manager | |
Jamf | |
bill@talkingmoose.net | |
https://gist.github.com/b6637160b65b751824943ede022daa17 |
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 | |
currentUser=$(/usr/bin/python -c 'from SystemConfiguration import SCDynamicStoreCopyConsoleUser; import sys; username = (SCDynamicStoreCopyConsoleUser(None, None, None) or [None])[0]; username = [username,""][username in [u"loginwindow", None, u""]]; sys.stdout.write(username + "\n");') | |
computerHostname=$(hostname) | |
dateTime=$(date +%F_%H-%M-%S) | |
archiveName="$computerHostname-logs.$dateTime" | |
outputDirectory="/Users/$currentUser/Desktop/" | |
expect <<- DONE | |
set timeout -1 | |
spawn sysdiagnose -b -d -f "$outputDirectory" -A "$archiveName" |
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 | |
KEYCHAIN_PATH="/Library/Keychains/System.keychain" | |
CERTIFICATE_CER_PATHS=( \ | |
"/private/tmp/my-certificate-1.cer" \ | |
"/private/tmp/my-certificate-2.cer" ) | |
for certificateCerPath in "${CERTIFICATE_CER_PATHS[@]}"; do | |
certificatePemPath="$certificateCerPath.pem" | |
openssl x509 -inform der -in "$certificateCerPath" -out "$certificatePemPath" | |
opensslVerifyResponse=$(openssl verify -CAfile "$certificatePemPath" "$certificatePemPath" | grep -o 'error.*at .*depth') |
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
Solarized | |
#FDF6E3,#EEE8D5,#93A1A1,#FDF6E3,#EEE8D5,#657B83,#2AA198,#DC322F | |
Solarized Dark | |
#073642,#002B36,#B58900,#FDF6E3,#CB4B16,#FDF6E3,#2AA198,#DC322F | |