This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int main(int argc, char *argv[]) | |
{ | |
@autoreleasepool { | |
CFMessagePortCreateLocal(NULL, (CFStringRef) @"PurpleWorkspacePort", NULL, NULL, NULL); | |
return UIApplicationMain(argc, argv, nil, @"GHUnitIOSAppDelegate"); | |
} | |
} | |
@implementation UIWindow (Private) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [ "${CONFIGURATION}" = "Release" ]; then | |
echo Do something really release-like | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl http://ifconfig.me | |
curl http://ifconfig.me/ip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <sys/sysctl.h> | |
- (NSArray *)runningProcesses { | |
int mib[4] = {CTL_KERN, KERN_PROC, KERN_PROC_ALL, 0}; | |
size_t miblen = 4; | |
size_t size; | |
int st = sysctl(mib, miblen, NULL, &size, NULL, 0); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <unistd.h> | |
#include <stdlib.h> | |
int main(int argc, char **argv) | |
{ | |
if (argc <= 1) | |
usleep(1); | |
else | |
usleep(atol(argv[1])); | |
return 0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[[UIApplication sharedApplication] performSelector:@selector(_performMemoryWarning)]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int main (int argc, const char * argv[]) { | |
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; | |
NSString *err = nil; | |
NSData *plist; | |
NSDictionary *dict; | |
char *payload = "This is the payload"; | |
dict = [NSDictionary dictionaryWithObjectsAndKeys: | |
@"Hello world", @"greeting", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// main.m | |
// Insects | |
// | |
// | |
#import <UIKit/UIKit.h> | |
#pragma mark - ViewController |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma D option quiet | |
self int level; | |
objc$target:::entry | |
{ | |
printf("%*s[tid=%lld][%s %s]\n", | |
self->level * 2, " ->", | |
(long long)tid, probemod, probefunc); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "NSString+Unicode.h" | |
@implementation NSString (Unicode) | |
- (NSUInteger)utf8mb4length { | |
const char *bytes= [self UTF8String]; | |
unsigned int length = [self lengthOfBytesUsingEncoding:NSUTF8StringEncoding]; | |
unsigned int calc = 0; | |
for (int i=0; i<length; i++) { |