Skip to content

Instantly share code, notes, and snippets.

@thePanz
thePanz / phpunit-coverage-auto.css
Created September 9, 2025 13:56
PHPUnit v12.x auto light-dark theme for coverage report
/*
* Adapted from: https://github.com/porthorian/phpunit-code-coverage-theme/blob/main/custom.css
* With auto-selection of theme via: https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/light-dark
* inspired by: https://lyra.horse/blog/2025/08/you-dont-need-js/
*
* Usage in phpunit.dist.xml:
* <coverage>
* <report>
* <html customCssFile="tests/phpunit-coverage-dark.css" />
* </report>
@thePanz
thePanz / phpunit-coverage-dark.css
Created September 8, 2025 22:00
PHPUnit v12.x dark theme for coverage report
/*
* Adapted from: https://github.com/porthorian/phpunit-code-coverage-theme/blob/main/custom.css for PHPUnit v12
* Usage in phpunit.dist.xml:
* <coverage>
* <report>
* <html customCssFile="tests/phpunit-coverage-dark.css" />
* </report>
* </coverage>
*/
:root {
@thePanz
thePanz / install-caddy.sh
Last active September 25, 2021 20:11
Caddy arm6 install script
#! /bin/bash
# Install script extracted from: https://github.com/caddyserver/caddy/tree/master/dist/init/linux-systemd
set -x
URL="https://caddyserver.com/download/linux/arm6?license=personal&telemetry=off"
TEMP="/tmp/caddy"
DEST="/tmp/caddy-latest_linux_arm6_personal.tar.gz"
curl "${URL}" -o ${DEST}
@thePanz
thePanz / userChrome.css
Last active March 21, 2019 07:47
Firefox multi-line tabs
/* See imports from: https://github.com/MrOtherGuy/firefox-csshacks */
@import url(chrome/multi-row_tabs.css);
:root{
--multirow-n-rows: 2;
--multirow-tab-min-width: 170px;
}
/**
* Style the Tab's closing icon
@thePanz
thePanz / GIFEncoder.class.php
Created July 26, 2016 12:46 — forked from SeanJA/GIFEncoder.class.php
dynamic animated gif clock
<?php
/*
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Formerly known as:::
:: GIFEncoder Version 2.0 by László Zsidi, http://gifs.hu
::
:: This class is a rewritten 'GifMerge.class.php' version.
::
:: Modification:
#! /bin/bash
# Simple script to dump the contents of a database into separate files in the directory "/backups/"
# Symlink into /etc/cron.daily/ or add to crontab
# Originally from: https://gist.github.com/brianredbeard
# /usr/local/scripts/db_dump
DESTDIR=/vagrant/backups/
DATEFORMAT="+%Y%m%d-%H%M"
@thePanz
thePanz / eg-attachments-publicinc.php
Last active December 30, 2015 12:09
Wrong EG-Attachments sorting
<?php
if (! class_exists('EG_Attachments_Public')) {
/**
* Class EG_Attachments_Public
*
* Implement a shortcode to display the list of attachments in a post.
*
* @package EG-Attachments