Skip to content

Instantly share code, notes, and snippets.

View migueleliasweb's full-sized avatar

Miguel Elias dos Santos migueleliasweb

  • Sydney, Australia
  • 20:12 (UTC -12:00)
View GitHub Profile
mp4tomov() {
FILENAME=$(basename -- "${1}")
FILE_EXTENSION="${FILENAME##*.}"
FILENAME_ONLY="${FILENAME%.*}"
FILENAME_OUTPUT="${2}${FILENAME_ONLY}.mov"
if [ ! -d "${2}" ]; then
echo "Second parameter must be a directory"
return
<?php
/* Lots of code */
$full_command_path = $base_path.' api:generate:all-place-images '.$sub_dir->getBasename(). ' --worker';
$Command = new Process($full_command_path);
$Command->run();
$output->write('Uploading place '.$sub_dir->getBasename(). '');
@migueleliasweb
migueleliasweb / Distance.php
Created June 2, 2014 20:03
Distance DQL/UDF
<?php
namespace ChefsClub\ApiBundle\Component\Doctrine\DQL;
use Doctrine\ORM\Query\AST\Functions\FunctionNode;
use Doctrine\ORM\Query\AST\InputParameter;
use Doctrine\ORM\Query\Lexer;
use Doctrine\ORM\Query\Parser;
use Doctrine\ORM\Query\SqlWalker;
<?php
namespace ChefsClub\ApiBundle\Entity;
use ChefsClub\ApiBundle\Security\Exception\ActiveTokenNotFoundException;
use Doctrine\ORM\EntityRepository;
use Exception;
/**
* TokenRepository