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
[color] | |
ui = true | |
branch = auto | |
diff = auto | |
status = auto | |
interactive = auto | |
[color "branch"] | |
current = yellow bold | |
local = green bold | |
remote = red bold |
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
CLEAR = "\033[0m" | |
BOLD = "\033[1m" | |
BLACK = "\033[30m" | |
GREEN = "\033[32m" | |
RED = "\033[31m" | |
YELLOW = "\033[33m" | |
BLUE = "\033[34m" | |
MAGENTA = "\033[35m" | |
CYAN = "\033[36m" | |
WHITE = "\033[37m" |
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
using System; | |
using System.Threading; | |
using NUnit.Framework; | |
namespace Tests | |
{ | |
class RetryManager | |
{ | |
public void AttemptToRetryUntilTrue(Func<bool> condition, int timeoutMilliseconds = 5000, int delayMiliseconds = 100) | |
{ |
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
// | |
// UIView+Parallax.h | |
// | |
#import <Foundation/Foundation.h> | |
@interface UIView (Parallax) | |
-(void)addBackgroundParallax:(CGFloat)strength; | |
-(void)addForegroundParallax:(CGFloat)strength; | |
-(void)removeParallax; |
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
/* | |
File: UIImage+ImageEffects.h | |
Abstract: This is a category of UIImage that adds methods to apply blur and tint effects to an image. This is the code you’ll want to look out to find out how to use vImage to efficiently calculate a blur. | |
Version: 1.0 | |
Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple | |
Inc. ("Apple") in consideration of your agreement to the following | |
terms, and your use, installation, modification or redistribution of | |
this Apple software constitutes acceptance of these terms. If you do | |
not agree with these terms, please do not use, install, modify or |
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
#ifdef DEBUG | |
#define DLog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__); | |
#else | |
#define DLog(...) | |
#define NSLog(...) | |
#endif | |
#define IS_PAD (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad ? YES : NO) | |
#define IS_PHONE !IS_PAD |
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
internal extension Dictionary | |
{ | |
internal func get<V>(key:Key) -> V? { | |
return self.indexForKey(key) as? V | |
} | |
} |
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
//.h | |
@interface TabBarHidingCollectionViewController : UICollectionViewController | |
@end | |
//.m | |
@interface TabBarHidingCollectionViewController () | |
@property (nonatomic) CGFloat lastOffsetY; | |
@end | |
@implementation TabBarHidingCollectionViewController |
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
//Objective-c | |
//HEADER | |
#import <Foundation/Foundation.h> | |
@interface UpgradeHelper : NSObject | |
+(BOOL)isUpgradeAvailable:(NSString*)localVersion releasedVersion:(NSString*)releasedVersion; | |
@end | |
//IMPLEMENTATION | |
#import "UpgradeHelper.h" |
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 | |
func find4Largest(numbers:[Int]) -> [Int] | |
{ | |
let count = 4 | |
assert(count < numbers.count, "Error: numbers must have at least \(count) elements") | |
if numbers.count < 2 | |
{ | |
return numbers | |
} |
OlderNewer