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 | |
| if [ "$1" = "-h" -o "$1" = "--help" -o -z "$1" ]; then cat <<EOF | |
| appify v3.0.1 for Mac OS X - http://mths.be/appify | |
| Creates the simplest possible Mac app from a shell script. | |
| Appify takes a shell script as its first argument: | |
| `basename "$0"` my-script.sh |
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
| # Disable menu bar transparency | |
| defaults write NSGlobalDomain AppleEnableMenuBarTransparency -bool false | |
| # Show remaining battery time; hide percentage | |
| defaults write com.apple.menuextra.battery ShowPercent -string "NO" | |
| defaults write com.apple.menuextra.battery ShowTime -string "YES" | |
| # Always show scrollbars | |
| defaults write NSGlobalDomain AppleShowScrollBars -string "Always" |
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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>PayloadContent</key> | |
| <array> | |
| <dict> | |
| <key>PayloadContent</key> | |
| <dict> | |
| <key>com.apple.touristd</key> |
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 | |
| ## @file | |
| ## Shows CLI diff between two plist files. | |
| ## | |
| ## Normally, Mac plist files are binary, so diffs do not display. However, | |
| ## there are cases where seeing diffs is important. For example, when tracking | |
| ## changes via Mackup's git storage option. | |
| ## | |
| ## Note this option allows seeing plist diffs without fully installing Xcode |
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 python | |
| import plistlib | |
| import json | |
| import tkFileDialog | |
| import re | |
| import sys | |
| file_to_open = tkFileDialog.askopenfilename(message="Select an existing plist or json file to convert.") | |
| converted = None |
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/sh | |
| sudo dscl . read /Users/$USER ShadowHashData | tail -1 | xxd -p -r | plutil -convert xml1 - -o - | sed s/data/string/ | plutil -convert json - -o $USER.json | |
| ITERATIONS=$(jq '."SALTED-SHA512-PBKDF2".iterations' $USER.json) | |
| SALT=$(jq '."SALTED-SHA512-PBKDF2".salt' $USER.json | sed -E 's/"?\\n\\t\\t"?//g' | base64 -D | xxd -c 256 -p) | |
| ENTROPY=$(jq '."SALTED-SHA512-PBKDF2".entropy' $USER.json | sed -E 's/"?\\n\\t\\t"?//g' | base64 -D | xxd -c 256 -p | cut -c -128) | |
| echo "\$ml\$$ITERATIONS\$$SALT\$$ENTROPY" > $USER.hash | |
| hashcat -m 7100 --example-hashes | awk '/HASH/{print $2}' > example.hash | |
| hashcat -a 3 -m 7100 example.hash "?l?l?l?l?l?l?l" |
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/python | |
| """ | |
| Completely reset TCC services database in macOS | |
| Note: Both the system and individual users have TCC databases; run the script as both | |
| a user and as root to completely reset TCC decisions at all levels. | |
| 2018-08-15: Resetting the 'Location' service fails; unknown cause | |
| 2018-08-16: Confirmed the 'All' service does not really reset _all_ | |
| services, so individual calls to each service is necessary. |
OlderNewer