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
#!/bin/sh | |
# | |
# Automatically adds branch name and branch description to every commit message. | |
# | |
NAME=$(git branch | grep '*' | sed 's/* //') | |
DESCRIPTION=$(git config branch."$NAME".description) | |
TEXT=$(cat "$1" | sed '/^#.*/d') | |
if [ -n "$TEXT" ] | |
then | |
echo "[$NAME] $TEXT" > "$1" |
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 | |
/// A thread-safe container for mapping a String key to a `CallbackBlock`. A callback-block can be invoked individually or all at once. | |
public struct CallbackDictionary<ResultType> { | |
// MARK: - Initializing | |
public init() {} | |
// MARK: - Public Interface |
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
protocol FirstDependency {} | |
protocol SecondDependency {} | |
protocol ThirdDependency {} | |
protocol HasFirstDependency { | |
var first: FirstDependency { get } | |
} | |
protocol HasSecondDependency { | |
var second: SecondDependency { get } |
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
// | |
// UIScrollView+Extensions.h | |
// | |
// | |
@interface UIScrollView (Extensions) | |
/// Returns true if the content has been scrolled all the way to the top (by pulling the content up). | |
- (BOOL)isScrolledToTop; |
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> | |
@interface NSString (Extensions) | |
+ (NSString *)stringToSha1:(NSString *)str; | |
- (NSNumber*)stringToNSNumber; | |
- (BOOL)isEmpty; | |
- (BOOL)stringContainsSubString:(NSString *)subString; | |
- (NSString *)stringByReplacingStringsFromDictionary:(NSDictionary *)dict; |
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
const unsigned char *ptr = [data bytes]; | |
for(NSUInteger i=0; i<[data length]; ++i) { | |
unsigned char c = *ptr++; | |
NSLog(@"char=%c hex=%x", c, c); | |
} |
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
// !$*UTF8*$! | |
{ | |
archiveVersion = 1; | |
classes = { | |
}; | |
objectVersion = 46; | |
objects = { | |
/* Begin PBXBuildFile section */ | |
0E27D737133B88F700953527 /* CDataScanner.m in Sources */ = {isa = PBXBuildFile; fileRef = 0E27D722133B88F700953527 /* CDataScanner.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; |