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 XCTest | |
/// Attempts to unwrap an optional, failing the test if the value is nil. Your test method needs to be marked as `throws` to use this, and unwrap with: | |
/// `let value = try AssertUnwrap(optionalValue)` | |
/// | |
/// Inspired by the upcoming `XCTUnwrap()` in Xcode 11. | |
/// | |
/// - Parameters: | |
/// - value: Optional to unwrap | |
/// - message: If you want to override the default error message |
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 { danger, warn, fail, markdown, message } from "danger"; | |
import jiraIssue from "danger-plugin-jira-issue"; | |
import { readFileSync } from "fs"; | |
/* | |
Danger will post all these fail/warn/message's as a comment on the PR, from the jenkins user. Over time, as commits are added, the comment is amended. | |
No comment means you're all good and the PR passes these checks. | |
Check out http://danger.systems/js/ for how this all works, and http://danger.systems/js/guides/the_dangerfile.html for creating more rules. | |
*/ |
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
{"version":1,"resource":"file:///Users/steven/src/github.com/Shopify/arrive-client/src/features/account/views/AccountDeletionView.tsx","entries":[{"id":"vhvm.tsx","source":"searchReplace.source","timestamp":1653671308343}]} |
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 UIKit | |
import ObjectiveC | |
// MARK: - DynamicTypeResponsive | |
protocol DynamicTypeResponsive { | |
var respondsToDynamicTypeChanges: Bool { get set } | |
} | |
extension UILabel: DynamicTypeResponsive { | |
var respondsToDynamicTypeChanges: Bool { |
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 UIKit | |
public extension UICollectionView { | |
public func register<T: UICollectionViewCell>(type: T.Type) { | |
registerNib(T.Nib, forCellWithReuseIdentifier: T.Identifier) | |
} | |
public func cell<T: UICollectionViewCell>(forIndexPath indexPath: NSIndexPath) -> T { | |
return dequeueReusableCellWithReuseIdentifier(T.Identifier, forIndexPath: indexPath) as! T | |
} |
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
// Save as ~/Documents/.../OpenXcodeProject.sh | |
#!/bin/bash | |
if [ -e *.xcworkspace ]; then | |
open *.xcworkspace | |
echo 'Found a workspace file, opening' | |
elif [ -e *.xcodeproj ]; | |
then open *.xcodeproj | |
echo 'found xcodeproj, opening' | |
else echo 'Found nothing!' | |
fi |
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
return YES; |