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 | |
apt-get update | |
apt-get install -y \ | |
apt-transport-https \ | |
ca-certificates \ | |
curl \ | |
software-properties-common | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - |
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 Blackprism\Nothing\HydratorCallable; | |
public function executeSomeQuery() | |
{ | |
$this->createQueryBuilder() | |
->select('id', 'name', 'last_updated') | |
->from('user'); | |
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 AppBundle\Documentation; | |
use Symfony\Component\Serializer\Normalizer\NormalizerInterface; | |
/** | |
* Class DocumentationNormalizer | |
* @package AppBundle\Documentation |
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
load 'deploy' if respond_to?(:namespace) # cap2 differentiator | |
require 'capifony_symfony2' | |
load 'app/config/deploy' |
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 | |
$mapperConfiguration = new MapperConfiguration(); | |
static class MapperCallableHelper{ | |
protected static $attributName = ""; | |
protected static $setterCallable = function(Mapper $mapper, $object, $value){ | |
$method = 'set'.ucfirst(self::$attributName); | |
$object->$method($value); |
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
/** | |
* Envoi un var_dump dans la sortie erreur | |
* @param mixed $var | |
*/ | |
function dump($var){ | |
ob_start(); | |
var_dump($var); | |
$result = ob_get_clean(); | |
fwrite(STDERR,$result); | |
} |
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 Shadow\WowBundle\Controller; | |
use Symfony\Bundle\FrameworkBundle\Controller\Controller; | |
class DefaultController extends Controller | |
{ | |
public function testAction() | |
{ |
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
{% for item in appliControle %} | |
{% set htmlFile = "" %} | |
{% set isPerime = false %} | |
{% for file in item.DataFileNeeded %} | |
{% set htmlFile = htmlFile~ "<li>" %} | |
{% set htmlFile = htmlFile~ file.name %} | |
{% if file.lastUpdate.date|date('Y-m-d') == "now"|date('Y-m-d') %} | |
{% set htmlFile = htmlFile~ '<span class="uk-badge uk-badge-success uk-float-right">Récent</span>' %} | |
{% elseif file.lastUpdate.date|date('Y-m-d') < "now"|date_modify('-2 Day')|date('Y-m-d') %} | |
{% set htmlFile = htmlFile~ '<span class="uk-badge uk-badge-danger uk-float-right">Périmé</span>' %} |
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
SELECT | |
* | |
FROM AppliControle AS ac | |
INNER JOIN applicontrole_controlinterne AS aci ON aci.applicontrole_id = ac.id | |
INNER JOIN ControlInterne AS ci ON aci.controlinterne_id = ci.id | |
INNER JOIN Task AS t ON ci.task_id = t.id | |
INNER JOIN ( | |
SELECT | |
aci2.applicontrole_id AS id, | |
max(t2.date) as recent |
NewerOlder