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
#!/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" |
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 | |
/** | |
* @author Mark van der Velden <[email protected]> | |
*/ | |
/* | |
* Given, the following specification: | |
* - part 1, 40 bits wide -- a number between 0 - 1099511627775 | |
* - part 2, 5 bits wide -- a number between 0 - 31 | |
* - part 3, 9 bits wide -- a number between 0 - 511 |
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 | |
$time = microtime(true); | |
$seconds = (int) $time; | |
$milliseconds = (int) ($time * 1000); | |
$microseconds = (int) ($time * 1000000); | |
$nanoseconds = (int) ($time * 1000000000); | |
echo "seconds : $seconds\n" |
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
{ | |
"_links": { | |
"api-root:self": { "href": "orders" }, | |
"api-root:next": { "href": "orders?page=2" }, | |
"api-root:find": { "href": "orders{?id}", "templated": true }, | |
"api-root:admin": [ | |
{ "href": "admins/2", "title": "Fred" }, | |
{ "href": "admins/5", "title": "Kate" } | |
], | |
"_curies" : [ |
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 | |
/** | |
* This script will generate a bunch of random data to test the exhaustion of kernel entropy. | |
* | |
* @author Mark van der Velden <[email protected]> | |
* | |
* | |
* Entropy can be checked at: /proc/sys/kernel/random/entropy_avail | |
* | |
* Tools like RND-tools can help keep the entropy above acceptable ranges. While this doesn`t (necessarily) improve |
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 | |
$networkEID = '0b3fe...a'; | |
$fileEID = 'af4e0...f' | |
// e.g.: 19c679c10770acc216c26045cc5406c8155 | |
$largeNumber = hash("sha1", $fileEID); | |
// Converting from base-16 to base-13 | |
$hash = gmp_strval(gmp_init($largeNumber, 16), 13); |
OlderNewer