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
$ xcrun simctl status_bar booted override --time "9:41" --batteryState charged --batteryLevel 100 --cellularMode active |
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
# make a backup | |
adb backup -noapk com.package.name -f backup.ab | |
# strip out the bits | |
dd if=backup.ab bs=1 skip=24 of=backup.bak | |
# use convertToTar.py (see other file in gist) | |
python convertToTar.py | |
# untar |
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
public static class NSNotificationCenterExtensions | |
{ | |
public static IObservable<NSNotification> ObserveNotification(this NSNotificationCenter notificationCenter, NSString notificationKey) => | |
Observable.Create<NSNotification>(obs => | |
{ | |
var nsObserver = notificationCenter.AddObserver(notificationKey, obs.OnNext); | |
return Disposable.Create(() => notificationCenter.RemoveObserver(nsObserver)); | |
}); | |
} |
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 | |
# based on http://stackoverflow.com/questions/755382/i-want-to-delete-all-bin-and-obj-folders-to-force-all-projects-to-rebuild-everyt | |
find . -iname "bin" -type d | xargs rm -rf | |
find . -iname "obj" -type d | xargs rm -rf | |
# clear VS4Mac temporary downloads | |
echo ~/Library/Caches/VisualStudio/7.0/TempDownload/ | |
for f in ~/Library/Caches/VisualStudio/7.0/TempDownload/* ; do | |
sudo rm -rf $f | |
done |