Works in Mikrob which is deployed both to Titanium Desktop and as a Chrome Application.
This code was extracted from my own code and a wrapper library which I'm working on.
Any questions? Post them in comments.
Here's where everything happens:
| #!/usr/bin/env python | |
| """ | |
| A script to query the Amazon Web Services usage reports programmatically. | |
| Ideally this wouldn't exist, and Amazon would provide an API we can use | |
| instead, but hey - that's life. | |
| Basically takes your AWS account username and password, logs into the | |
| website as you, and grabs the data out. Always gets the 'All Usage Types' |
| .DS_Store | |
| *.swp | |
| *~.nib | |
| build/ | |
| *.pbxuser | |
| *.perspective | |
| *.perspectivev3 |
| <?php session_start(); | |
| define('OAUTH_CONSUMER_KEY', ''); | |
| define('OAUTH_CONSUMER_SECRET', ''); | |
| define('OAUTH_REQUEST_URL', 'https://api.twitter.com/oauth/request_token'); | |
| define('OAUTH_ACCESS_URL', 'https://api.twitter.com/oauth/access_token'); | |
| define('OAUTH_AUTHORISE_URL', 'https://api.twitter.com/oauth/authorize'); | |
| define('API_URL','http://api.twitter.com/1/'); |
| #import <Foundation/Foundation.h> | |
| #import "Item.h" // Core Data MO | |
| // Synchronous parser ! Will lock thread ! | |
| @interface ItemParser : NSObject <NSXMLParserDelegate> | |
| @property (nonatomic, retain) NSManagedObjectContext *managedObjectContext; // MOC for newly created MO | |
| @property (nonatomic, retain) Item *currentItem; |
Works in Mikrob which is deployed both to Titanium Desktop and as a Chrome Application.
This code was extracted from my own code and a wrapper library which I'm working on.
Any questions? Post them in comments.
Here's where everything happens:
| <?php | |
| class BootstrapFormHelper extends AppHelper { | |
| public $helpers = array('Html', 'Form'); | |
| public function input($name, $options = array()) { | |
| $default = array( | |
| 'type' => null, | |
| 'label' => null, | |
| 'before' => null, // to convert .input-prepend |
Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
This gist assumes:
| @implementation NSURLConnection (Timeout) | |
| + (dispatch_queue_t)timeoutLockQueue { | |
| static dispatch_queue_t queue; | |
| static dispatch_once_t onceToken; | |
| dispatch_once(&onceToken, ^{ | |
| queue = dispatch_queue_create("timeout lock queue", DISPATCH_QUEUE_SERIAL); | |
| }); | |
| return queue; | |
| } |
##Given Apache 2 and MySQL are already installed.
#Update MacPorts sudo port selfupdate;sudo port -u upgrade outdated
#Install PHP 5.4.* sudo port install php54 php54-apache2handler ##Activate Apache Module cd /opt/local/apache2/modules