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 jsonlint.php
- "seld/jsonlint: 1.3.1"
use Seld\JsonLint\JsonParser;
$parser = new JsonParser();
raulfraile /
Created Apr 30, 2015 HAR file
This file has been truncated, but you can view the full file.
"log": {
"version": "1.2",
"creator": {
"name": "WebInspector",
"version": "537.36"
"pages": [
View servergrove_mail_checker.php
- "swiftmailer/swiftmailer: ~5.0"
$from = $argv[1];
$to = $argv[2];
$transport = \Swift_SmtpTransport::newInstance('', 25)

Study group

The goal of the study group is to learn together cool/advanced/edge stuff that we are not used to see in the PHP world, such as:

  • Turing machines
  • Data mining
  • Esoteric languages
  • Database internals
  • Data structures
  • Algorithms
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?'
You can’t perform that action at this time.