This file contains hidden or 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 | |
# Jacob Salmela | |
# 2014-07-11 | |
# Fix multiple Recovery HDs created by Casper Imaging from Defect D-007146 | |
# Get last extra Recovery HD by parsing out the bootable Recovery HD, leaving only the extra partitions | |
lastExtraRecovery=$(diskutil list | awk "/Recovery HD/" | grep -v "Apple_Boot" | awk '{print $7}' | tail -n1) | |
# Get Macintosh disk ID | |
systemVolume=$(diskutil list | awk "/Macintosh HD/" | grep -v "Apple_Boot" | awk '{print $7}') |
This file contains hidden or 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))}') | |
if [ "$volumeName" != "Macintosh HD" ];then | |
echo "<result>Incorrect</result>" | |
else | |
echo "<result>Correct</result>" | |
fi |
This file contains hidden or 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 | |
# http://support.apple.com/kb/HT3789 | |
# Jacob Salmela | |
# 2014-05-31 | |
if [[ $(/usr/libexec/PlistBuddy -c Print /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist | grep 'NoMulticast') ]];then | |
echo "Boinjour is already disabled." | |
exit 1 | |
else | |
launchctl unload -w /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist |
This file contains hidden or 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 | |
#----------AUTHOR------------ | |
# Jacob Salmela | |
# 24 May 2013 | |
#----------RESOURCES--------- | |
# http://stackoverflow.com/questions/4128235/bash-shell-scripting-what-is-the-exact-meaning-of-ifs-n | |
#---------DESCRIPTION-------- | |
# Attempts to list all apps in /Applications and their version numbers |
This file contains hidden or 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 | |
#----------AUTHOR------------ | |
# Jacob Salmela | |
# 12 August 2013 | |
# https://github.com/jakesalmela/ | |
#---------DESCRIPTION-------- | |
# Say command for Linux | |
# Save as /usr/bin/say |
This file contains hidden or 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 | |
#----------AUTHOR------------ | |
# Jacob Salmela | |
# 27 March 2014 | |
# https://github.com/jakesalmela/ | |
#---------DESCRIPTION-------- | |
# Tests the performance of a script | |
#-----------USAGE------------ |
This file contains hidden or 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 | |
#----------AUTHOR------------ | |
# Jacob Salmela | |
# 3 December 2013 | |
#----------RESOURCES--------- | |
# http://stackoverflow.com/questions/12230762/insert-characters-into-a-string-in-bash | |
#---------DESCRIPTION-------- | |
# Copies the computers serial number into the clipboard and then speaks it aloud so you can write it down |
This file contains hidden or 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 | |
#----------AUTHOR------------ | |
# Jacob Salmela | |
# 15 November 2013 | |
# https://github.com/jakesalmela/ | |
#----------RESOURCES--------- | |
# http://askubuntu.com/questions/80371/bash-history-handling-with-multiple-terminals | |
# http://www.csgnetwork.com/epochtime.html |
This file contains hidden or 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 | |
#----------AUTHOR------------ | |
# Jacob Salmela | |
# 7 November 2013 | |
# https://github.com/jakesalmela/ | |
#----------RESOURCES--------- | |
# You need terminal-notifier to be installed | |
# I used brew install terminal-notifier | |
# You could also get it at github |
This file contains hidden or 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 | |
# Jacob Salmela | |
# 2014-06-01 | |
#-------DESCRIPTION----------- | |
# smasp - Save Mac App Store Packages | |
#---------USAGE--------------- | |
# Pause each app or update that you want to save a package for | |
# Run this script |