Skip to content

Instantly share code, notes, and snippets.

View bendavies's full-sized avatar
🏠
Working from home

Ben Davies bendavies

🏠
Working from home
View GitHub Profile
<?php
namespace ...EventListener;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpKernel\HttpKernelInterface;
use Symfony\Component\Security\Http\Event\InteractiveLoginEvent;
use Symfony\Component\Security\Http\SecurityEvents;
{
"operations": {
"GetMessages": {
"httpMethod": "GET",
"uri": "/messages",
"summary": "Gets a list of messages",
"responseClass": "GetMessagesOutput"
},
"GetMessage": {
"httpMethod": "GET",
@bendavies
bendavies / RevisionsCleanupCommand.php
Created August 31, 2016 22:40 — forked from soerenbernstein/RevisionsCleanupCommand.php
Revisions cleanup for SimpleThings/EntityAudit as symfony command
<?php
/**
* Created by PhpStorm.
* User: Sören Bernstein
* Date: 15.09.2015
* Time: 12:57
*/
namespace Redlink\CASBundle\Command;
<?php
<<<CONFIG
packages:
- "symfony/console: 3.2.4"
- "symfony/event-dispatcher: ~3.0"
CONFIG;
use Symfony\Component\Console\Application;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\ConsoleEvents;

Keybase proof

I hereby claim:

  • I am bendavies on github.
  • I am bendavies (https://keybase.io/bendavies) on keybase.
  • I have a public key ASArkGF0uKKkttXaSx04W9G6JuHNCPqVkNy2UyFHVBXj-go

To claim this, I am signing this object:

<?php
namespace Foo;
$a = [];
$start = microtime(true);
for ($i = 0; $i <= 1000000000; $i++) {
is_array($a);
}
<?php
/*
* This file is part of the API Platform project.
*
* (c) Kévin Dunglas <dunglas@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
<?php
declare(strict_types=1);
namespace App\Entity;
use ApiPlatform\Core\Annotation\ApiProperty;
use ApiPlatform\Core\Annotation\ApiResource;
use Doctrine\ORM\Mapping as ORM;
use Ramsey\Uuid\Uuid;
<?php
namespace Ivory\Tests\Serializer\Benchmark;
use Ivory\Tests\Serializer\Benchmark\Model\Category;
use Ivory\Tests\Serializer\Benchmark\Model\Comment;
use Ivory\Tests\Serializer\Benchmark\Model\Forum;
use Ivory\Tests\Serializer\Benchmark\Model\Thread;
use Symfony\Component\Serializer\Encoder\JsonEncoder;
use Symfony\Component\Serializer\Encoder\XmlEncoder;
gyp info spawn /usr/bin/python2
gyp info spawn args [ '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/srv/app/node_modules/contextify/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',