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 "NSDictionary+CleanNSNull.h" | |
@implementation NSDictionary (CleanNSNull) | |
-(NSDictionary *)cleanNull { | |
return [self dictionaryWithValuesForKeys:[[self keysOfEntriesPassingTest:^BOOL(id key, id obj, BOOL *stop) { | |
return ![obj isEqual:[NSNull null]]; | |
}] allObjects]]; | |
} |
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
// | |
// CoreTextLabel.h | |
// Frost | |
// | |
// Created by David Kasper on 10/1/12. | |
// | |
#import <UIKit/UIKit.h> | |
#import <CoreText/CoreText.h> |
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
-(void)testImageUpload { | |
NSString *url = [NSString stringWithFormat:@"/photos/index.json"]; | |
AFHTTPClient *client = [[AFHTTPClient alloc] initWithBaseURL:[NSURL URLWithString:@"http://localhost:3000"]]; | |
NSMutableURLRequest *request = [client multipartFormRequestWithMethod:@"POST" path:url parameters:nil constructingBodyWithBlock:^(id<AFMultipartFormData> formData) { | |
//100 bytes of data | |
NSString *seed = @"iauhsdoifusdoiusfsduyxctzivytcixhudsifnlekjrnjewrbfkuydgvyuqewbemnfdbfsoiddfhdalufhasdlnqeiuqeuwbfux"; | |
NSMutableArray *seeds = [NSMutableArray arrayWithCapacity:654]; | |
for(int i=0; i<653;i++) { | |
[seeds addObject:seed]; |
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
#!/bin/bash | |
# This script assumes that ImageMagick is installed and the convert command is accessible\ | |
# Create copies of all files in directory at 50% size (and names them without @2x) | |
for infile in * | |
do | |
outfile=$(echo $infile | sed -n "s/@2x//p") | |
test -z $outfile && continue | |
convert $infile -resize 50% $outfile | |
done |
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
{ | |
"kind": "Listing", | |
"data": { | |
"modhash": "2tktfpjtv63127d614d282a009ab5fcb3c6d51d1ed002dca03", | |
"children": [ | |
{ | |
"kind": "t3", | |
"data": { | |
"domain": "self.announcements", | |
"banned_by": null, |
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
https://source.unsplash.com/WiztboNPFcY/400x300 | |
https://source.unsplash.com/Bxzrd0p6yOM/400x300 | |
https://source.unsplash.com/B6O-Fc4TIvE/400x300 | |
https://source.unsplash.com/nTTh5UXkHp8/400x300 | |
https://source.unsplash.com/JjDqyWuWZyU/400x300 | |
https://source.unsplash.com/EyeSSqkHIvc/400x300 | |
https://source.unsplash.com/UPapS5-R_rk/400x300 | |
https://source.unsplash.com/4m9j8TrudRs/400x300 | |
https://source.unsplash.com/Glbh-AKaPiw/400x300 | |
https://source.unsplash.com/01_igFr7hd4/400x300 |