Skip to content

Instantly share code, notes, and snippets.

View gnugat's full-sized avatar
💭
Test, Code, Refactor, Repeat!

Loïc Faugeron gnugat

💭
Test, Code, Refactor, Repeat!
View GitHub Profile
@gnugat
gnugat / .gitignore
Last active December 21, 2015 22:48
Basic Stack - A C basic implementation
# Compiled file
a.out
@gnugat
gnugat / ACTUAL_OUTPUT
Created September 1, 2013 16:27
Incenteev/ParameterHandler in version 2.1@dev (on date 09/01/13) does not seem to support more than one depth level
Some parameters are missing. Please provide them.
extensions ({ Behat\Symfony2Extension\Extension: { mink_driver: true }, Behat\MinkExtension\Extension: { base_url: 'http://motivation-application.local/', default_session: symfony2 } }): ^Ĉ
@gnugat
gnugat / Command.php
Created October 9, 2013 10:57
What's wrong with this ?
<?php
class Command
{
/**
* Takes input's parameters to create an output (with a status code).
*
* @param InputInterface $input
*
* @return OutputInterface
@gnugat
gnugat / ExampleRepository.php
Last active June 6, 2019 09:32
Declaring a Doctrine Repository as a service and injecting it a dependency.
<?php
namespace Acme\DemoBundle\Repository;
use Acme\DemoBundle\Dependency;
use Doctrine\ORM\EntityRepository;
/**
* Get this repository directly from the container: it will set the $dependency attribute.
* If you get it using Doctrine's "getRepository()", don't forget to call setDependency().
@gnugat
gnugat / README.md
Last active August 29, 2015 14:01
Redaktilo in a tweet

Redaktilo in a tweet

An extreme minification of Redaktilo.

Usage:

<?php
require_once __DIR__.'/r.php';
@gnugat
gnugat / ApiTestClient.php
Last active August 29, 2015 14:07
gnugat/ripozi - ApiTestClient
<?php
namespace Gnugat\Ripozi\Test;
/**
* Assumes that the application kernel is named AppKernel and has been loaded
*/
class ApiTestClient
{
/**
@gnugat
gnugat / SubmitJsonListener.php
Created October 3, 2014 10:05
gnugat/ripozi - SubmitJsonListener
<?php
namespace Gnugat\Ripozi\EventListener;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpKernel\Event\GetResponseEvent;
use Symfony\Component\HttpKernel\HttpKernelInterface;
/**
@gnugat
gnugat / CommandTestApplication.php
Last active August 29, 2015 14:07
gnugat/ripozi - CommandTestApplication
<?php
namespace Gnugat\Ripozi\Test;
use Symfony\Bundle\FrameworkBundle\Console\Application;
use Symfony\Component\Console\Input\ArrayInput;
use Symfony\Component\Console\Output\NullOutput;
/**
* Assumes that the application kernel is named AppKernel and has been loaded
@gnugat
gnugat / HttpHeader.php
Last active August 29, 2015 14:08
gnugat/ripozi - HttpHeader
<?php
namespace Gnugat\Ripozi\Service;
class HttpHeader
{
const AUTHORIZATION_HEADER = 'Authorization';
const CONTENT_TYPE = 'Content-Type';
const FORM_CONTENT_TYPE = 'application/x-www-form-urlencoded';
@gnugat
gnugat / NanoNomoSpaco.php
Last active August 29, 2015 14:11
Nano Nomo Spaco
<?php
if (!isset($argv[1])) {
die('Usage: '.$argv[0].' <path>');
}
$path = $argv[1];
$fqcns = array();
$allFiles = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path));