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
<?php | |
date_default_timezone_set('America/Los_Angeles'); | |
require_once 'Predict.php'; | |
require_once 'Predict.php'; | |
require_once 'Predict/Sat.php'; | |
require_once 'Predict/QTH.php'; | |
require_once 'Predict/Time.php'; | |
require_once 'Predict/TLE.php'; |
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
<?php | |
$producer = new EC_Producer(); | |
$producer->addJob('hello_world', 'HelloWorld', array('foo' => 'bar')); | |
?> |
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/consumer_cli.php -e development -s 127.0.0.1:22133 -q hello_world -d -m 2 | |
Nothing on queue enterprise_hello_world | |
Nothing on queue enterprise_hello_world | |
Nothing on queue enterprise_hello_world | |
Nothing on queue enterprise_hello_world | |
Running EC_Job_HelloWorld on instance dev under environment development | |
Hello, world! Here is my data array: | |
stdClass Object | |
( | |
[foo] => bar |
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
<?php | |
/** | |
* Enterprise queue consumer interface, called by bin/consumer_cli.php | |
* | |
* @author Bill Shupp <hostmaster@shupp.org> | |
* @copyright 2010-2011 Empower Campaigns | |
*/ | |
class EC_Consumer | |
{ |
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
<?php | |
/** | |
* A thin kestrel client that wraps Memcached (libmemcached extension) | |
* | |
* @author Bill Shupp <hostmaster@shupp.org> | |
* @copyright 2010-2011 Empower Campaigns | |
*/ | |
class EC_KestrelClient | |
{ | |
/** |
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
<?php | |
/** | |
* Interface for adding jobs to a queue server | |
* | |
* @author Bill Shupp <hostmaster@shupp.org> | |
* @copyright 2010-2011 Empower Campaigns | |
*/ | |
class EC_Producer | |
{ | |
/** |
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/env php | |
<?php | |
// External application bootstrapping | |
require_once __DIR__ . '/cli_init.php'; | |
// Instantiate and run the consumer | |
$consumer = new EC_Consumer($argv); | |
$consumer->run(); |
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
<?php | |
class Zend_View_Helper_MediaURL extends Zend_View_Helper_Abstract | |
{ | |
/** | |
* Retrieves the full URL for a static media element, based on the path | |
* | |
* @param string $path The path of the file, including the '/' prefix | |
* | |
* @return string | |
*/ |
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
<link rel="stylesheet" type="text/css" href="<?php echo $this->mediaURL('/css/core-style.css') ?>"> |
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
RewriteEngine On | |
RewriteRule ^v/([0-9a-fA-F]{8})/(js|css|img)/(.*)$ /$2/$3 [NC,L] |
NewerOlder