Skip to content

Instantly share code, notes, and snippets.

@strarsis
strarsis / howto.md
Last active November 16, 2025 06:16
KeeAgent (for KeePass) on Bash on Windows / WSL (2) - KeePass as an SSH agent

Update (March 2023) (Last checked: Oktober 2024)

Side note: The latest edge build of KeeAgent plugin offers an option for creating a WSL compatible socket. This would be very handy. I already tried to use that socket, but the socket file is currently empty and ssh inside WSL 2 is unable to use it. This appears to be a very new, unreleased and unstable feature. I will follow the development of it and when it finally works (well, for me) I will update this HOWTO. But until then, please use the proven wsl-ssh-agent/npiperelay.exe approach below.

Thanks to the instructions for WSL 2 of the wsl-ssh-agent project, KeeAgent works great in WSL 2 now: https://github.com/rupor-github/wsl-ssh-agent#wsl-2-compatibility The approach uses minimal and well-maintained tools.

Mini-changelog

  • 14.08.2025: Improve: Improve title of this gist.
@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

@strarsis
strarsis / service-workers.md
Created February 11, 2025 22:08 — forked from Rich-Harris/service-workers.md
Stuff I wish I'd known sooner about service workers

Stuff I wish I'd known sooner about service workers

I recently had several days of extremely frustrating experiences with service workers. Here are a few things I've since learned which would have made my life much easier but which isn't particularly obvious from most of the blog posts and videos I've seen.

I'll add to this list over time – suggested additions welcome in the comments or via twitter.com/rich_harris.

Use Canary for development instead of Chrome stable

Chrome 51 has some pretty wild behaviour related to console.log in service workers. Canary doesn't, and it has a load of really good service worker related stuff in devtools.

@strarsis
strarsis / git-overwrite-branch.sh
Created August 15, 2024 21:12 — forked from ummahusla/git-overwrite-branch.sh
Git overwrite branch with another branch
# overwrite master with contents of feature branch (feature > master)
git checkout feature # source name
git merge -s ours master # target name
git checkout master # target name
git merge feature # source name
@strarsis
strarsis / Directory_Prompts_WT_Uninstall.reg
Created June 24, 2024 10:52 — forked from OmegaRogue/Directory_Prompts_WT_Uninstall.reg
Registry script to add windows terminal with cmd, powershell and ubuntu profiles to the explorer context menu with normal and admin permissions. To use, replace <Username> with your username
Windows Registry Editor Version 5.00
; Windows terminal
[-HKEY_CLASSES_ROOT\Directory\shell\MenuWindowsTerminal]
[-HKEY_CLASSES_ROOT\Directory\background\shell\MenuWindowsTerminal]
[-HKEY_CLASSES_ROOT\Directory\LibraryFolder\shell\MenuWindowsTerminal]
@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 / chainfilters-test.svg
Created September 23, 2023 21:41
Firefox chainFilters test SVG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@strarsis
strarsis / docker-on-wsl-windows-10-home-docker-toolbox.md
Last active September 4, 2023 07:29
Notes about Docker on WSL (Windows 10 Home / Docker Toolbox) (Virtualbox instead Hyper-V)

Edit (September 2020):

@strarsis
strarsis / functions.php
Created April 13, 2023 14:06 — forked from yanknudtskov/functions.php
Example on how to meta query ACF repeater fields
<?php
add_shortcode( 'user_company_link', 'yanco_user_company_link' );
function yanco_user_company_link() {
if( ! is_user_logged_in() ) {
return;
}
$html = '';
@strarsis
strarsis / 50-cloud-init.yml
Last active February 13, 2023 19:30
Hetzner Cloud netplan configuration for IPv4+IPv6 (Dual Stack)
# /etc/netplan/50-cloud-init.yml
# Ensure that other netplan config yml files in /etc/netplan/ don't interfere with this configuration
network:
version: 2
renderer: networkd
ethernets:
ens3: # (Primary interface, usually ens3 or ens33 on recent Ubuntus)
addresses:
- <Hetzner instance IP4>/32