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
<?xml version="1.0"?> | |
<root> | |
<item> | |
<name>JIS_YEN to `</name> | |
<identifier>private.remap.childa</identifier> | |
<autogen>--KeyToKey-- KeyCode::JIS_YEN, KeyCode::BACKQUOTE</autogen> | |
</item> | |
</root> |
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
require 'rubygems' | |
require 'httparty' | |
require 'pry' | |
results = [] | |
def get_device_tokens url | |
if url.nil? | |
url = "https://go.urbanairship.com/api/device_tokens/" | |
end | |
options = {:basic_auth => {:username => 'x', :password => 'x'}} |
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
.h | |
@interface TabViewController : UITabBarController | |
.m | |
- (id)initWithCoder:(NSCoder *)aDecoder | |
{ | |
self = [super initWithCoder:aDecoder]; | |
if (self) { |
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
require 'rubygems' | |
require 'httparty' | |
require 'pry' | |
results = [] | |
def get_device_tokens url | |
if url.nil? | |
url = "https://go.urbanairship.com/api/device_tokens/" | |
end | |
options = {:basic_auth => {:username => 'x', :password => 'x'}} |
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 "UIImage+Decompression.h" | |
@implementation UIImage (Decompression) | |
+ (UIImage *)decodedImageWithImage:(UIImage *)image | |
{ | |
CGImageRef imageRef = image.CGImage; | |
// System only supports RGB, set explicitly and prevent context error | |
// if the downloaded image is not the supported format | |
CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); |
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)defineCoreData | |
{ | |
// Complete Core Data stack initialization | |
[managedObjectStore createPersistentStoreCoordinator]; | |
NSDictionary *options = @{ | |
NSMigratePersistentStoresAutomaticallyOption : @YES, | |
NSInferMappingModelAutomaticallyOption : @YES | |
}; | |
NSString *storePath = [RKApplicationDataDirectory() stringByAppendingPathComponent:[self propertyFromPlist:@"Settings" withKey:@"db_name"]]; | |
NSString *seedPath = [[NSBundle mainBundle] pathForResource:@"RKSeedDatabase" ofType:@"sqlite"]; |
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)setupHyseteriaPlayer | |
{ | |
HysteriaPlayer *hysteriaPlayer = [HysteriaPlayer sharedInstance]; | |
[hysteriaPlayer registerHandlerPlayerRateChanged:^{ | |
} CurrentItemChanged:^(AVPlayerItem *item) { | |
} PlayerDidReachEnd:^{ | |
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
@interface PlayingItems : NSObject | |
+ (instancetype)sharedInstance; | |
@property (nonatomic, strong) NSMutableArray *queueItems; | |
@end |
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)getPreviews:(NSString *)itunesAPI | |
{ | |
AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager]; | |
[manager GET:itunesAPI parameters:nil success:^(AFHTTPRequestOperation *operation, id responseObject) { | |
[[HysteriaPlayerManager sharedInstance] setupNewSourceGetter:responseObject]; | |
} failure:nil]; | |
} | |
- (IBAction)PreviewU2:(id)sender |
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
- (IBAction)PreviewU2:(id)sender | |
{ | |
NSString *itunesAPIU2 = @"https://itunes.apple.com/lookup?amgArtistId=5723&entity=song&limit=5&sort=recent"; | |
[self getPreviews:itunesAPIU2]; | |
} | |
- (IBAction)previewJackJohnson:(id)sender | |
{ | |
NSString *itunesAPIJackJohnson = @"https://itunes.apple.com/lookup?amgArtistId=468749&entity=song&limit=5&sort=recent"; |
OlderNewer