- Power issues, do an SMC reset. Display resolution, sound or startup disk issues, do a PRAM reset.
- Apple Menu > Shut Down
- Shift + Ctrl + Opt (left side) & Power button at the same time. Hold for 10 seconds.
- Release all keys
- Power on your Mac
| - (UIViewController *)topViewController{ | |
| return [self topViewController:[UIApplication sharedApplication].keyWindow.rootViewController]; | |
| } | |
| - (UIViewController *)topViewController:(UIViewController *)rootViewController | |
| { | |
| if (rootViewController.presentedViewController == nil) { | |
| return rootViewController; | |
| } | |
| #!/bin/bash | |
| yum -y install gcc make glib2-devel libcurl-devel openssl-devel gmp-devel tar automake autoconf libtool wget asciidoc | |
| wget https://megatools.megous.com/builds/megatools-1.10.0-rc1.tar.gz | |
| tar -xzvf megatools*.tar.gz | |
| cd megatools* | |
| ./configure | |
| make | |
| make install | |
| # megadl 'https://mega.nz/#xxxxxxxxxxx!' |
| //**************************************************// | |
| //**This Header File is used in combination********// | |
| //**with a dynamic Library and must be rewritten**// | |
| //**if you want to use it for another purpose****// | |
| //**********************************************// | |
| //******************************************// | |
| //**Credits: HackJack & Razzile(Kamizoom)**// | |
| //****************************************// |
| <?php | |
| function string2ByteArray($string) { | |
| return unpack('C*', $string); | |
| } | |
| function byteArray2String($byteArray) { | |
| $chars = array_map("chr", $byteArray); | |
| return join($chars); | |
| } |
| @protocol AutoHook <NSObject> | |
| @required | |
| + (NSArray <NSString *> *)targetClasses; | |
| @end |
| # Assumes an Apple-like layout: leaf --> issuer --> CA in exactly 3 certs | |
| # The last arg to codesign specifies the code to check, by bundle or executable path, or process ID | |
| codesign -d -vv --extract-certificates=cert I-didnt-edit-my-config-file | |
| for i in 0 1 2 ; do openssl x509 -inform der -in cert${i} -out cert${i}.pem ; done | |
| openssl ocsp -CAfile cert2.pem -issuer cert1.pem -cert cert0.pem -url $(openssl x509 -in cert0.pem -ocsp_uri -noout) | |
| Example: | |
| ╭─ andre@flux ~ |
| <?php | |
| // Converts a number into a short version, eg: 1000 -> 1k | |
| // Based on: http://stackoverflow.com/a/4371114 | |
| function number_format_short( $n, $precision = 1 ) { | |
| if ($n < 900) { | |
| // 0 - 900 | |
| $n_format = number_format($n, $precision); | |
| $suffix = ''; | |
| } else if ($n < 900000) { |
| // Compile with: | |
| // clang catchredir.m -o catchredir -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/ -miphoneos-version-min=7 -framework Foundation | |
| #import <Foundation/Foundation.h> | |
| #import <stdio.h> | |
| #import <objc/runtime.h> | |
| @interface UrlConnection : NSObject | |
| @property (strong) NSString *url; | |
| - (void)connect; | |
| @end |
| +(int)compareOneDay:(NSDate *)oneDay withAnotherDay:(NSDate *)anotherDay | |
| { | |
| NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; | |
| [dateFormatter setDateFormat:@"dd-MM-yyyy"]; | |
| NSString *oneDayStr = [dateFormatter stringFromDate:oneDay]; | |
| NSString *anotherDayStr = [dateFormatter stringFromDate:anotherDay]; | |
| NSDate *dateA = [dateFormatter dateFromString:oneDayStr]; | |
| NSDate *dateB = [dateFormatter dateFromString:anotherDayStr]; | |
| NSComparisonResult result = [dateA compare:dateB]; | |
| NSLog(@"date1 : %@, date2 : %@", oneDay, anotherDay); |