Skip to content

Instantly share code, notes, and snippets.

View kwisatz's full-sized avatar

David Raison kwisatz

View GitHub Profile
@kwisatz
kwisatz / sa-learn-pipe.sh
Created December 24, 2015 16:10 — forked from kylemanna/sa-learn-pipe.sh
Dovecot script for dovecot-antispam plugin for automatic amavis + spamassassin learning.
#!/bin/bash
#
# Wrapper script for dovecot-antispam without using temporary files
# Look mom, no temporary files!
#
# Security is provided by locking the vmail user (dovecot-imap/antispam)
# only run this script via the sudoers line. The script checks arguments
# to stay safe. Log everything to syslog and return intelligent codes.
#
# sudoers:
@kwisatz
kwisatz / ApiKeyAuthenticationServiceProvider.php
Last active February 10, 2018 13:25
Silex ApiKeyAuthenticationServiceProvider
<?php
/**
* ApiKeyAuthenticator for the Symfony Security Component
*/
namespace Ttf\Security\Provider;
use Silex\Application,
Silex\ServiceProviderInterface;
use Symfony\Component\Security\Core\Exception\AuthenticationException,
Symfony\Component\Security\Core\Authentication\Provider\SimpleAuthenticationProvider,
@kwisatz
kwisatz / ApiKeyAuthenticatorServiceProvider.php
Last active August 29, 2015 14:02
Trying to get a Simple_preauth listener for symfony security working…
<?php
/**
* ApiKeyAuthenticator for the Symfony Security Component
*/
namespace Ttf\Security\Provider;
use Silex\Application,
Silex\ServiceProviderInterface;
use Symfony\Component\Security\Core\Exception\AuthenticationException;
<?php
namespace Widop\Mink\Extension;
/**
* Dictionary to manage popups.
*
* @author Benjamin Lazarecki <benjamin.lazarecki@gmail.com>
*/
trait PopupDictionary