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
(iMac(9|1[0-5])|MacPro[4|5]|Macmini[3-6]),\d|MacBook([5-8]|Air[2-6]),\d|MacBookPro(([4-9]|10),\d|11,[1-3]) | |
iMac (Earlier than Late 2015) | |
iMac9,1 | |
iMac10,1 | |
iMac11,2 | |
iMac11,3 | |
iMac12,1 | |
iMac12,2 | |
iMac13,1 |
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/sh | |
defaultBrowser=$(defaults read ~/Library/Preferences/com.apple.LaunchServices/com.apple.launchservices.secure.plist | grep https -B1 | grep All | awk -F" = " '{ print $2 }' | tr -d '";') | |
open -b "$defaultBrowser" https://www.apple.com |
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
sips -Z 128 "image.png" -o "image128.png" |
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/sh | |
username="SKeenan07" | |
repository="mac-admin-scripts" | |
branch="master" | |
path="auto-logout/" | |
fileName="autoLogout.zsh" | |
curl -sLo "/tmp/$fileName" "https://raw.githubusercontent.com/$username/$repository/$branch/$path$fileName" |
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 | |
powerConnected=$(system_profiler SPPowerDataType | grep "Connected:" | sed 's|Connected: ||g' | tr -d ' ') | |
while [ "$powerConnected" = "No" ]; do | |
sleep 2 | |
powerConnected=$(system_profiler SPPowerDataType | grep "Connected:" | sed 's|Connected: ||g' | tr -d ' ') | |
done |