Skip to content

Instantly share code, notes, and snippets.

@strarsis
strarsis / guide.md
Last active April 17, 2025 18:36
Object caching with Bedrock (and Trellis) using Redis

Object caching with Bedrock (and Trellis) using Redis

What is object caching

While nginx microcaching already solves page caching (as of static, rarely changing WordPress pages), the performance for dynamically generated pages (like WooCommerce shop pages and admin backend in general) can benefit greatly from additionally using an object cache. Object caching allows an application (in this case WordPress with its plugins, theme, etc.) to store prepared objects (mostly database queries) in a database and quickly retrieve them, therefore improving the performance of dynamic page generation. Object caching is (usually) transparent, which means that it shouldn't be noticeable by users and developers (except for the performance improvements of course).

Implementations

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Note: There is a new library as successor to TCPDF, but not everyone already uses it or migrated to it.
Clone the TCPD repository (https://github.com/tecnickcom/TCPDF)
Invoke the PHP command line script `./tools/tcpdf_addfont.php` to convert fonts.
@strarsis
strarsis / instructions.md
Last active June 8, 2024 02:28
Realtek Gigabyte mainboard HD Audio driver (missing/unavailable Realtek HD Audio manager on Windows 10)

Problem

The Realtek HD Audio manager isn't available on a recent (end 2020) Windows 10 system. The Realtek Audio chipset is on a Gigabyte mainboard.

Solution

  1. Install the Realtek HD Audio driver from Gigabyte, not from official Realtek site. Note: There is no universal Realtek driver (yet), there is an unofficial one on GitHub though, but its installation requires multiple steps, system files/settings modifications, etc. Installation may require one or two subsequent reboots, first the setup uninstalls the existing/old/incorrect Realtek Audrio drivers, then reboots and the setup automatically starts itself (be patient!) after rebooting and logging in to install the new driver.
@strarsis
strarsis / max_width_email.html
Created September 25, 2020 06:13 — forked from elidickinson/max_width_email.html
Email Template trick: max-width with outlook
<!--[if mso]>
<center>
<table><tr><td width="580">
<![endif]-->
<div style="max-width:580px; margin:0 auto;">
<p>This text will be centered and constrained to 580 pixels even on Outlook which does not support max-width CSS</p>
</div>
<!--[if mso]>
@strarsis
strarsis / datetime.js
Created July 2, 2020 20:42
Complied DateTime.ts from Litepicker
var DateTime = /** @class */ (function () {
function DateTime(date, format, lang) {
if (date === void 0) { date = null; }
if (format === void 0) { format = null; }
if (lang === void 0) { lang = 'en-US'; }
if (format) {
this.dateInstance = (DateTime.parseDateTime(date, format, lang));
}
else if (date) {
this.dateInstance = (DateTime.parseDateTime(date));
@strarsis
strarsis / spec.json
Last active May 30, 2020 14:38
OpenAPI Generator issue reproducing JSON
{
"openapi": "3.0.0",
"info": {
"title": "Test REST-API",
"version": "1.0"
},
"servers": [
{
"url": "https://api.example.com/v1"
}
@strarsis
strarsis / down.svg
Last active May 27, 2020 16:15
Mask
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Complete name : input.mp4
Format : MPEG-4
Format profile : Base Media / Version 2
Codec ID : mp42 (mp42/mp41/isom/avc1)
File size : 7,07 MiB
Duration : 20s 160 ms
Overall bit rate : 2 943 kb/s
Encoded date : UTC 2017-06-20 10:37:33
Tagged date : UTC 2017-06-20 10:37:33
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.