Skip to content

Instantly share code, notes, and snippets.

Scott Marnik n00neimp0rtant

Block or report user

Report or block n00neimp0rtant

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
n00neimp0rtant / gist:27829d87118d984232a4
Last active May 24, 2019
UIVisualEffectView blur radius manipulation (new for iOS 9)
View gist:27829d87118d984232a4
// iOS 9 allows you to animate between visual effects, which gives you the
// ability to manipulate the blur radius. this can be useful for animating
// a backdrop for a custom modal, and with a few tricks, can even be set
// indirectly, allowing you to "scrub" between them back and forth with
// a gesture, just like when you pull down Spotlight.
// these are the two effects you want to transition between
UIVisualEffect *startEffect = nil; // "nil" means no blur/tint/vibrancy (plain, fully-transparent view)
UIVisualEffect *endEffect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleLight];
n00neimp0rtant / gist:9515611
Last active Nov 14, 2019
simple squash without rebase
View gist:9515611
## within current branch, squashes all commits that are ahead of master down into one
## useful if you merged with upstream in the middle of your commits (rebase could get very ugly if this is the case)
## commit any working changes on branch "mybranchname", then...
git checkout master
git checkout -b mybranchname_temp
git merge --squash mybranchname
git commit -am "Message describing all squashed commits"
git branch -m mybranchname mybranchname_unsquashed
git branch -m mybranchname
n00neimp0rtant / gist:8546721
Last active Jan 4, 2016
this is untested and might not even compile. if that's the case tell me whats wrong with it and i'll fix
View gist:8546721
// declaring the function pointer
int *(*cool_function_pointer)(int, char, float);
// ^ ^ ^ ^
// function's retval function parameters
// getting a pointer to the function
*(void **)(&cool_function_pointer) = dlsym(RTLD_DEFAULT, "cool_function_name");
// ^ ^ ^
// always void means "get func from hooked process" name of function in the binary (should appear as string in dasm)
View gist:8403581
static NSString *test;
%hook SpringBoard
-(id)init {
id obj = %orig;
test = @"i'm from springboard";
return obj;
n00neimp0rtant / gist:2278942
Created Apr 1, 2012
user installed app directories
View gist:2278942
static NSString* pathForUserApplicationWithIdentifier(NSString* bundleIdentifier)
NSFileManager* manager = [[[NSFileManager alloc] init] autorelease];
NSArray* paths = [manager subpathsOfDirectoryAtPath:@"/var/mobile/Applications" error:nil];
for(NSString* path in paths)
NSDictionary* metadata = [NSDictionary dictionaryWithContentsOfFile:[NSString stringWithFormat:@"%@/iTunesMetadata.plist]];
NSString* candidateID = [metadata objectForKey:@"softareVersionBundleId"];
if([candidateID isEqualToString:bundleIdentifier])
return path;
n00neimp0rtant / gist:2170717
Created Mar 23, 2012
detect a cracked app
View gist:2170717
BOOL cracked = NO;
NSString* bundlePath = [[NSBundle mainBundle] bundlePath];
NSString* resourcePath = [[NSBundle mainBundle] resourcePath];
NSFileManager* fileManager = [NSFileManager defaultManager];
NSDictionary* iTunesMetadata = [NSDictionary dictionaryWithContentsOfFile:[NSString stringWithFormat:@"%@/iTunesMetadata.plist", bundlePath]];
if([(NSString*)[iTunesMetadata objectForKey:@"appleId"] isEqualToString:@""])
You can’t perform that action at this time.