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 Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>com.paulcalnan.pbcopy</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>/usr/bin/pbcopy</string> | |
</array> |
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 python | |
# Idea taken from: | |
# http://community.skype.com/t5/Mac/Re-Pause-option-when-dialing/td-p/731820 | |
import argparse | |
import codecs | |
import re | |
import subprocess | |
import sys |
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
tell application "Xcode" | |
set _workspace to active workspace document | |
set _workspaceFile to file of _workspace | |
end tell | |
tell application "Finder" | |
set _posixTargetPath to quoted form of POSIX path of _workspaceFile | |
end tell | |
tell application "Xcode" |
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
set theProcessName to "iOS Simulator" | |
set theWindowNumber to 1 | |
tell application "System Events" | |
tell process theProcessName | |
activate | |
tell window theWindowNumber | |
set thePosition to position | |
set theSize to size | |
end tell |
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 python | |
import argparse | |
import codecs | |
import subprocess | |
import sys | |
def parse_args(argv): | |
if argv is None: | |
argv = sys.argv[1:] |
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 python | |
import argparse | |
import codecs | |
import json | |
import subprocess | |
import sys | |
def parse_args(argv): | |
if argv is None: |
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 Foundation | |
class SimulatedOperation { | |
// Simulated function that collects data from multiple async calls. | |
// Build an array of [String] values, one element per async call. Hit the | |
// completion block once all of the elements are populated. | |
func collectData(completion: @escaping ([String]) -> Void) { | |
// Locally accumulate the results here. Why does this work? |
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 bash | |
set -euo pipefail | |
E_BADARGS=85 | |
if [ $# -ne 1 ]; then | |
echo "Usage: $(basename $0) tag-name" | |
exit $E_BADARGS | |
fi |
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 python | |
from __future__ import print_function | |
import sys | |
import json | |
try: | |
json.dump(json.load(sys.stdin), sys.stdout, sort_keys=True, indent=4) | |
except ValueError as err: | |
print("Error:", err, file=sys.stderr) |