Skip to content

Instantly share code, notes, and snippets.

@javiereguiluz
javiereguiluz / gist:1293646
Created October 17, 2011 20:10
Configuración mínima de Apache2 para un proyecto Symfony2
<VirtualHost *:80>
DocumentRoot "/Users/javier/sf/cupon.local/web"
DirectoryIndex app.php
ServerName cupon.local
<Directory "/Users/javier/sf/cupon.local/web">
AllowOverride All
Allow from All
</Directory>
</VirtualHost>
// original code
public function getFunctions()
{
return array(
new \Twig_SimpleFunction('show_source_code', array($this, 'showSourceCode'), array('is_safe' => array('html'), 'needs_environment' => true)),
);
}
// new code
@javiereguiluz
javiereguiluz / gist:ec86ff09c05eabac492d
Last active August 29, 2015 14:17
Symfony en 1 minuto

Linux y Mac OS X

# (30 segundos) Instalar el Instalador de Symfony
$ sudo curl -LsS http://symfony.com/installer -o /usr/local/bin/symfony
$ sudo chmod a+x /usr/local/bin/symfony

# (10 segundos) Crear un nuevo proyecto Symfony
$ symfony new nombre_proyecto
@javiereguiluz
javiereguiluz / har2blackfire.php
Last active August 29, 2015 14:14
Transforms HAR file format to Blackfire file format
<?php
// Transforms a HAR (HTTP Archive) file into a BK file to analyze it using
// Blackfire Profiler (https://blackfire.io/)
//
// USAGE:
// $ php har2blackfire.php name-of-the-HAR-file.har
$harFile = $argv[1];
$harData = json_decode(file_get_contents($harFile), true);