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/sh | |
# build-framework-ios.sh | |
# | |
set -e # causes the shell to exit if any subcommand or pipeline returns a non-zero status. | |
set +u | |
# Avoid recursively calling this script. | |
if [[ $SF_MASTER_SCRIPT_RUNNING ]] ; then | |
exit 0 | |
fi | |
set -u # causes the shell to exit if any undefined variable is referenced, `set +u` turns off |
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
extension UIViewController { | |
static let shared : UIViewController = { | |
$0.initialize() | |
return $0 | |
} (UIViewController()) | |
func initialize() { | |
let swizzleClosure: () = { | |
UIViewController().swizzleViewDidLoad() |
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
Paste it to JavaScript console. | |
var items = document.getElementsByClassName("load-diff-button btn-link width-full position-absolute top-0 left-0 height-full f4 no-underline js-diff-load"); | |
for (var i = 0; i < items.length; i++) { | |
items[i].click(); | |
} |
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
extension Date { | |
static func dateFromISO8601String(_ string: String) -> Date? { | |
var tm = Darwin.tm() | |
strptime(string.cString(using: String.Encoding.utf8)!, "%Y-%m-%dT%H:%M:%S", &tm) | |
tm.tm_isdst = -1 | |
return Date(timeIntervalSince1970: TimeInterval(mktime(&tm))) | |
} | |
} |
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
func testExample() { | |
app.launchArguments.append("--clearuser") | |
app.launch() | |
expectation(for: exists, evaluatedWith: app.buttons["Other options"], handler: nil) | |
waitForExpectations(timeout: 20, handler: nil) | |
snapshot("Auth") | |
app.buttons["Other options"].tap() | |
app.buttons["Sign In"].tap() |
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
let cache = ImageCache.default | |
cache.clearMemoryCache() | |
cache.clearDiskCache() |