Skip to content

Instantly share code, notes, and snippets.

View aaronpearce's full-sized avatar

Aaron Pearce aaronpearce

View GitHub Profile
-(NSString *)avatarCreate:(NSString *)username:(NSInteger)num {
NSArray *extensions = [NSArray arrayWithObjects:@".gif", @".gif", @".jpg", @".png", nil];
NSLog(@"%@", num);
num &= 3;
NSLog(@"%@", num);
NSString *extension = [extensions objectAtIndex:num];
if([extension isEqualToString:@""]) {
extension = @".gif";
}
NSString *userurl;
@aaronpearce
aaronpearce / kouiskas log
Created May 21, 2011 23:35
kouiskas log
11:40:31 PM <kouiskas> yes, have been for almost 2 years
11:40:41 PM <Pickley> Cool
11:40:47 PM * Pickley is disliking DiFi a lot so far.
11:41:24 PM <kouiskas> DiFi was never meant for 3rd party use that's why there's no documentation for it
11:41:36 PM <Pickley> Oh we have docs.
11:41:43 PM <Pickley> Just with tiny gaps
11:42:07 PM <Pickley> kouiskas: Is it possible to add into the get_folders call a thing that signifies if a folder is a group or not
11:42:40 PM <Pickley> kouiskas: Until a full API is out, including reading of resources and messages with responses we still have to use DiFi
11:42:47 PM <kouiskas> to DiFi? sorry we're not taking requests for DiFi
11:42:50 PM <kouiskas> the API is separate
@aaronpearce
aaronpearce / gist:973770
Created May 16, 2011 01:39
Regex help?
<span class="tt-w"><span class="shadow" style="background-image:url(http://sh.deviantart.net/shadow/x/150/150/logo3.png);"><a class="thumb" href="http://pasiasty.deviantart.com/art/Emilie-7548-187033952" title="Emilie 7548 by *pasiasty, Nov 22, 2010 in Photography > People & Portraits > Classic Portraits" super_img="http://th08.deviantart.net/fs71/PRE/f/2010/326/e/7/emilie_7548_by_pasiasty-d33csbk.jpg" super_fullimg="http://fc03.deviantart.net/fs71/f/2010/326/e/7/emilie_7548_by_pasiasty-d33csbk.jpg" super_fullw="900" super_fullh="900" super_w="894" super_h="894"><i></i>
WANT THE SRC OUT OF THIS? Regex?
<img class='sq' width="150" height="150" src="http://th03.deviantart.net/fs71/150/f/2010/326/e/7/emilie_7548_by_pasiasty-d33csbk.jpg"></a></span><!-- ^TTT --><!-- TTT$ --></span></div></div>
@aaronpearce
aaronpearce / gist:961147
Created May 8, 2011 05:44
Loggy McLog Log.
Incident Identifier: 4F6F998A-6751-456C-AEDB-85C3DA32F5E5
CrashReporter Key: 374a4d22a0a9d673210f2fc2d012b7842bf8c441
Hardware Model: iPod4,1
Process: Chatter [2626]
Path: /var/mobile/Applications/674F6861-31F4-4C58-AC33-08C0EA44D920/Chatter.app/Chatter
Identifier: Chatter
Version: ??? (???)
Code Type: ARM (Native)
Parent Process: crunchd [1]
Incident Identifier: 4F6F998A-6751-456C-AEDB-85C3DA32F5E5
CrashReporter Key: 374a4d22a0a9d673210f2fc2d012b7842bf8c441
Hardware Model: iPod4,1
Process: Chatter [2626]
Path: /var/mobile/Applications/674F6861-31F4-4C58-AC33-08C0EA44D920/Chatter.app/Chatter
Identifier: Chatter
Version: ??? (???)
Code Type: ARM (Native)
Parent Process: crunchd [1]
@aaronpearce
aaronpearce / Message Center Loader
Created April 25, 2011 22:55
Loader for first message center folders!
- (void) load {
dALogin = [[dAlogin alloc] init];
[dALogin login:@"pickley":@"yaaa...nah"];
theDiFi *difi = [[theDiFi alloc] init];
if([dALogin loggedOn]) {
[difi folderRequest];
NSDictionary *test = [difi folders];
NSLog(@"%@", [[[[[[[[test valueForKey:@"DiFi"] valueForKey:@"response"] valueForKey:@"calls"] valueForKey:@"response"] valueForKey:@"content"] objectAtIndex:0] objectAtIndex:0] valueForKey:@"folderid"]);
}
}
@aaronpearce
aaronpearce / Objective-C Message Folder Grabber
Created April 25, 2011 20:50
Obj-C Message Folder Grabber for deviantART
// inboxId is retrieved before hand.
int maxItems = 20;
NSString *queryString = [NSString stringWithFormat:@"?
c[]=MessageCenter;get_views;%@,oq:fb_comments:0:%@:f&
c[]=MessageCenter;get_views;%@,oq:fb_replies:0:%@:f&
c[]=MessageCenter;get_views;%@,oq:notes_unread:0:%@:f&
c[]=MessageCenter;get_views;%@,oq:notices:0:%@:f&
c[]=MessageCenter;get_views;%@,oq:contests:0:%@:f&
c[]=MessageCenter;get_views;%@,oq:fb_activity:0:%@:f&
c[]=MessageCenter;get_views;%@,oq:correspondence:0:%@:f&