Skip to content

Instantly share code, notes, and snippets.

View mickaelandrieu's full-sized avatar
Working from home

Mickaël Andrieu mickaelandrieu

Working from home
View GitHub Profile
mickaelandrieu / yamllint.php
Created October 20, 2016 08:14 — forked from raulfraile/yamllint.php
YAML linter
- "symfony/yaml: ~2.3"
use Symfony\Component\Yaml\Exception\ParseException;
use Symfony\Component\Yaml\Parser;
$content = file_get_contents($argv[1]);
mickaelandrieu / sf2_standalone_form.php
Last active November 26, 2015 15:17 — forked from jubianchi/sf2_standalone_form.php
How to use Symfony2 Form Component Standalone
namespace Standalone\Form;
use \Symfony\Component\HttpFoundation as SHttp;
use \Symfony\Component\Form as SForm;
use \Symfony\Component\DependencyInjection as SDI;
use \Symfony\Bridge as SBridge;
//Register all your autoloaded functions here
# Runs our end to end tests in casperjs.
# Run this script as follows from the project root;
# bin/run_e2e_tests
printf "\e[93m > SEARCHING FOR TEST FILES \033[0m \n"
find "$PWD" -iname "*.e2e.spec.js" -type f -print0 | while read -d '' -r file; do
We couldn’t find that file to show.
casperjs index.js && convert *.jpg video.mpeg && gify video.mpeg out.gif && rm *.jpg video.mpeg
function it($m,$p){echo ($p?'✔︎':'✘')." It $m\n"; if(!$p){$GLOBALS['f']=1;}}function done(){if(@$GLOBALS['f'])die(1);}
# Based on
# Start the old vagrant
$ vagrant init ubuntu_saucy
$ vagrant up
# You should see a message like:
# [default] The guest additions on this VM do not match the install version of
# VirtualBox! This may cause things such as forwarded ports, shared
# folders, and more to not work properly. If any of those things fail on

Les problèmes essentiels de jQuery

Cet article fait suite à la discussion entre Metal3d et Mathieu Robin.

Saluons d'abord l'article de metal3d, qui pose enfin des questions intéressantes après un article écrit trop tôt qui soulignait surtout les difficultés qu'il avait en découvrant jQuery et en essayant de l'utiliser comme Mootools (ce qui ne peut bien sûr pas fonctionner).

Cependant, on sent bien dans cet article que les problèmes fondamentaux commencent à être touchés sans toutefois être exactement saisis. Laissez-moi vous présenter mon point de vue.

La peur des natives

namespace ...;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Form\Form;
abstract class BaseFormFlowHandler extends BaseFormHandler
protected $step;
protected $request;