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 | |
/** | |
* Usage: | |
* | |
* php speedTest.php [ITERATIONS] [CONCURRENCY] | |
* | |
* ITERATIONS - (optional) Number of iterations (PI digits) to compute. | |
* Values above 10000 can seriously hog your machine. | |
* CONCURRENCY - (optional) Number of CPU cores to use. If empty, | |
* it's going to attempt to detect the number. |
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
module.directive('tooltipGroup', [ | |
var popoverRegistry = {}; | |
var suspend = false; // semaphore used to prevent circular calling of hide triggers | |
function(){ | |
return { | |
restrict : 'A', | |
priority : 1, | |
link : { | |
pre : function ($scope, el, attrs, formCtrl) { | |
// $scope.artifactPickerSelectOptions = artifactPicker.getSelectOptions(); |
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
#!/usr/bin/osascript | |
# Name of the device as visible in Safari->Develop menu | |
set deviceName to "iPhone Simulator" | |
# Number of seconds to wait for the simulator window to show up | |
set maxWait to 30 | |
# --------------------------------------- | |
# You shouldn't modify anything below here |
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 | |
namespace Foo { | |
class Bar { | |
public function baz() { | |
return strlen('Regarding the overhead: Just keep in mind, that a typical application calls built-in functions many thousand times. Even if the difference is small: It exists.'); | |
} | |
} | |
$start = microtime(true); | |
$foo = new Bar; |
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
string(50) "The url we are looking for: https://github.com?abc" | |
string(46) "The url after parsing: https://github.com?abc=" | |
URL has been broken during parsing | |
string(42) "Url before sending: https://github.com?100" | |
string(42) "Url after sending: https://github.com?100=" | |
URL has been changed when sending request! | |
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 | |
namespace My\App; | |
use Zend\Filter\FilterChain; | |
use Zend\InputFilter\Factory; | |
use Zend\ServiceManager\FactoryInterface; | |
use Zend\ServiceManager\ServiceLocatorInterface; | |
use Zend\Validator\ValidatorChain; | |
/** |
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 | |
namespace Foo { | |
class Bar { | |
public function baz(){} | |
} | |
} | |
namespace Jira { | |
use Foo\Bar; |
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
#!/usr/bin/env php | |
<?php | |
/** | |
* PHP 5.4 Short Array Syntax Converter | |
* | |
* Command-line script to convert PHP's "array()" syntax to PHP 5.4's | |
* short array syntax "[]" using PHP's built-in tokenizer. | |
* | |
* This script is free software; you can redistribute it and/or |
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 | |
abstract class AbstractCello | |
{ | |
/** | |
* @var EventManager | |
*/ | |
protected $em; | |
protected function triggerPre($methodName, $params) |
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 | |
namespace Doctrine\ORM\Mapping; | |
use Doctrine\ORM\Mapping\ClassMetadata; | |
use Doctrine\DBAL\Platforms\AbstractPlatform; | |
/** | |
* A set of rules for determining the physical column, alias and table quotes | |
*/ | |
class EagerQuoteStrategy implements QuoteStrategy |