This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 | |
# Inspiration http://wadmiraal.net/lore/2014/07/14/how-git-hooks-made-me-a-better-and-more-lovable-developer/ | |
# http://nrocco.github.io/2012/04/19/git-pre-commit-hook-for-PHP.html | |
EXITCODE=0 | |
# Check for php syntax error | |
FILES=$(git diff --cached --name-only) | |
for FILE in $FILES ; do | |
if [[ "$FILE" =~ ^.+(php|inc|module|install|test)$ ]]; then |
This file contains hidden or 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 hidden or 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
# custom PhpStorm VM options | |
# https://stitcher.io/blog/phpstorm-performance | |
-Xms500m | |
-Xmx1500m | |
-XX:ReservedCodeCacheSize=512m | |
-XX:+UseConcMarkSweepGC | |
-XX:+UseCompressedOops | |
-XX:SoftRefLRUPolicyMSPerMB=50 | |
-ea | |
-Dsun.io.useCanonCaches=false |
This file contains hidden or 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 php:5.4-apache | |
RUN apt-get update && apt-get install -y \ | |
libfreetype6-dev \ | |
libjpeg62-turbo-dev \ | |
libmcrypt-dev \ | |
libpng12-dev \ | |
libicu-dev \ | |
libmysqlclient18 \ | |
libc6 \ |
This file contains hidden or 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 | |
tmux has-session -t dev | |
if [ $? != 0 ] | |
then | |
tmux new-session -s dev -n "TEST" -d | |
tmux split-window -h -t dev:0 | |
tmux split-window -v -t dev:0.1 | |
tmux send-keys -t dev:0.0 'cd ~/foo/bar' C-m | |
tmux send-keys -t dev:0.1 'autossh -M 0 -o "ServerAliveInterval 60" -o "ServerAliveCountMax 3" test@test -t "cd ~/bar;bash"' C-m |
This file contains hidden or 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 hidden or 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/ \ |
OlderNewer