Skip to content

Instantly share code, notes, and snippets.

@AW-Britt
AW-Britt / restore_file_exists_method.rb
Created June 5, 2025 05:48
Workaround vagrant-vbguest plugin fail due to NoSuchMethod error on `File.exists?`
# Place this blurb at the top of your Vagrantfile to allow the unpatched
# version of the Vagrant vagrant-vbguest plugin to properly execute
# in newer Ruby environments where File.exists is no longer supported
#
# Extend the Ruby File class to restore the deprecated exists method
# calls File.exist instead
unless File.respond_to?(:exists?)
class << File
def exists?(path)
warn "File.exists? is deprecated; use File.exist? instead." unless ENV['SUPPRESS_FILE_EXISTS_WARNING']
@demurky
demurky / openssl-ed25519-certs.md
Last active September 15, 2025 15:57
Creating Self-Signed ED25519 CA and Certificates

Creating Self-Signed ED25519 CA and Certificates

IMPORTANT: the Common Name (CN) of the servers should be different from that of the CA. Otherwise, things won't work on servers that use OpenSSL.

CA

openssl genpkey -algorithm ed25519 &gt; ca-key.pem
@demurky
demurky / doh-servers.sh
Created December 21, 2024 21:02
Script that returns a list of DNS-over-HTTPS servers that are accessible directly via IP address.
#!/bin/bash
set -eu -o pipefail
# Script that returns a list of DNS-over-HTTPS servers that are accessible directly via IP address.
# https://dnscrypt.info/public-servers
# https://dnscrypt.info/stamps-specifications
main()
{
VERBOSE=false
@ADIOP55550
ADIOP55550 / .ideavimrc
Last active December 23, 2025 22:24
Helix-like config for IdeaVim
" Based on comment by mchlstckl
" https://www.reddit.com/r/HelixEditor/comments/14aqztf/comment/jocslxs/
" Check the history of this gist for a changelist
" Read NOTES and WARNINGS lower
" Must be done first to tell other plugins that <space> is the leader key
let mapleader=" "
# Created 2024-04-23 Tue 15:20
#+title: Lets Learn Emacs Lisp
#+author: Gavin Jaeger-Freeborn
* Emacs terminology
[[https://sachachua.com/blog/wp-content/uploads/2013/05/How-to-Learn-Emacs-v2-Large.png][How to Learn Emacs]]
- buffer :: The area containing text kinda like a *tab in a browser*
- point :: The *cursor*
- window :: A section of the emacs window containing text
@shafzhr
shafzhr / create_pipe.sh
Created February 11, 2021 10:26
Create a virtual mic and pipe audio to it
pactl load-module module-pipe-source source_name=virtmic file=/tmp/virtmic format=s16le rate=16000 channels=1
ffmpeg -re -i input.mp3 -f s16le -ar 16000 -ac 1 - > /tmp/virtmic
@probonopd
probonopd / Wayland.md
Last active January 9, 2026 08:56
Think twice about Wayland. It breaks everything!

Think twice before abandoning X11. Wayland breaks everything!

tl;dr: Wayland is not "the future", it is merely an incompatible alternative to the established standard with a different set of priorities and goals.

Wayland breaks everything! It is binary incompatible, provides no clear transition path with 1:1 replacements for everything in X11, and is even philosophically incompatible with X11. Hence, if you are interested in existing applications to "just work" without the need for adjustments, then you may be better off avoiding Wayland.

Wayland solves no issues I have but breaks almost everything I need. Even the most basic, most simple things (like xkill) - in this case with no obvious replacement. And usually it stays broken, because the Wayland folks mostly seem to care about Automotive, Gnome, maybe KDE - and alienating e

@crazyboycjr
crazyboycjr / 71-k380-keyboard.rules
Created May 1, 2020 13:24
running xset in udev.rules
# /etc/udev/rules.d/71-k380-keyboard.rules
ACTION=="add", KERNEL=="hidraw[0-9]*", RUN+="/usr/bin/su cjr -c \"DISPLAY=:1 XAUTHORITY=/home/cjr/.Xauthority xset r rate 200 36\""
ACTION=="add", KERNEL=="hidraw[0-9]*", RUN+="/usr/bin/su cjr -c \"DISPLAY=:1 XAUTHORITY=/home/cjr/.Xauthority setxkbmap -option 'ctrl:nocaps'\""
@eguyd
eguyd / nslookup.sh
Created September 23, 2019 02:00
10 most used Nslookup commands
#!/usr/bin/env bash
1. How to find the A record of а domain.
Command line:
$ nslookup example.com
2. How to check the NS records of a domain.
Command line:
$nslookup -type=ns example.com

VimWiki Cheatsheet

[number] refers to the wiki number, set by the order in your vimrc. The default is 1.

Wiki Management

  • [number] <leader> ww - open wiki index file
  • [number] <leader> wt - open wiki index file in new tab
  • <leader> ws - list and select available wikis
  • wd - delete wiki page