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
<?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
#!/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
#!/usr/bin/env python3 | |
# just a PyObjC example, this of course requires pyobjc also in your python (virtual)env | |
from Foundation import NSBundle, NSClassFromString | |
NSBundle.bundleWithPath_("/System/Library/PrivateFrameworks/SystemDesktopAppearance.framework").load() | |
sda_class = NSClassFromString('SystemDesktopAppearance') | |
print(sda_class.performSelector_('OSName')) |
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
owner=timsutton | |
repo=brigadier | |
curl -s "https://api.github.com/repos/${owner}/${repo}/releases \ | |
| jq . \ | |
| grep download_count \ | |
| cut -d : -f 2 \ | |
| tr -d ' ,' \ | |
| awk '{s+=$1} END {print s}' |
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
#!/usr/bin/perl | |
# | |
## Copyright © 2002-2014, 2018 Apple Inc. All Rights Reserved. | |
## | |
## IMPORTANT NOTE: This file is licensed only for use on Apple-branded | |
## computers and is subject to the terms and conditions of the Apple Software | |
## License Agreement accompanying the package this file is a part of. | |
## You may not port this file to another platform without Apple's written consent. | |
# |
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"> | |
<array> | |
<dict> | |
<key>_SPCommandLineArguments</key> | |
<array> | |
<string>/usr/sbin/system_profiler</string> | |
<string>-nospawn</string> | |
<string>-xml</string> |
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
join_zoom() { | |
# Joins the first Zoom meeting URL found in events happening now on | |
# your calendar, by searching their descriptions/locations info for | |
# "zoom.us" URLs, and opening them using `open` | |
# | |
# Another option for launching Zoom is directly, via its own URL handler like | |
# zoommtg://zoom.us/join?confno=123456789, but not sure how this works | |
# with static meeting URLs like zoom.us/my/myusername, and seems it | |
# could change in Zoom app updates, whereas the web URLs will always know | |
# what to do. |
NewerOlder