This file contains hidden or 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
Do this... | ...when you see this message | |
---|---|---|
⌘B Build | ...<some long message>. Build again to continue. | |
⌘⇧K Clean | ...received multiple target ended messages for target ID... | |
⌘⇧K Clean | ...targetID (174) not found in _activeTargets... | |
File > Packages > Resolve Package Versions | ...unable to load transferred PIF: The workspace contains multiple references with the same GUID PACKAGE:1YZON8U0E6OSQJJ6SVU... | |
Close and reopen project (Clean will fail) | ...unknown error while handling message: unknownSession(handle: S0)... | |
Restart Xcode (Clean will fail) | ...unknown error while handling message: MsgHandlingError(message: unable to initiate PIF transfer session (operation in progress?)) | |
Restart Xcode | Clean failed. | |
Quit the Simulator and re-run test/s | Failed to establish communication with the test runner. (Underlying Error: Simulator indicated unix domain socket for testmanagerd at path [...]/com.apple.testmanagerd.unix-domain.socket, but no file was found at that path.) |
This file contains hidden or 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
$0.29 | |
$0.39 | |
$0.49 | |
$0.59 | |
$0.69 | |
$0.79 | |
$0.89 | |
$0.90 | |
$0.95 | |
$0.99 |
This file contains hidden or 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
cat skype_export.json | jq -r '.conversations[] | select(.displayName != null) | select(.displayName | contains("PEER NAME HERE")) | .MessageList[] | select(.messagetype == "Event/Call") | .content' | grep 'ended' | sed -e 's/^.*callId="\([^"]*\)".*<duration>\(.*\)<\/d.*$/\1 \2/g' | uniq | sed 's/^.* \(.*\)$/\1/g' | awk '{ SUM += $1} END { printf "%.2f", SUM }' |
This file contains hidden or 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
command alias objc expression -l objc -O -- | |
command regex swift 's#(.+)#expression -l Swift -O -- defer { CATransaction.flush() }; %1#' | |
breakpoint set -n AppDelegate.application --one-shot true --auto-continue true | |
breakpoint command add | |
swift import Foundation | |
swift import UIKit | |
swift import MyApp_tvOS | |
swift import MyApp_iOS | |
swift func $printSubviews(of view: UIView) { print(view.perform("recursiveDescription")!) } |
This file contains hidden or 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
extension URLRequest { | |
func curlString() -> String { | |
var curl = "curl --insecure" | |
// Method | |
if let method = httpMethod { | |
curl += " -X \(method)" | |
} |
This file contains hidden or 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 --set testing list | grep Booted | grep Clone | sed 's/^.*(\([A-Z0-9\-]*\)).*$/\1/g' | xargs -I {} xcrun simctl --set testing shutdown "{}" |
This file contains hidden or 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
while read -r line ; do echo "$line"; sed -i '' 's/^ *$//g' "$line"; done < <(grep -rl --exclude-dir Pods --include "*.swift" "^ *$" .) |
This file contains hidden or 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
func print_args(function: String = #function, prefix: String = "", _ args: Any...) { | |
let log = function | |
.components(separatedBy: ":") | |
.enumerated() | |
.reduce(prefix.isEmpty ? "" : prefix + " ") { (log, arg1) -> String in | |
let (idx, chunk) = arg1 | |
if idx == args.count - 1 { | |
return log + "\(chunk): \(args[idx])" | |
} else if idx < args.count { |
This file contains hidden or 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
for i in {0..999}; do i=$(printf "%03d" $i); echo -en " Downloading $i\r"; curl -s --fail "<url>/segment_$i.ts" >> /tmp/test.ts || break; done |
This file contains hidden or 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/Foundation.h> | |
@class UINavigationBar; | |
NS_ASSUME_NONNULL_BEGIN | |
@interface OSThirteenDynamicFixes: NSObject | |
/** | |
On iOS 13.0+, ensure the background color and title properties are set properly (they are not available in Xcode 10, these are from a future SDK) |
NewerOlder