# (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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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); |
NewerOlder