Skip to content

Instantly share code, notes, and snippets.

View jinto's full-sized avatar

박제권 (Jay Park) jinto

  • Seoul
View GitHub Profile
@jinto
jinto / noti.m
Created January 3, 2012 11:55
자자자... 노티 노티
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
NSLog(@"start ---- jinto");
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
// Override point for customization after application launch.
self.viewController = [[_7P3USZ44YViewController alloc] initWithNibName:@"_7P3USZ44YViewController" bundle:nil];
self.window.rootViewController = self.viewController;
[self.window makeKeyAndVisible];
@jinto
jinto / count_dates_from_birth.m
Created December 30, 2011 17:28
days and hours from birth date
#import <Foundation/Foundation.h>
int main(int argc, const char *argv[])
{
NSString *birthd = @"1971-8-24 09:00:00 +0900";
NSDate *from = [[NSDate alloc] initWithString:birthd];
NSTimeInterval diff = [from timeIntervalSinceNow];
int days = diff / 60 / 60 / 24;
int hours = ((int)diff/60/60) % 24;