Skip to content

Instantly share code, notes, and snippets.

View MoathOthman's full-sized avatar
🎯
Focusing

Moath othman MoathOthman

🎯
Focusing
View GitHub Profile
@MoathOthman
MoathOthman / gist:b3cef77057028e4c2e70
Created March 3, 2015 07:18
Convert from p12 to PEM Terminal
openssl pkcs12 -in Certificatesdev.p12 -out Certificatesdev.pem -nodes -clcerts
@MoathOthman
MoathOthman / gist:8690ccefa3d6b19b3790
Created March 3, 2015 07:16
Register for push notifications - objc
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0)
{ [[UIApplication sharedApplication] registerUserNotificationSettings:
[UIUserNotificationSettings settingsForTypes:
(UIUserNotificationTypeSound |
UIUserNotificationTypeAlert |
UIUserNotificationTypeBadge) categories:nil]];
[[UIApplication sharedApplication] registerForRemoteNotifications];
}
else
@MoathOthman
MoathOthman / gist:a2164c62ac596f81c567
Created March 3, 2015 07:15
Path to app directory in simulator on OSX Yosemite
NSLog(@"app dir: %@",[[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] lastObject]);