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
GROUP_TO_ADD_TO="suspended" | |
gam print users suspended | grep -iv '@operationhopeboard.org'| grep 'True' | | |
cut -d',' -f1 | while read user; do | |
gam update group "$GROUP_TO_ADD_TO" add member user "$user" | |
done |
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
<div id="google_translate_element"></div><script type="text/javascript"> | |
function googleTranslateElementInit() { | |
new google.translate.TranslateElement({pageLanguage: 'en', layout: google.translate.TranslateElement.InlineLayout.SIMPLE}, 'google_translate_element'); | |
} | |
</script><script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script> |
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
#stolen from https://jamfnation.jamfsoftware.com/discussion.html?id=12979 | |
/bin/echo "set time zone automatically using current location" | |
# enable location services | |
/bin/launchctl unload /System/Library/LaunchDaemons/com.apple.locationd.plist | |
uuid=`/usr/sbin/system_profiler SPHardwareDataType | grep "Hardware UUID" | cut -c22-57` | |
/usr/bin/defaults write /var/db/locationd/Library/Preferences/ByHost/com.apple.locationd.$uuid LocationServicesEnabled -int 1 | |
/usr/sbin/chown -R _locationd:_locationd /var/db/locationd | |
/bin/launchctl load /System/Library/LaunchDaemons/com.apple.locationd.plist | |
# set time zone automatically using current location |
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
#!/usr/bin/env bash | |
#try resetting pram & smc first | |
#try to ssh into the the machine if it appears to be stuck booting (50% loading bar) | |
#if that fails, try booting holding command+r and repair disk/repair disk permissions | |
#some comment from internet: verify if the user has the attribute which again in our case they always do when this issue happens because there were some machines that were manually bound a long time ago by some of the PC techs and they weren't paying attention to the checkboxes in Directory Utility so this attribute would get created. | |
#dscl . -read /Users/<user> OriginalHomeDirectory | |
#dscl -u <admin username> . -delete /Users/<user> OriginalHomeDirectory |
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
sudo kextunload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport && sudo kextload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport |
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
rm -Rfv ~/Library/Preferences/*luetooth* | |
rm -Rfv ~/Library/Preferences/ByHost/*luetooth* | |
sudo rm -Rfv /Library/Preferences/*luetooth* | |
nvram -c | |
sudo reboot |
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
sudo ruby -e 'key = [125, 137, 82, 35, 210, 188, 221, 234, 163, 185, 31]; IO.read("/etc/kcpassword").bytes.each_with_index { |b, i| break if key.include?(b); print [b ^ key[i % key.size]].pack("U*") }' |
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
class ProgressDialog(object): | |
def __init__(self, message, title, use_bar=True): | |
super(self.__class__, self).__init__() | |
self.message = message | |
self.title = title | |
self.use_bar = use_bar | |
self.queue = None | |
self.process = None | |
def display(self): | |
# [ begin black magic ] |
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
disk="$(diskutil cs list | grep -i revert -B4 | grep -i disk | awk '{print $2}')" | |
diskutil cs revert /dev/"$disk" && reboot |
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
defaults read > a | |
#Change the setting | |
defaults read > b | |
diff a b |
NewerOlder