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/Foundation.h> | |
@interface NSString (Hash) | |
- (NSString *)md5; | |
+ (NSString *)stringWithHash:(unsigned char *)hash | |
digestLength:(int32_t)digestLength; | |
@end |
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 UIKit | |
extension CAGradientLayer { | |
enum Direction { | |
case left | |
case top | |
case right | |
case bottom | |
case custom(start: CGPoint, end: CGPoint) |
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 | |
typealias Localized = String | |
extension Localized { | |
func localize() -> String { | |
return NSLocalizedString(self, comment: "") | |
} | |
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 | |
enum Roboto: String, FontFamily { | |
case thin = "Roboto-Thin" | |
case bold = "Roboto-Bold" | |
case light = "Roboto-Light" | |
case medium = "Roboto-Medium" | |
case regular = "Roboto-Regular" | |
} |
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 | |
extension UIColor { | |
convenience init(hex: Int, alpha: CGFloat? = nil) { | |
self.init(((hex >> 16) & 0xFF), | |
((hex >> 8) & 0xFF), | |
(hex & 0xFF), | |
alpha) | |
} |
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
if [ "${CONFIGURATION}" = "Debug" ]; then | |
TAGS="\/\/ TODO:|\/\/TODO:|\/\/ FIXME:|\/\/FIXME:|\/\/ WARNING:|\/\/WARNING:" | |
echo "searching ${SRCROOT} for ${TAGS}" | |
find "${SRCROOT}" \( -name "*.swift" \) -print0 | xargs -0 egrep --with-filename --line-number --only-matching "($TAGS).*\$" | perl -p -e "s/${TAGS}/ warning: \$1/" | |
fi |
NewerOlder