Skip to content

Instantly share code, notes, and snippets.

View Pablo-Merino's full-sized avatar
🪛

Pablo Merino Pablo-Merino

🪛
View GitHub Profile
<p id="code">
<span class="if">if</span>(<span class="string">$zad0xsis</span> == <span class="string">$dev</span>) {
<br>&nbsp;&nbsp;<span class="if">return</span> <span class="text">"welcome :D"</span>;
<br> } <span class="if">else</span> { <br>
&nbsp;&nbsp;<span class="if">return</span> <span class="text">"parse error"</span>;
<br> }</p>
<div id="goodimg"><br><p id="title">zad0xsis</p><hr>links</div>
#import <UIKit/UIKit.h>
@interface UIImage (DBMaskedImageAdditions)
- (UIImage *)maskedImageWithMask:(UIImage *)maskImage;
@end
sudo ln -s /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk
@Pablo-Merino
Pablo-Merino / gist:1008859
Created June 5, 2011 10:38
SBScreenFlash.h
/*
* Generated by class-dump 3.3.3 (64 bit).
*
* class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2010 by Steve Nygard.
*/
#import "NSObject.h"
@class UIView, UIWindow;
@Pablo-Merino
Pablo-Merino / gist:1007946
Created June 4, 2011 14:43
multi thread using gcd
dispatch_async( dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
//PUT HERE THE CODE YOU WANT TO RUN IN ANOTHER THREAD
}
dispatch_async( dispatch_get_main_queue(), ^{
//PUT HERE THE BACKGROUND THREAD RESULTS FOR SHOWING THEM ON MAIN APP
});
});
%hook SpringBoard
%class SBStatusBarDataManager
-(void)applicationDidFinishLaunching:(id)application {
id statusBarDataManager = [%c(SBStatusBarDataManager) sharedDataManager];
[statusBarDataManager toggleSimulatesInCallStatusBar];
}
NSString *imageName =[NSString stringWithString:[(Tweet*)[tweets objectAtIndex:indexPath.row] author]];
NSString *userImage =[NSString stringWithString:[(Tweet*)[tweets objectAtIndex:indexPath.row] profileImage]];
NSArray *myArray = [userImage componentsSeparatedByString: @"/"];
NSString *fileName = (NSString*)[myArray lastObject];
NSString *picName =[NSString stringWithFormat:@"%@:%@", imageName, fileName];
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
NSString *dataPath = [documentsDirectory stringByAppendingPathComponent:@"/ProfilePictures"];
NSString* path = [dataPath stringByAppendingPathComponent:picName];
NSString *imageName =[NSString stringWithString:[(Tweet*)[tweets objectAtIndex:indexPath.row] author]];
NSString *userImage =[NSString stringWithString:[(Tweet*)[tweets objectAtIndex:indexPath.row] profileImage]];
NSArray *myArray = [userImage componentsSeparatedByString: @"/"];
NSString *fileName = (NSString*)[myArray lastObject];
NSString *picName =[NSString stringWithFormat:@"%@:%@", imageName, fileName];
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
NSString *dataPath = [documentsDirectory stringByAppendingPathComponent:@"/ProfilePictures"];
NSString* path = [dataPath stringByAppendingPathComponent:picName];