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
[xdebug] | |
xdebug.cli_color=1 | |
xdebug.show_local_vars=0 | |
xdebug.remote_enable=1 | |
xdebug.remote_connect_back=1 | |
xdebug.remote_host=<PHPSTORM host IP> | |
xdebug.remote_port="9000" | |
xdebug.idekey=phpstorm | |
xdebug.scream = 0 | |
xdebug.max_nesting_level=300 |
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
// MAJ d'un champ de tous les document d'une collection (upsert:false et multi:true) | |
db.dossier.update( | |
{}, | |
{$set: {"entreprise.codeNAF": {"code": "NAF"}}}, | |
false, | |
true | |
); | |
// Parcours d'une collection | |
db.dossier.find().forEach(function(dossier){ |
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
{ | |
"settings": { | |
"index": { | |
"number_of_shards": 1, | |
"number_of_replicas": 0 | |
}, | |
"analysis": { | |
"analyzer": { | |
"stringAnalyzer": { | |
"type": "custom", |
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; | |
use mageekguy\atoum\report\fields\runner\failures\execute; | |
$cloverWriter = new atoum\writers\file('builds/tests/atoum.coverage.xml'); | |
$cloverReport = new atoum\reports\asynchronous\clover(); | |
$cloverReport->addWriter($cloverWriter); | |
$xunitWriter = new atoum\writers\file('builds/tests/atoum.xunit.xml'); | |
$xunitReport = new atoum\reports\asynchronous\xunit(); |
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 Manwin\YouPorn\WebFrontBundle\EventListener; | |
use Symfony\Component\HttpKernel\Event\FilterResponseEvent; | |
class FrameHeaderListener | |
{ | |
public function onKernelResponse(FilterResponseEvent $event) | |
{ | |
if (!$event->isMasterRequest()) { |
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 wernight/phantomjs:latest | |
USER root | |
WORKDIR / | |
RUN apt-get update \ | |
&& apt-get install -y --no-install-recommends \ | |
git | |
RUN git clone https://github.com/acdha/phantomjs-mixed-content-scan.git /opt/mixed-content-scanner/ \ |
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 | |
set -x; | |
BRANCHES=(release/branch1 release/branch2 release/branch3 master); | |
FIRST=${BRANCHES[0]}; | |
for B in ${BRANCHES[@]:1}; | |
do | |
git fetch; | |
git checkout "$B"; | |
git reset --hard "origin/$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
<?php | |
use AppBundle\Command\ListUsersCommand; | |
use AppBundle\EventListener\CommentNotificationSubscriber; | |
use AppBundle\EventListener\RedirectToPreferredLocaleSubscriber; | |
use AppBundle\Twig\AppExtension; | |
use AppBundle\Utils\Slugger; | |
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; | |
use Twig\Extensions\IntlExtension; |
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 | |
$finder = PhpCsFixer\Finder::create() | |
->in(__DIR__.'/src') | |
->in(__DIR__.'/tests') | |
->exclude(__DIR__.'app/data') | |
; | |
return PhpCsFixer\Config::create() | |
->setRiskyAllowed(true) |
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 App\Normalizer; | |
use App\Entity\User; | |
use Ramsey\Uuid\Uuid; | |
use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; | |
class UserNormalizer implements DenormalizerInterface | |
{ |
OlderNewer