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 | |
# Create environment variables | |
USER=$1 | |
USER_DIR=./$1 | |
ENV={EDIT_ENV} | |
SERVER_API_URI=https://{EDIT_SERVER_API}:6443/ | |
# create the user environment directory | |
mkdir -p $USER_DIR |
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
map <Left> <Nop> | |
map <Right> <Nop> | |
map <Up> <Nop> | |
map <Down> <Nop> |
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
class Container | |
{ | |
public function getA() | |
{ | |
$object = new A(); | |
$object->addModule($this->getB()); // a la fin de addModule, il injecte le logger dans B | |
} | |
public function getB() | |
{ |
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 | |
$operation = '1 + 1'; // ... | |
$visitor = new \Hoa\Math\Visitor\Arithmetic(); | |
$compiler = \Hoa\Compiler\Llk::load( | |
new \Hoa\File\Read('hoa://Library/Math/Arithmetic.pp') | |
); | |
$visitor->visit( |
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 | |
$rule = "foo(foo,'bar') = in_array(1, ('1', '2'))"; | |
$ruler = new Hoa\Ruler\Ruler(); | |
$ruler->addFunction('foo', function(array $args) { | |
return $args[0] == $args[1]; | |
}); | |
$ruler->addFunction('in_array', function(array $args) { | |
return 1; |
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
$rb = new \Hoa\Ruler\RuleBuilder(); | |
$rb->or( | |
$rb->and( | |
$rb->equals($rb->context('foo'), 100), | |
$rb->notEquals($rb->context('baz'), 150), | |
$rb->not($rb->context('bar')) | |
), | |
$rb->in($rb->scalar('toto'), $rb->context('users')) | |
); |
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
%skip space \s | |
// Scalars. | |
%token true true|TRUE | |
%token false false|FALSE | |
%token null null|NULL | |
// Comparator | |
%token isNot (is not|IS NOT) | |
%token is (is|IS) | |
// Logical operators | |
%token not NOT |
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": { | |
"php": ">=5.3.2", | |
"hoa/compiler": "master" | |
}, | |
"autoload": { | |
"psr-0": { | |
"Rulez": "src/" | |
} | |
}, |
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
" Move to left/right on buffer | |
map <S-Left> :bN<cr> | |
map <S-Right> :bn<cr> |
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; | |
$script->addTestAllDirectory(__DIR__.'/src/Acme/MyBundleBundle/Tests/Units'); | |
$cliReport = $script->addDefaultReport(); | |
$cliReport->addField(new atoum\report\fields\runner\result\logo()); | |
$runner->addReport($cliReport); |
NewerOlder