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
osascript -e 'tell application "system events" to delete login items' |
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 | |
volumeName=$(diskutil info / | awk '/Volume Name/ {print substr ($0, index ($0,$3))}') | |
echo "Current volume name: $volumeName" | |
# If the volume is not named Macintosh HD | |
if [ "$volumeName" != "Macintosh HD" ];then | |
# Rename it | |
diskutil renameVolume "$volumeName" "Macintosh HD" | |
volumeName=$(diskutil info / | awk '/Volume Name/ {print substr ($0, index ($0,$3))}') | |
echo "Root volume is now named: $volumeName" |
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 | |
#----------VARIABLES--------- | |
undesiredNetwork="SSID-To-Remove" | |
wifiOrAirport=$(/usr/sbin/networksetup -listallnetworkservices | grep -Ei '(Wi-Fi|AirPort)') | |
echo $wifiOrAirport | |
wirelessDevice=$(networksetup -listallhardwareports | awk "/$wifiOrAirport/,/Device/" | awk 'NR==2' | cut -d " " -f 2) | |
echo $wirelessDevice | |
#-----------SCRIPT----------- | |
# Remove the SSID from the list of preferred networks |
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 | |
# opening and closing windows and popovers | |
defaults write -g NSAutomaticWindowAnimationsEnabled -bool false | |
# smooth scrolling | |
defaults write -g NSScrollAnimationEnabled -bool false | |
# showing and hiding sheets, resizing preference windows, zooming windows | |
# float 0 doesn't work | |
defaults write -g NSWindowResizeTime -float 0.001 |
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 | |
# Get the entire computer name and save it in a variable | |
#existingName=$(hostname | cut -d'-' -f2-) | |
existingName=$(hostname) | |
# Set the computer name to Repurpose-"Existing computer name" | |
scutil --set LocalHostName "Repurpose-$existingName" | |
scutil --set ComputerName "Repurpose-$existingName" | |
scutil --set HostName "Repurpose-$existingName" | |
serialNum=$(ioreg -l | awk '/IOPlatformSerialNumber/ { split($0, line, "\""); printf("%s\n", line[4]); }') |
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
# Open test site | |
osascript -e 'tell application "Google Chrome" | |
activate | |
open location "https://testnav.com/mn/testnav-7.5.22.36/" | |
end tell' |
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
case ${OSTYPE} in | |
# Snow Leopard through Mountain lion | |
darwin10*) touch /private/var/db/.AccessibilityAPIEnabled;; | |
darwin11*) touch /private/var/db/.AccessibilityAPIEnabled;; | |
darwin12*) touch /private/var/db/.AccessibilityAPIEnabled;; | |
# Mavericks and Yosemite | |
darwin13*) sqlite3 /Library/Application\ Support/com.apple.TCC/TCC.db "INSERT INTO access VALUES('kTCCServiceAccessibility','com.apple.systemevents',0,1,1,NULL);"; | |
sqlite3 /Library/Application\ Support/com.apple.TCC/TCC.db "INSERT INTO access VALUES('kTCCServiceAccessibility','com.apple.RemoteDesktopAgent',0,1,1,NULL);";; | |
darwin14*) sqlite3 /Library/Application\ Support/com.apple.TCC/TCC.db "INSERT INTO access VALUES('kTCCServiceAccessibility','com.apple.systemevents',0,1,1,NULL);"; | |
sqlite3 /Library/Application\ Support/com.apple.TCC/TCC.db "INSERT INTO access VALUES('kTCCServiceAccessibility','com.apple.RemoteDesktopAgent',0,1,1,NULL);";; |
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 | |
appStoreFolder=$(sudo find /private/var/folders -type f -name "*.pkg") | |
i=0 | |
for package in $appStoreFolder | |
do | |
sudo ln $package ~/Downloads/_MAS_$i.pkg | |
i=$(($i+1)) | |
done |
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
killall Safari > /dev/null | |
# Set your variable values here | |
bud='/usr/libexec/Plistbuddy' | |
plist='/Users/student/Library/Preferences/com.apple.Safari.plist' | |
urls=('https://www.testnav.com/mn/testnav-7.5.22.36/' | |
'https://proctorcaching.pearsonaccess.com/ems/systemCheck/systemCheck.jsp?acc=mn' | |
'https://testnav.com/mnqc/testnav-7.5.22.36/epatLogin.jsp?testnavTestId=TRG10R14&testnavFormId=S01M4' | |
'https://testnav.com/mnqc/') | |