Skip to content

Instantly share code, notes, and snippets.

View hacfi's full-sized avatar

hacfi hacfi

  • Certified Symfony developer
  • Europe
  • X @hacfi
View GitHub Profile
@hacfi
hacfi / app AppKernel.php
Created May 19, 2015 20:08
Public Symfony container service methods and nicer names
<?php
use Symfony\Component\Config\ConfigCache;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Bridge\ProxyManager\LazyProxy\PhpDumper\ProxyDumper;
use hacfi\NiceServiceContainer\PhpDumper;
class AppKernel extends AbstractKernel
@hacfi
hacfi / php7_osx.sh
Created May 14, 2015 22:40
Compile PHP7/master on OS X
!#/bin/bash
mkdir -p /usr/local/src/php-src
curl -L https://github.com/php/php-src/archive/master.tar.gz | tar -xzv -C /usr/local/src/php-src --strip-components=1
mkdir /usr/local/src/php-src/ext/ast
curl -L https://github.com/nikic/php-ast/archive/master.tar.gz | tar -xzv -C /usr/local/src/php-src/ext/ast --strip-components=1
cd /usr/local/src/php-src/
@hacfi
hacfi / token_constants.php
Created May 9, 2015 06:09
PHP Token Constants List
<?php
$tokenConstants = array_filter(
get_defined_constants(),
function ($value, $key) {
return substr($key, 0, 2) === 'T_';
},
ARRAY_FILTER_USE_BOTH
);
@hacfi
hacfi / keybase.md
Created August 18, 2014 11:43
keybase.md

Keybase proof

I hereby claim:

  • I am hacfi on github.
  • I am hacfi (https://keybase.io/hacfi) on keybase.
  • I have a public key whose fingerprint is 50D1 D63E BDC1 5A42 8C55 2286 1A60 0CC2 51E0 3A30

To claim this, I am signing this object:

<?php
namespace hacfi\AppBundle\DependencyInjection\Security\Factory;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Reference;
use Symfony\Component\DependencyInjection\DefinitionDecorator;
use Symfony\Component\Config\Definition\Builder\NodeDefinition;
use Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory\SecurityFactoryInterface;
use Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory\AbstractFactory;
@hacfi
hacfi / my.cnf
Created February 16, 2013 21:12
my.cnf for mysql/percona on os x installed with brew
[mysql]
port = 3306
socket = /usr/local/var/run/mysql.sock
[mysqld]
#user = mysql
default_storage_engine = InnoDB
socket = /usr/local/var/run/mysql.sock
pid_file = /usr/local/var/run/mysql.pid