I hereby claim:
- I am ishaq on github.
- I am ishaq (https://keybase.io/ishaq) on keybase.
- I have a public key whose fingerprint is 8968 BA0F 9581 CF68 707F 13B8 A192 A810 3511 3085
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
class func daysToNextBirthday(birthdate: NSDate?) -> Int { | |
if (birthdate != nil) { | |
} | |
else { | |
return Int.max | |
} | |
let calender = NSCalendar.currentCalendar() | |
let now = NSDate() | |
let nowComponents = calender.components(NSCalendarUnit.MonthCalendarUnit | NSCalendarUnit.DayCalendarUnit | NSCalendarUnit.YearCalendarUnit, fromDate: now) |
#!/bin/sh | |
if [ -z "$(git status --porcelain)" ]; then | |
echo "Working directory clean, proceding to Archive" | |
exit 0 | |
else | |
echo "error: Working directory dirty, stopping build" | |
exit 1 | |
fi |
+ (NSArray *)getSortedCountryCodes { | |
NSLocale *locale = [NSLocale currentLocale]; | |
NSArray *countryArray = [NSLocale ISOCountryCodes]; | |
NSMutableDictionary *countriesDictionary = [[NSMutableDictionary alloc] initWithCapacity:countryArray.count]; | |
for (NSString *countryCode in countryArray) { | |
NSString *localizedCountryName = [locale displayNameForKey:NSLocaleCountryCode value:countryCode]; | |
countriesDictionary[countryCode] = localizedCountryName; | |
} | |
#import <Foundation/Foundation.h> | |
@interface NSDate (dateByRemovingFractionalSeconds) | |
+ (NSDate *)dateWithoutFractionalSeconds; | |
- (NSDate *)dateByRemovingFractionalSeconds; | |
@end |
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions | |
{ | |
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; | |
UIStoryboard *mainStoryboard = nil; | |
BOOL showLogin = NO; | |
if(showLogin == NO) | |
{ | |
// mainStoryboard method looks like: | |
// return [UIStoryboard storyboardWithName:@"Main" bundle:nil]; |
#import <Foundation/Foundation.h> | |
@interface NSDate (FormattedString) | |
- (NSString *)mi_dateStringWithStyle:(NSDateFormatterStyle)style | |
timeStyle:(NSDateFormatterStyle)timeStyle; | |
- (NSString *)mi_dateStringWithFormat:(NSString *)format; | |
- (NSString *)mi_isoDateString; | |
- (NSString *)mi_ecma262DateString; | |
@end |
#import <Foundation/Foundation.h> | |
/** | |
* this category contains functions that either work on `NSString` or return `NSString`. The category is called <b>Kahaf</b> | |
* because these functions don't exactly fit into any other single category. | |
*/ | |
@interface NSString (Kahaf) | |
/** | |
* Creates and returns a new UUID with RFC 4122 version 4 random bytes. |
#import <Foundation/Foundation.h> | |
@interface KUtils : NSObject | |
+ (NSString *)getVersionInfo; | |
@end |