This file contains hidden or 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
#!/bin/sh | |
BASENAME=$(basename $1) | |
ffmpeg -i $1 -s hd480 -c:v libx264 -crf 22 -c:a libfdk_aac -vsync passthrough ${BASENAME%.*}.mp4 |
This file contains hidden or 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
RUN pecl install xdebug \ | |
&& docker-php-ext-enable xdebug \ | |
&& echo "xdebug.remote_enable=on" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \ | |
&& echo "xdebug.remote_host = host.docker.internal" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug. |
This file contains hidden or 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 | |
declare(strict_types=1); | |
namespace App\Common\Enum; | |
use ReflectionException; | |
use ReflectionClass; | |
use InvalidArgumentException; |
This file contains hidden or 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 | |
declare(strict_types=1); | |
namespace App\Common\Enum; | |
use ReflectionException; | |
use ReflectionClass; | |
use InvalidArgumentException; |
This file contains hidden or 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 | |
namespace Test; | |
use PHPUnit\Framework\TestCase; | |
use ReflectionClass; | |
use ReflectionException; | |
class TestBase extends TestCase | |
{ |
This file contains hidden or 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
#!/bin/bash | |
echo "-----------------------------------------------------------------------------------------------" | |
echo " 💣This command will move your Migration PHP files to /tmp, drop the database, and recreate it" | |
echo "-----------------------------------------------------------------------------------------------" | |
read -r -p "Are you sure you want to do this? [y/N] " response | |
echo "" | |
if [[ "$response" =~ ^[Yy]$ ]] | |
then | |
mv ../src/Migrations/*.php /tmp | |
../bin/console doctrine:database:drop --force |
This file contains hidden or 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
// ----------------------------------------------------------------------------------------------------------------- | |
protected function getMethod($methodName, $object) | |
{ | |
try { | |
$class = new \ReflectionClass(get_class($object)); | |
$method = $class->getMethod($methodName); | |
$method->setAccessible(true); | |
return $method; | |
} catch (\ReflectionException $e) { |
This file contains hidden or 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
#!/bin/bash | |
# https://dev.mysql.com/doc/refman/5.7/en/creating-ssl-files-using-openssl.html | |
# Create clean environment | |
rm -rf newcerts | |
mkdir newcerts && cd newcerts | |
# Create CA certificate | |
# Use default values for everything except common name | |
openssl genrsa 2048 > ca-key.pem |
This file contains hidden or 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
FROM php:7.2-apache | |
COPY --chown=www-data:www-data . /var/www/html/ | |
COPY Docker/vhost.conf /etc/apache2/sites-available/000-default.conf | |
COPY Docker/php.ini-development /usr/local/etc/php/php.ini | |
WORKDIR /var/www/html/ |
This file contains hidden or 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 | |
// composer require monolog/monolog | |
require('vendor/autoload.php'); | |
use Monolog\Logger; | |
use Monolog\Handler\StreamHandler; | |
use Monolog\Handler\FingersCrossedHandler; | |
use Monolog\Handler\FingersCrossed\ErrorLevelActivationStrategy; |
NewerOlder