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
# imagemagick compression | |
# requires brew install imagemagick | |
# $1: original image | |
# $2: compressed output image | |
# usage: imgcompress original.jpg compressed.jpg | |
function imgcompress() { | |
convert -strip -interlace Plane -gaussian-blur 0.05 -quality 85% $1 $2 | |
} |
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
# ffmpeg batch conversion of files in working directory | |
# requires brew install ffmpeg | |
# $1: original file format | |
# $2: output file format | |
# usage: batchconvert m4a mp3 | |
function batchconvert() { | |
for i in *."$1"; do ffmpeg -i "$i" "${i%.$1}.$2"; 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
security find-generic-password -ga "NETWORK NAME" | grep password: |
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 -a /System/Library/Frameworks/ScreenSaver.framework/Versions/A/Resources/ScreenSaverEngine.app |
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
pmset displaysleepnow |
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
PowerShell -Command "Suspend-BitLocker -MountPoint "C:" -RebootCount 1" | |
shutdown /r /f |
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
pwpolicy -clearaccountpolicies |
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 | |
if [ $(find /Users/<username>/ -mtime -1 -type f -name ".dead_mans_switch" 2>/dev/null) ] | |
then | |
echo "Dead mans switch has been touched today." | |
else | |
echo "Dead mans switch has NOT been touched today. Shutting down now." | |
/sbin/shutdown -h now | |
fi |
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 | |
localAccts=$(dscl . list /Users UniqueID | awk '$2>500{print $1}' | grep -v <exempt username>) | |
while read account; do | |
echo "Making sure $account is not an admin" | |
dseditgroup -o edit -d $account admin | |
done < <(echo "$localAccts") | |
exit 0 |
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
sudo usr/sbin/nvram -d fmm-mobileme-token-FMM |
OlderNewer