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 | |
use | |
mageekguy\atoum\scripts\treemap, | |
mageekguy\atoum\scripts\treemap\analyzers, | |
mageekguy\atoum\scripts\treemap\categorizer | |
; | |
$testsDirectory = __DIR__ . DIRECTORY_SEPARATOR . 'tests' . DIRECTORY_SEPARATOR; |
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
# Start your VM either manually or using vboxmanage | |
# | |
# /!\ The VM has to be started in non-headless mode for this script to work | |
# When you want to make it headless (dettached window) use | |
$ vboxsw "VM Name" d | |
# When you want to get the window back use | |
$ vboxsw "VM Name" a |
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 | |
aop_add_before('printf()', function($jp) { | |
echo 'Hey, I\'m being magically called before printf !' . PHP_EOL; | |
}); | |
aop_add_after('printf()', function($jp) { | |
echo 'AOP-PHP is really awesome !' . PHP_EOL; | |
}); | |
aop_add_around('date()', function($jp) { |
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
{ | |
"name": "atoum-praspel", | |
"type": "script", | |
"description": "", | |
"authors": [ | |
{ | |
"name": "Julien Bianchi", | |
"email": "[email protected]", | |
"homepage": "http://jubianchi.fr" | |
} |
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 | |
namespace { | |
class A {} | |
var_dump(class_alias('A', 'B')); // => bool(true) | |
$reflector = new \ReflectionClass('B'); | |
var_dump($reflector->getName()); // => string(1) "A" | |
} | |
namespace jubianchi\Alias { |
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 | |
namespace { | |
class A { | |
private $sep; | |
public function __construct($sep = null) { | |
$this->sep = $sep ?: '--'; | |
} | |
public function concat($a, $b) { |
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
#!/bin/bash | |
# How to install: | |
# | |
# $ sudo wget -O /usr/local/bin/jenkins-cli.jar http://your-jenkins/jnlpJars/jenkins-cli.jar | |
# $ sudo chmod +x !:3 | |
# | |
# Put this script somewhere in your PATH and allow execution: | |
# | |
# $ sudo wget -O /usr/local/bin/jenkins https://gist.github.com/jubianchi/6434891/raw/jenkins.sh |
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 | |
// ---------------------------------------------------------------------------------------- | |
// Testing with internal/SPL classes | |
$files = array(); | |
$f1 = new \SplFileObject('/home/ABC-OBJECTIF/julien.bianchi/sources/behat_cas/package.json'); | |
$r1 = in_array($f1, $files); | |
var_dump(spl_object_hash($f1)); |
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 | |
namespace | |
{ | |
use mageekguy\atoum; | |
require_once __DIR__ . '/../vendor/autoload.php'; | |
class locker | |
{ | |
protected $adapter; |
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
From 244d1b4f55116553ca5d529b98251ee643e17340 Mon Sep 17 00:00:00 2001 | |
From: jubianchi <[email protected]> | |
Date: Thu, 17 Oct 2013 21:09:27 +0200 | |
Subject: [PATCH] Enable prefix annotation | |
--- | |
classes/test.php | 31 +++++++++++++++++++++++++------ | |
1 file changed, 25 insertions(+), 6 deletions(-) | |
diff --git a/classes/test.php b/classes/test.php |