This file contains hidden or 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
| + (id)sharedInstance | |
| { | |
| static dispatch_once_t once; | |
| static id instance; | |
| dispatch_once(&once, ^{ | |
| instance = self.new; | |
| }); | |
| return instance; | |
| } |
This file contains hidden or 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)playAudioStreamingInBacgkroundMode { | |
| // set audio session for background music | |
| [[UIApplication sharedApplication] beginReceivingRemoteControlEvents]; | |
| AVAudioSession *audioSession = [AVAudioSession sharedInstance]; | |
| NSError *setCategoryError = nil; | |
| BOOL success = [audioSession setCategory:AVAudioSessionCategoryPlayback error:&setCategoryError]; | |
| if (success) { | |
| NSError *activationError = nil; |
This file contains hidden or 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
| // 1. Before create a HTML file named mywidget.html and with content : | |
| // <html> | |
| // <head> | |
| // <title></title> | |
| // <script src="http://platform.twitter.com/widgets.js"> </script> | |
| // </head> | |
| // <body> | |
| // <a class="twitter-timeline" height="%i" href="https://mobile.twitter.com/DaniloPriore" data-widget id="318522515175645184" data-chrome="noheader nofooter transparent" data-border-color="#cc0000" style="display:none"> </a> | |
| // </body> | |
| //</html> |
This file contains hidden or 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
| - (NSString*)removeUnusedCharacters:(NSString*)input | |
| { | |
| NSCharacterSet *doNotWant = [NSCharacterSet characterSetWithCharactersInString:@"ÀÁÂÃÄâãäàÈÉÊËêëÌÍÎÏîïíÒÓÔÕÖôõöóÙÚÛÜûüùÝýñ\\|!\"£$%&/=?^+*°#§;:_`«“‘¥~‹÷´`≠¡ˆ„Ω€®™æ¨œøπ[]åß∂ƒ∞∆ªº¬@¶≤≥<>∑†©√∫˜µ…•–◊{}±¿≈⁄›‰¢’”»ı³"]; | |
| return [[[input componentsSeparatedByCharactersInSet: doNotWant] componentsJoinedByString: @""] stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]]; | |
| } |
This file contains hidden or 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
| How do I sync files between computers ? (WIN, MAC, LINUX) | |
| Syncing your files between all of your computers, smartphones, and tablets is what Dropbox is all about. All you have to do is install the Dropbox desktop application and sign in using the same login. | |
| If you've already installed Dropbox, simply adding files to your Dropbox folder will automatically sync the file to your Dropbox, which means you can open it from any other computer, smartphone, or tablet that also has Dropbox installed. | |
| If you'd rather sync some files with other people on other Dropbox accounts, that's easy too; just create a shared folder instead. | |
| Install the Dropbox app from http://db.tt/XLEtgM7 |
This file contains hidden or 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)webViewHideBackgroundAndScrollBar:(UIWebView*)theView { | |
| theView.opaque = NO; | |
| theView.backgroundColor = [UIColor clearColor]; | |
| for(UIView *view in theView.subviews) { | |
| if ([view isKindOfClass:[UIImageView class]]) { | |
| // to transparent | |
| [view removeFromSuperview]; | |
| } | |
This file contains hidden or 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
| // With MYZazzleStore service it's really simple to add a gift shop to your application for your users. | |
| // With a few lines of code you can give your users the opportunity to purchase T-shirts personalized | |
| // mugs, iphone / ipad covers and other types of gifts. It also allows you to increase financial gains | |
| // and increase the popularity of your products. | |
| // | |
| // Is really very simple to add to your application a gift shop to offer your users. | |
| // With few lines of code you can give your users the opportunity to purchase T-shirts personalized | |
| // mugs, iphone / ipad cover and other types of gifts, also allowing you to add a further financial | |
| // gain and increasing the popularity of your products. | |
| // |
This file contains hidden or 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
| // | |
| // Created by Danilo Priore on 20/02/13. | |
| // www.prioregroup.com | |
| // | |
| // CCLayer+GoogleAnalytics.h | |
| #import "CCLayer.h" | |
| @interface CCLayer (GoogleAnalytics) | |
| @end |
This file contains hidden or 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
| // How to fix GameCenter Leaderboard in Landscape mode | |
| // with Cocos2d v.2.0 and iOS6. | |
| // | |
| // Author: Danilo Priore | |
| // http://www.prioregroup.com | |
| // | |
| // 1. Create a personalized UINavigationController | |
| // | |
| // GameNavigationController.h | |
| @interface GameNavigationController : UINavigationController |
This file contains hidden or 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
| // updated: 03-04-2013 | |
| // | |
| using System.Web; | |
| public static class Mashape // www.mashape.com/priore | |
| { | |
| private static string[] VALID_MASHAPE_ADDR = new string[] { "23.21.64.131", "23.21.68.63", "23.23.86.71", "23.23.87.232", "23.23.103.203", "23.23.103.204", "23.23.103.207", "23.23.103.212", "23.23.103.218", "50.17.255.165" }; | |
| public static bool IsValidSecretCode(string secret_code) |