Skip to content

Instantly share code, notes, and snippets.

View notFloran's full-sized avatar

Floran Brutel notFloran

View GitHub Profile
@notFloran
notFloran / SentryExceptionCatcherProcessor.php
Created June 7, 2017 08:50
SentryExceptionCatcherProcessor for Swarrot
<?php
namespace Hexanet\Si\AppBundle\Processor\Swarrot;
use Swarrot\Broker\Message;
use Swarrot\Processor\ProcessorInterface;
class SentryExceptionCatcherProcessor implements ProcessorInterface
{
/**
@notFloran
notFloran / LoggerPlugin.php
Created April 4, 2018 19:23
Log all emails sent with Swiftmailer
<?php
namespace App\Swiftmailer;
use Psr\Log\LoggerInterface;
use Swift_Events_SendEvent;
use Swift_Events_SendListener;
class LoggerPlugin implements Swift_Events_SendListener
{
@notFloran
notFloran / remove_php.sh
Last active April 26, 2018 09:21
Homebrew - remove PHP and its config
# remove all php and extensions, use "brew list | grep php" to get all packages
brew uninstall --force --ignore-dependencies php71-xdebug php71-amqp php71 ....
# remove all configs
rm -rf /usr/local/etc/php/7.1
rm -rf /usr/local/opt/php@7.1
rm -rf /usr/local/share/pear
rm -rf /usr/local/lib/php/
rm -rf /usr/local/Cellar/php@71
@notFloran
notFloran / ApiRender.php
Created November 18, 2018 10:50
Use MJML API with notfloran/mjml-bundle
<?php
# src/Mjml/ApiRenderer.php
namespace App\Mjml;
use Mjml\Client;
use NotFloran\MjmlBundle\Renderer\RendererInterface;
class ApiRenderer implements RendererInterface