Skip to content

Instantly share code, notes, and snippets.

View drubb's full-sized avatar

Boris Böhne drubb

View GitHub Profile
@drubb
drubb / CacheTimeout.php
Last active January 11, 2023 16:39
Invalidate Drupal cache tags on full hours / at midnight using stack middleware
<?php
namespace Drupal\mymodule\StackMiddleware;
use Drupal\Core\Cache\CacheTagsInvalidator;
use Drupal\Core\Datetime\DateFormatter;
use Drupal\Core\State\State;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\HttpKernelInterface;
@drubb
drubb / Caddyfile
Last active March 21, 2021 17:36
Setup browser-based Phpstorm instance for Drupal and JavaScript development using Docker and Caddy Server
your.editor.domain {
reverse_proxy phpstorm:8887
basicauth {
username WHATEVERYOUGENERATEASSECRETKEYUSINGCADDY
}
}
your.preview.domain {
reverse_proxy phpstorm:3000
basicauth {