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 | |
$scheduler = new Scheduler(); | |
$batch = new Batch(new BatchContext(/* ... */), new ThrottleBatchStrategy()); | |
// Add jobs | |
$batch->addJob(new FooJob( new JobContext() )); |
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
Steps to reproduce: | |
# Make sure that in your redis.conf: | |
appendonly no | |
# Also make sure that, in your redis.conf: | |
dbfilename FOO-dump.rdb | |
save "900 1" | |
save "300 10" | |
save "60 10000" |
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 | |
$roundingInMinutes = 2; | |
$roundingInSeconds = ($roundingInMinutes * 60); | |
$t = time(); | |
$rounded = ($t - ($t % $roundingInSeconds)); |
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
/** | |
* This code will benchmark your server to determine how high of a "cost" you | |
* can afford. You want to set the highest cost that you can without slowing | |
* down your server too much. 10 is a good baseline, and more is good if your | |
* servers are fast enough. | |
* | |
* Obviously You should run this on the server that will be encrypting.. | |
*/ | |
// What is the maximum time, your server should spend on encrypting? |
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
space: function() { | |
var rad = ((this.rotation-90) * Math.PI)/180, | |
dx = 10 * Math.cos(rad), | |
dy = 10 * Math.sin(rad); | |
var sprite = Ext.getCmp('theShip').surface.add({ | |
type: 'path', | |
stroke: 'green', |
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
{ | |
"require": { | |
"monolog/monolog": "1.0.*", | |
"guzzle/guzzle": "2.2.*", | |
"jms/serializer-bundle": "*", | |
"jms/metadata" : "*", | |
"twig/twig": "1.6.5", | |
"predis/predis": "0.7.2", | |
"doctrine/orm": "2.2.2", | |
"doctrine/common" : "2.2.2", |
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
Catchable fatal error: Argument 1 passed to Zend_Controller_Action::__construct() must be an instance of Zend_Controller_Request_Abstract, none given, called in /mnt/hgfs/XX/vendor/Zend/Application/Resource/Frontcontroller.php on line 117 and defined in /mnt/hgfs/XX/vendor/Zend/Controller/Action.php on line 127 | |
Call Stack: | |
0.0006 634352 1. {main}() /mnt/hgfs/XX/api/sally/public/index.php:0 | |
0.0243 2038656 2. Zend_Application->bootstrap() /mnt/hgfs/XX/api/sally/public/index.php:12 | |
0.0243 2038704 3. Zend_Application_Bootstrap_BootstrapAbstract->bootstrap() /mnt/hgfs/XX/vendor/Zend/Application.php:355 | |
0.0243 2038704 4. Zend_Application_Bootstrap_BootstrapAbstract->_bootstrap() /mnt/hgfs/XX/vendor/Zend/Application/Bootstrap/BootstrapAbstract.php:586 | |
0.0965 7508232 5. Zend_Application_Bootstrap_BootstrapAbstract->_executeResource() /mnt/hgfs/XX/vendor/Zend/Application/Bootstrap/BootstrapAbstract.php:626 | |
0.0965 7508464 6. Zend_Application_Resource_Frontcontroll |
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 | |
spl_autoload_register( | |
function ($className) | |
{ | |
$className = ltrim($className, '\\'); | |
$fileName = ''; | |
$namespace = ''; | |
if ($lastNsPos = strripos($className, '\\')) { |
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
[/tmp/case] | |
mark@Dymek:$ git init | |
Initialized empty Git repository in /private/tmp/case/.git/ | |
[/tmp/case] (master) | |
mark@Dymek:$ touch foo | |
[/tmp/case] (master) | |
mark@Dymek:$ git add foo |
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
#!/usr/bin/env bash | |
# The arguments | |
ARGS="$@"; | |
PHP_EXEC="$( which php )" | |
# TRYING to obtain the path we're located in. | |
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
EXECUTABLE="$DIR/../tools/migrations/doctrine-migrations.phar" |
OlderNewer