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
| <?php | |
| // db.createCollection("logCollection", {capped:true, size:100000}) | |
| $mongo = new Mongo(); | |
| $db = $mongo->selectDB('logging'); | |
| $collection = $db->selectCollection('logCollection'); | |
| $cursor = $collection->find()->tailable(true); | |
| while (true) { | |
| if ($cursor->hasNext()) { |
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
| <?php | |
| class Zircote_Json_Hal_Link | |
| { | |
| /** | |
| * | |
| * @var string | |
| */ | |
| protected $_rel; |
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
| <?php | |
| /** | |
| * | |
| * | |
| * @author Robert Allen <zircote@gmail.com> | |
| * @package Zircote | |
| * @subpackage SimpleXMLElement | |
| * | |
| * | |
| */ |
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
| <?php | |
| $closure = function(){ | |
| $mongo = new MongoDB(new Mongo(), 'ibp_oauth'); | |
| return (bool) $mongo->selectCollection('nonce')->findOne( | |
| array( | |
| 'consumer_key' => '988e5a4582374786de12f5254b4b12b6', | |
| 'access_key' => '4bcf3f8a517e39c65f74883b4b0e5b78', | |
| 'timestamp' => 1329412801 | |
| ) | |
| ); |
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
| <?php | |
| /** | |
| * @var string | |
| * OAuth RSA-SHA1 signature method. | |
| */ | |
| define('OAUTH_SIG_METHOD_RSASHA1'); | |
| /** | |
| * OAuth HMAC-SHA1 signature method. | |
| * | |
| * @var string |
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
| <?php | |
| /** | |
| * | |
| * | |
| * @author Robert Allen <zircote@zircote.com> | |
| * @package ZfApiVersion | |
| * @subpackage | |
| * | |
| * | |
| */ |
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
| <?php | |
| // 205 | |
| // Map PUT and POST to actual create/update actions | |
| // based on parameter count (posting to resource or collection) | |
| switch( $values[$this->_actionKey] ){ | |
| case 'post': | |
| if ($pathElementCount > 0) { | |
| $values[$this->_actionKey] = 'put'; |
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
| <?php | |
| /** | |
| * @var string | |
| * OAuth RSA-SHA1 signature method. | |
| */ | |
| define('OAUTH_SIG_METHOD_RSASHA1'); | |
| /** | |
| * OAuth HMAC-SHA1 signature method. | |
| * | |
| * @var string |
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
| <?php | |
| require_once 'AWSSDKforPHP/sdk.class.php'; | |
| require_once 'AWSSDKforPHP/services/dynamodb.class.php'; | |
| $dynamodb = new AmazonDynamoDB( | |
| array( | |
| 'certificate_authority' => true, | |
| 'default_cache_config' => '/tmp', | |
| 'key' => '', |
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" : 30001, "STOP_ID" : 30001, "DIRECTION_ID" : "E", "STOP_NAME" : "Austin (O'Hare-bound)", "STATION_NAME" : "Austin", "MAP_ID" : 40010, "ADA" : 0, "RED" : 0, "BLUE" : 1, "G" : 0, "BRN" : 0, "P" : 0, "Pexp" : 0, "Y" : 0, "Pnk" : 0, "O" : 0, "loc" : [ -87.77681200000001, 41.870851 ] } | |
| { "_id" : 30002, "STOP_ID" : 30002, "DIRECTION_ID" : "W", "STOP_NAME" : "Austin (Forest Pk-bound)", "STATION_NAME" : "Austin", "MAP_ID" : 40010, "ADA" : 0, "RED" : 0, "BLUE" : 1, "G" : 0, "BRN" : 0, "P" : 0, "Pexp" : 0, "Y" : 0, "Pnk" : 0, "O" : 0, "loc" : [ -87.77681200000001, 41.870851 ] } | |
| { "_id" : 30003, "STOP_ID" : 30003, "DIRECTION_ID" : "E", "STOP_NAME" : "Harlem (63rd-bound)", "STATION_NAME" : "Harlem/Lake", "MAP_ID" : 40020, "ADA" : 0, "RED" : 0, "BLUE" : 0, "G" : 1, "BRN" : 0, "P" : 0, "Pexp" : 0, "Y" : 0, "Pnk" : 0, "O" : 0, "loc" : [ -87.80317599999999, 41.886848 ] } | |
| { "_id" : 30004, "STOP_ID" : 30004, "DIRECTION_ID" : "W", "STOP_NAME" : "Harlem (Terminal arrival)", "STATION_NAME" : "Harlem/Lake", "MAP_ID" : 4002 |