Skip to content

Instantly share code, notes, and snippets.

View lcatlett's full-sized avatar
🍕

Lindsey Catlett lcatlett

🍕
View GitHub Profile
@mglaman
mglaman / TrimMiddleware.php
Created January 10, 2023 15:23
TrimMiddleware for Drupal
<?php
declare(strict_types=1);
namespace Drupal\mymodule\StackMiddleware;
use Symfony\Component\HttpFoundation\InputBag;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\HttpKernelInterface;
@nullvariable
nullvariable / cache-aggressive-license-checks.php
Last active April 24, 2025 16:39
Make annoying WordPress plugins that constantly perform license checks in the admin behave.
<?php
/**
* Plugin Name: Cache Aggressive License Checks
* Description: Cache the license checks for plugins that are lame and check on every request.
* Author: Doug Cone
* Author URI: http://dougcone.com
* Version: 0.0.1
*
*/