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 | |
| /* Core Classes */ | |
| class Mongo | |
| { | |
| /** | |
| * | |
| * | |
| * @var string | |
| */ | |
| const VERSION = ''; |
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 ErrorController extends Zend_Controller_Action | |
| { | |
| /** | |
| * @aclRole annonymous | |
| * @aclRole admin | |
| */ | |
| public function errorAction() | |
| { | |
| } |
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
| #!/bin/sh | |
| EC2_INSTANCE_ID=`curl -s http://169.254.169.254/latest/meta-data/instance-id` | |
| EC2_AVAIL_ZONE=`curl -s http://169.254.169.254/latest/meta-data/placement/availability-zone` | |
| EC2_REGION="`echo \"$EC2_AVAIL_ZONE\" | sed -e 's:\([0-9][0-9]*\)[a-z]*\$:\\1:'`" | |
| EBS_SIZE=256 | |
| for x in {1..8}; do \ | |
| ec2-create-volume -s $EBS_SIZE -z $EC2_AVAIL_ZONE ; \ | |
| done > /tmp/vols.txt |
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
| ssh-keygen -y -f private_key1.pem > public_key1.pub |
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 'Zend/Service/Abstract.php'; | |
| require_once 'Zend/Json.php'; | |
| /** | |
| * A PHP CometD Publisher | |
| * @author zircote / Robert Allen | |
| * Publishing: | |
| * <code> | |
| * $bayuex = new Bayuex('http://localhost:8080'); | |
| * $i = 0; |
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 | |
| $prowl = array( | |
| 'apikey' => '072a7159e...e36ebe57', | |
| // 'apikey' => array('072a7159e...e36ebe57','072a7159e...e36ebe57','072a7159e...e36ebe57'), //for multi-keys | |
| 'priority' => Skulk_Client_Message::PRIORITY_EMERGENCY, // optional | |
| 'url' => 'http://www.zircote.com/admin/console', // optional url to forward the user to. | |
| 'event' => 'Error logging via Prowl with Zend_Log', // optional Your message header | |
| // 'providerkey' => '072a7159e9e8f......e7765cd11c229e36ebe57' // optional | |
| ); |
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 'Zend/Acl/Assert/Interface.php'; | |
| /** | |
| * | |
| * Assert the REMOTE_ADDR of the reqeust is from a private IP address | |
| * @author zircote | |
| * | |
| */ | |
| class PrivateIPAssertion implements Zend_Acl_Assert_Interface | |
| { |
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 | |
| /** | |
| * | |
| * This could be a mechanism that builds acl lists from the database or file | |
| * based storage. | |
| * @author zircote | |
| * | |
| */ | |
| class Model_BugsServiceAcl | |
| { |
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 Api extends Zend_Http_Client | |
| { | |
| /** | |
| * | |
| * @group Account | |
| */ | |
| public function accountStatus() | |
| { |
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 | |
| $options = array('namespace' => 'WorkerProcess_', | |
| 'servers' => array(array('host' => '127.0.0.1', 'port' => 6380))); | |
| /* el Jeffe */ | |
| $redis = new Rediska($options); | |
| while (true) { | |
| $first_url = $redis->popFromListBlocking(SRC_QUEUE, 0, SRC_QUEUE); | |
| if($first_url){ | |
| $redis->appendToList(WORK_QUEUE, $first_url); | |
| } |