SPMVersions.versionOf("THE_PACKAGE_ID")
| #!/bin/zsh | |
| # this script outputs the github URL of the frontmost file in Xcode. | |
| # v0.2 | |
| if [[ -z $(which jq) ]]; then | |
| echo install jq with \'brew install jq\' | |
| exit 1 | |
| fi | |
| TUPLE=$(osascript << HERE |
| #!/bin/bash | |
| # scan path[s] for files, folders or ZIPs containing Xcode projects with suspicious contents | |
| if [[ $# == 0 ]]; then | |
| echo "usage: $0 [--verbose] path [path2 ...]" | |
| echo " path can be a folder or a file" | |
| exit | |
| fi | |
| function do_file() { |
| func random1() -> CGFloat { | |
| return CGFloat(arc4random()) / CGFloat(UINT32_MAX) | |
| } | |
| extension UIColor { | |
| static func random() -> UIColor { | |
| return UIColor.init(red: random1(), green: random1(), blue: random1(), alpha: 0.1) | |
| } | |
| } |
| xcrun simctl list devices | awk '/-- .* --/ { if ( $2 == "iOS" && $3 ~ /8*/ ) { inIOS = 1 } else { inIOS = 0 }}; { if ( inIOS && match($0,/\([0-9A-F\-]*\)/) ) { print substr($0,RSTART+1, RLENGTH-2) }} ' | xargs -I {} xcrun simctl delete {} |
| #!/bin/bash | |
| # given a spreadsheet, create a Localizable.strings file for a given language | |
| cat localized.csv | | |
| while IFS=',' read devConst devValue englishValue spanishValue; do | |
| if [[ $devValue ]]; then | |
| devConst=`echo "$devConst" | tr -d '/* '` |