I hereby claim:
- I am Gisleburt on github.
- I am gisleburt (https://keybase.io/gisleburt) on keybase.
- I have a public key whose fingerprint is 708F DF23 13E1 F651 A167 CB81 1E51 9AC2 539B 8E7E
To claim this, I am signing this object:
/* | |
An alternative implementation that avoids the horrifying syntax of | |
prototype. Prototype has it's advantages so if you want the original | |
it's here: https://gist.github.com/banksean/300494 | |
Changes: | |
* Changed to YUI Object Pattern | |
* Simplified code | |
ToDo: |
#!/bin/bash | |
if [ -e "server.pid" ] | |
then | |
echo Stopping server | |
kill `cat server.pid` | |
rm server.pid | |
cat error.log | |
else | |
echo Starting server | |
php -S localhost:8000 router.php >> server.log 2> error.log & |
class Cache { | |
/** | |
* The name of the cache file | |
* @var string | |
*/ | |
protected $cacheFile; | |
/** | |
* The cache data |
#!/bin/bash | |
dir=$(pwd) | |
mkdir ~/phantomjs 2> /dev/null | |
cd ~/phantomjs | |
if [ -e "phantomjs.pid" ] | |
then | |
echo Stopping webdriver |
class AbstractBehatContext extends MinkContext { | |
/** | |
* Slight hack to put beforeSuite code into beforeScenario | |
* @var bool | |
*/ | |
protected static $databaseReady = false; | |
/** | |
* @BeforeScenario |
<?php | |
namespace AyeAye\Tests\Behat; | |
use Behat\Behat\Context\Context; | |
use Behat\Behat\Context\SnippetAcceptingContext; | |
use Behat\Behat\Tester\Exception\PendingException; | |
use Behat\Gherkin\Node\PyStringNode; | |
use Behat\Gherkin\Node\TableNode; | |
use Guzzle\Http\Client; |
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/php | |
<?php | |
// Based on code by raphaelstolt and buddhamagnet https://gist.github.com/raphaelstolt/588697 | |
class PreCommitHook { | |
protected $green = "\033[0;32m"; | |
protected $red = "\033[0;31m"; | |
protected $reset = "\033[0m"; |
<?php | |
/** | |
* Class CloudFormationTemplateValidator | |
* @example | |
* echo 'Validating Cloud Formation Templates'.PHP_EOL; | |
* $hook = new CloudFormationTemplateValidator(); | |
* $files = array_slice($argv, 1); // Get a list of files from arguments | |
* $files = $files ?: $hook->getFilesRecursively('/^.+\.json$/i', getcwd()); // ...or recursively from the working dir | |
* if(!$hook->validateCloudFormationTemplates($files)) { |
<?php | |
abstract class TestCase extends \PHPUnit_Framework_TestCase | |
{ | |
/** | |
* Gets returns a proxy for any method of an object, regardless of scope | |
* @param object $object Any object | |
* @param string $methodName The name of the method you want to proxy | |
* @return \Closure |