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 | |
# A cleaner alternative to this approach, but which requires a restart, is to populate TCC's SiteOverrides.plist inside | |
# the TCC app support directory with the following: | |
# <?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>Services</key> | |
# <dict> |
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 | |
set -eu -o pipefail | |
function machine_uptime_seconds() { | |
boottime=$(sysctl -n kern.boottime | perl -n -e'/^.* sec = (\d+)?\,.*$/; print $1') | |
now=$(date +%s) | |
uptime=$((now - boottime)) | |
echo $uptime | |
} |
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
# list all local cask files and find the 'appcast' stanza | |
# - assumes you have brew cask installed: | |
# brew install caskroom/cask/brew-cask | |
for cask in `ls /usr/local/Library/Taps/caskroom/homebrew-cask/Casks | awk -F"." '{print $1}'`; do | |
cast=$(brew cask cat ${cask} | grep appcast | awk '{print $2}') | |
[ -n "${cast}" ] && echo "${cask}: ${cast}" | grep http | |
done | |
a-better-finder-attributes: 'http://www.publicspace.net/app/signed_abfa5.xml' | |
a-better-finder-rename: 'http://www.publicspace.net/app/signed_abfr9.xml' |
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
➜ proxygen git:(main) ✗ ./build.sh | |
+++ dirname ./build.sh | |
++ cd . | |
++ pwd | |
+ BASE_DIR=/Users/tim/git/proxygen/proxygen | |
+ COLOR_RED='\033[0;31m' | |
+ COLOR_GREEN='\033[0;32m' | |
+ COLOR_OFF='\033[0m' | |
+ JOBS=8 | |
+ INSTALL_DEPENDENCIES=true |
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
➜ ~ sw_vers | |
ProductName: Mac OS X | |
ProductVersion: 10.12.1 | |
BuildVersion: 16B2333a | |
➜ ~ ls -l /System/Library/Filesystems/apfs.fs/Contents/Resources | |
total 2088 | |
-rwxr-xr-x 1 root wheel 349760 22 Sep 03:48 apfs.util | |
-rwxr-xr-x 1 root wheel 352880 22 Sep 03:48 apfs_invert |
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
<?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>downloadables</key> | |
<array> | |
<dict> | |
<key>category</key> | |
<string>simulator</string> | |
<key>contentType</key> |
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 | |
# | |
# Example of using hyperfine to benchmark bazel-based builds of Envoy proxy: | |
# https://github.com/envoyproxy/envoy/ | |
target="//source/exe:envoy_main_common_lib" | |
# Other examples of targets: | |
# main binary | |
# target="//source/exe:envoy-static" |
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
<key>PayloadContent</key> | |
<array> | |
<dict> | |
<key>PayloadContent</key> | |
<dict> | |
<key>com.apple.SoftwareUpdate</key> | |
<dict> | |
<key>Forced</key> | |
<array> | |
<dict> |
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
#!/usr/bin/python | |
# | |
# Simple script to batch-rename attached iOS devices according to UUID to name mappings | |
# in a CSV file. | |
# | |
# Usage: rename_devices.py <csvfile> | |
# | |
# | |
# The CSV file should be comma-separated and contain at least the 'udid' and 'name' | |
# fields. Such a CSV can be exported from Configurator. Any additional field will simply |
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
#!/usr/bin/python | |
# pylint: disable-msg=e1101,e0611 | |
import time | |
import AVFoundation as AVF | |
import Quartz | |
from Foundation import NSObject, NSURL | |
def main(): |
NewerOlder