Skip to content

Instantly share code, notes, and snippets.

View lucasaba's full-sized avatar

Luca Saba lucasaba

View GitHub Profile
@lucasaba
lucasaba / translations_check.php
Last active February 6, 2018 18:55
This script checks the revision version between the original doc and its translation
<?php
chdir('./symfony-docs');
$red = "\033[0;31m";
$green = "\033[0;32m";
$yellow = "\033[0;33m";
$cyan = "\033[0;36m";
$files = shell_exec("find ./ -name \*.rst");
$out_string = "%-60s | %12s | %12s\n";
@lucasaba
lucasaba / gist:5747468
Created June 10, 2013 09:16
Ipotesi di script per il check della versione
<?php
chdir('./symfony-docs');
$dh = opendir(getcwd());
$files = shell_exec("find ./ -name \*.rst");
$out_string = "%-60s | %12s | %12s\n";
foreach(preg_split("/((\r?\n)|(\r\n?))/", trim($files)) as $file){
//Numero di revisione delt esto originale
$en_commit = shell_exec("git log -n 1 $file");
@lucasaba
lucasaba / gist:5661223
Created May 28, 2013 08:05
Proposed change to SensioLabs\Connect\Buzz\Client\Curl
<?php
namespace SensioLabs\Connect\Buzz\Client;
use Buzz\Client\Curl as BaseCurl;
use Buzz\Message;
/**
* Curl
*
@lucasaba
lucasaba / FileSystemLoader.php
Created March 3, 2012 20:55
Extending FileSystemLoader
namespace Hal\EpodBundle;
use Liip\ImagineBundle\Imagine\Data\Loader\FileSystemLoader;
class PdfLoader extends FileSystemLoader
{
/**
* Get the file info for the given path
*
@lucasaba
lucasaba / PdfLoader
Created March 3, 2012 19:32
An implementation od Liip\ImagineBundle\Imagine\Data\Loader\LoaderInterface use to preview Pdfs
<?php
/**
* This is an implementation of the LoaderInterface from Liip\ImagineBundle
* wich can be found here: https://github.com/liip/LiipImagineBundle.
* This loader is used to add the ability to manage images from PDF.
* It requires the use of the convert and the identify programs from ImageMagick
* (http://www.imagemagick.org/).
* This class is also based on the work made on sfImageMagickAdapter by
* Fabien Potencier and Benjamin Meynell, but avoiding the exec
* has been suggested by Lukas Kahwe Smith.