This file contains hidden or 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
//Credit: https://stackoverflow.com/questions/1793882/how-to-make-a-macro-that-can-take-a-string | |
#define STRINGIFY2(x) #x | |
#define STRINGIFY(x) STRINGIFY2(x) | |
#define PASTE2(a, b) a##b | |
#define PASTE(a, b) PASTE2(a, b) | |
#define PRINTTHIS(text) \ | |
NSLog(PASTE(@, STRINGIFY(text))); | |
//Result |
This file contains hidden or 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
BOOL foo = YES; | |
id a = @(foo); | |
//className: __NSCFBoolean | |
id b = @(YES); | |
//className: __NSCFBoolean | |
id c = foo ? @(YES) : @(NO); | |
//className: __NSCFBoolean |
This file contains hidden or 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
#define __line_break_string__(s) #s | |
NSString *str = @__line_break_string__( | |
foo | |
bar | |
hello\nworld | |
); | |
#undef __line_break_string__ | |
/* | |
foo bar hello |
This file contains hidden or 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
#!/bin/bash | |
#name: idevicesyslog target filter shell script | |
#author: SerKo <https://github.com/serkoape> | |
#usage: idevicesyslog | ./idsl-filter.sh "<target name>" | |
#idevicesyslog | ./idsl-filter.sh "SpringBoard" | |
#idevicesyslog | ./idsl-filter.sh "SpringBoard(Custom.dylib)" | |
#idevicesyslog | sudo sh ./idsl-filter.sh "SpringBoard(Custom.dylib)" |