Skip to content

Instantly share code, notes, and snippets.

View Korko's full-sized avatar

Jérémy Lemesle Korko

View GitHub Profile
@zushane
zushane / pre-commit
Last active April 15, 2019 21:39
A git pre-commit hook to run phpunit tests, written in bash. Features pretty colours, and slightly individualized output.
#!/bin/bash
# Locate our phpunit.
phpunit=`which phpunit`
# Any extra arguments to phpunit should go here.
phpunit_args=""
# Define a location to save the output.
outputlog="/tmp/phpunit_output_`date +%s`.log"
@fracsi
fracsi / !dsn_handler_for_swiftmailer.php
Last active December 21, 2020 21:11
DSN Feature for SwiftMailer
<?php
$mailer = Swift_Mailer::newInstance(
Swift_SmtpTransport::newInstance('smtp.example.org', 25)
);
// NOTIFY=NEVER
$mailer->registerPlugin(new DsnPlugin([new NotifyHandler('never')]));
// --- OR ---