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 | |
echo $(ls ~/Library/Caches/Metadata/Safari/Bookmarks | wc -l) bookmarks |
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
import random | |
import time | |
def main(): | |
numOfWords = 50 # change this number to modify how many words show up | |
word_file = "/usr/share/dict/words" # word file in Unix | |
words = open(word_file).read().splitlines() # file -> list | |
dup = ""; word = ""; # initialize strings |
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 | |
cd ~/.Trash | |
echo $(ls | wc -l) items in trash | |
ls |
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 | |
echo $(ls ~/Library/Caches/Metadata/Safari/History | wc -l) websites in history |
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 | |
#Beta 4 to Final Public Release (Must be run in Recovery Mode) | |
csrutil disable | |
#Beta 1-3 | |
sudo nvram boot-args="rootless=0";sudo reboot |
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
/** | |
Perform function on all views that match type specified by function parameter. | |
*/ | |
func iterateThroughViewsIn<SpecificViewType>(view: UIView, function: SpecificViewType -> Void) { | |
for subview in view.subviews { | |
if let viewOfSpecificType = subview as? SpecificViewType { | |
function(viewOfSpecificType) | |
} | |
iterateThroughViewsIn(subview, function: function) | |
} |
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 | |
defaults write com.apple.screencapture location ~/Library/Mobile\ Documents/com~apple~CloudDocs/Screenshots | |
killall SystemUIServer |
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 | |
# Update for latest stable Xcode release | |
find ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins -name Info.plist -maxdepth 3 | xargs -I{} defaults write {} DVTPlugInCompatibilityUUIDs -array-add `defaults read /Applications/Xcode.app/Contents/Info DVTPlugInCompatibilityUUID` | |
# Update for latest beta Xcode release | |
find ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins -name Info.plist -maxdepth 3 | xargs -I{} defaults write {} DVTPlugInCompatibilityUUIDs -array-add `defaults read /Applications/Xcode-beta.app/Contents/Info DVTPlugInCompatibilityUUID` |
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 | |
killall Xcode | |
rm -rf ~/Library/Autosave Information/ | |
rm -rf ~/Library/Saved Application State/com.apple.dt.Xcode.savedState |
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 | |
brctl log --wait --shorten |
OlderNewer