Skip to content

Instantly share code, notes, and snippets.

View notFloran's full-sized avatar

Floran Brutel notFloran

View GitHub Profile
@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
@notFloran
notFloran / reboot_nb6.sh
Last active March 29, 2024 09:22
Script pour redémarrer une Neufbox v6 Infos : NB6-SER-r2 NB6-MAIN-R3.2.12
#!/bin/bash
WEBLOGIN=admin
WEBPASS=
IP=192.168.1.1
wget -qO- http://$IP/login --referer="http://$IP/login?page_ref=/reboot" "http://$IP/reboot" --post-data="method=passwd&zsid=&login=$WEBLOGIN&password=$WEBPASS&submit=" &> /dev/null