Skip to content

Instantly share code, notes, and snippets.

Raul Fraile raulfraile

Block or report user

Report or block raulfraile

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
raulfraile /
Last active Oct 17, 2019
Slides de deSymfony 2017
View yamllint.php
- "symfony/yaml: ~2.3"
use Symfony\Component\Yaml\Exception\ParseException;
use Symfony\Component\Yaml\Parser;
$content = file_get_contents($argv[1]);
View gist:5827468
use Symfony\Component\Validator\Constraint;
use Symfony\Component\Validator\ConstraintValidator;
class ContainsJavaValidator extends ConstraintValidator
public function validate($value, Constraint $constraint)
if (stripos($value, 'java') !== false) {
View gist:5822080
// validate input (don't allow jokes about java)
$content = $request->request->get('content');
if (stripos($content, 'java') !== false) {
throw new BadRequestHttpException('Java jokes are not allowed');
View gist:5816283
public function load(ObjectManager $manager)
$jokes = array(
'There’s no place like',
'If at first you don’t succeed; call it version 1.0',
'You know it’s love when you memorize her IP number to skip DNS overhead',
'Beware of programmers that carry screwdrivers',
'What color do you want that database?'
View gist:5607655
namespace Psr\Log;
* Describes a logger instance
interface LoggerInterface
View gist:4569112
En estos momentos no podemos atenderle. Por favor vuelva a intentarlo pasado unos minutos. Disculpe las molestias.
raulfraile / gist:4216565
Created Dec 5, 2012
Ladybug expanded by default
View gist:4216565
expanded: true
raulfraile / composer_platform.txt
Created Nov 9, 2012
composer show --platform
View composer_platform.txt
$ composer show --platform
ext-apc [3.1.9] : The apc PHP extension
ext-bcmath [0] : The bcmath PHP extension
ext-bz2 [0] : The bz2 PHP extension
ext-ctype [0] : The ctype PHP extension
ext-curl [0] : The curl PHP extension
ext-date [5.3.15] : The date PHP extension
ext-dom [20031129] : The dom PHP extension
ext-ereg [0] : The ereg PHP extension
You can’t perform that action at this time.