Skip to content

Instantly share code, notes, and snippets.

View notDavid's full-sized avatar

David notDavid

  • Netherlands
View GitHub Profile
notDavid / preventKeyboardShortcutHijacking-user.js
Last active January 19, 2024 20:17
A userscript to prevent websites from hijacking browser keyboard shortcuts
// ==UserScript==
// @name Prevent keyboard shortcut hijacking
// @description Prevent websites to hijack keyboard shortcuts, for example <Ctrl+F> on Discourse
// @namespace Violentmonkey Scripts
// @match *://*/*
// @grant none
// @version 1.0
// @author notDavid
// ==/UserScript==
notDavid /
Created May 12, 2022 21:56 — forked from tmo1/
Nextcloud behind Caddy as a reverse proxy, using Docker


This is a guide to deploying Nextcloud behind a Caddy reverse proxy, both running in Docker containers (an official Nextcloud one and a caddy-docker-proxy one), with the goal of implementing as much as possible via docker-compose files. This is much more difficult than it should be, for a variety of reasons:

  • As with Docker versions of software in general, documentation of the software does not always apply to the Docker versions, and the Docker documentation does not always include the Docker equivalent ways of doing things.

  • Docker images do not always expose the desired configuration knobs of the underlying software.

  • Nextcloud requires special configuration to run correctly behind a reverse proxy (and again, some of the instructions for this configuration requires modification for

notDavid /
Created October 26, 2021 09:29 — forked from Jorijn/
This is the script I use to backup my macbook to a borgbackup repository. It should be a drop-in script and suit most users just fine, but I do recommend looking at the values and making them fit for your specific situation.
# Setting this, so the repo does not need to be given on the commandline:
export BORG_REPO='*******'
# Setting this, so you won't be asked for your repository passphrase:
export BORG_PASSPHRASE='*******'
# some helpers and error handling:
function info () { echo -e "\n"`date` $@"\n" >&2; }