Private key:
  openssl ecparam -name secp256k1 -genkey -noout -out sample-priv-key.pemPublic key (from private key):
  openssl ec -in sample-priv-key.pem -pubout > sample-pub-key.pem| adb shell input [text|keyevent] | |
| usage: | |
| input text <string> | |
| input keyevent <event_code> | |
| event_code: | |
| 0 --> "KEYCODE_UNKNOWN" | |
| 1 --> "KEYCODE_MENU" | |
| 2 --> "KEYCODE_SOFT_RIGHT" | |
| 3 --> "KEYCODE_HOME" | 
| # Convert p12 to pem | |
| openssl pkcs12 -in cert.p12 -out apple_push_notification.pem -nodes -clcerts | 
| // Remove iOS magic transalations :/ | |
| myView.translatesAutoresizingMaskIntoConstraints = false | 
| # Before pipe: extract lines between 2 patterns | |
| # After pipe: `NR` select the line number to print | |
| awk '/CFBundleVersion/ {p=1}; p; /string/ {p=0};' ../Project/Ressources/Info.plist | awk -F "[><]" 'NR==2 {print $3}' | 
| //http://commandlinemac.blogspot.fr/2008/12/installing-dmg-application-from-command.html | |
| hdiutil mount jdk.dmg | |
| sudo installer -pkg /Volumes/JDK\ 7\ Update\ 60/JDK\ 7\ Update\ 60.pkg -dominfo | |
| sudo installer -pkg /Volumes/JDK\ 7\ Update\ 60/JDK\ 7\ Update\ 60.pkg -target the_chosen_domain | |
| hdiutil unmount "/Volumes/Chicken of the VNC/" | 
| @implementation XCTestCase(CoreData) | |
| + (id)fakeEntityForTests:(Class)clazz { | |
| NSEntityDescription *entityDesc = [NSEntityDescription entityForName:NSStringFromClass(clazz) | |
| inManagedObjectContext:[[self class] managedObjectContextForTests]]; | |
| return [[clazz alloc] initWithEntity:entityDesc | |
| insertIntoManagedObjectContext:[[self class] managedObjectContextForTests]]; | |
| } | |
| + (NSManagedObjectContext *)managedObjectContextForTests { | 
| static const NUInteger kFrequency = 15; //seconds | |
| dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0); | |
| self.timer = dispatch_source_create(DISPATCH_SOURCE_TYPE_TIMER, 0, 0, queue); | |
| if (self.timer) { | |
| dispatch_source_set_timer(self.timer, | |
| dispatch_time(DISPATCH_TIME_NOW, LMConversationHelperPollingFrequency * NSEC_PER_SEC), | |
| kFrequency * NSEC_PER_SEC, | |
| (1ull * NSEC_PER_SEC) / 10); | |
| __weak id weakSelf = self; | 
| openssl base64 -in image.jpg -out file.txt |