Skip to content

Instantly share code, notes, and snippets.

View 573's full-sized avatar

Daniel Kahlenberg 573

View GitHub Profile
@573
573 / README.md
Created January 10, 2026 09:45 — forked from olavocarvalho/README.md
glowm - Glow wrapper with mermaid-ascii support for rendering diagrams in terminal

glowm

A wrapper for glow that renders mermaid diagrams as ASCII art using mermaid-ascii.

demo

Installation

  1. Install dependencies:

Patching the Dynamic Linker/Loader of a Compiled Binary using patchelf

Given a foreign binary on a Nix system, you have to patch its dynamic linker/loader.

First you need to find out what linker/loader to use.

You can do this by going into your nix repl and loading your desired nixpkgs.

Then you run:

@573
573 / Hyper-V GPU-PV with Linux guest.md
Created September 25, 2025 08:39 — forked from krzys-h/Hyper-V GPU-PV with Linux guest.md
Ubuntu 21.04 VM with GPU acceleration under Hyper-V...?

Ubuntu 21.04 VM with GPU acceleration under Hyper-V...?

Modern versions of Windows support GPU paravirtualization in Hyper-V with normal consumer graphics cards. This is used e.g. for graphics acceleration in Windows Sandbox, as well as WSLg. In some cases, it may be useful to create a normal VM with GPU acceleration using this feature, but this is not officially supported. People already figured out how to do it with Windows guests though, so why not do the same with Linux? It should be easy given that WSLg is open source and reasonably well documented, right?

Well... not quite. I managed to get it to run... but not well.

How to do it?

  1. Verify driver support
@573
573 / Cargo.toml
Created August 27, 2025 18:12 — forked from gsquire/Cargo.toml
Export your Pocket CSV to a NETSCAPE bookmark file that linkhut can import
[package]
name = "pocket2linkhut"
version = "0.1.0"
edition = "2024"
[dependencies]
anyhow = "1.0"
argh = "0.1"
csv = "1.3"
serde = { version = "1.0", features = ["derive"] }
@573
573 / .gitignore
Created August 24, 2025 07:58 — forked from wenkokke/.gitignore
Code to print out all voice commands in the knausj talon repository,
cheatsheet.tex
*.aux
*.fls
*.log
*.synctex.gz
*.fdb_latexmk
*.lot

A sensible NixOS Xfce Configuration

NixOS provides good support for the Xfce desktop environment out-of-the-box, but the defaults are minimal. The files in this Gist provide a more complete experience, including a suite of basic software and plugins as well as an optional home-manager configuration for theming.

The key additions to the default Xfce provided by NixOS are:

  • Complete bluetooth / audio support with panel indicators and apps
  • LightDM with theme
  • Extra Xfce apps for calendaring, disk partitioning, etc.
  • Various quality-of-life improving non-essentials
@573
573 / .emacs
Created May 8, 2025 09:48 — forked from amygrinn/.emacs
Autoshare -> Tasker -> Termux -> Org Protocol -> Org Capture
;; Required setup for emacs init file
(package-initialize)
(require 'org)
(require 'org-protocol)
;; Set 'my-org-directory' to the base directory of all of
;; your org files (with a trailing slash). For me it's:
(setq my-org-directory "/scp:org:/home/orgmode/")
;; But it could be a local directory for you
@573
573 / mkenv.sh
Created September 30, 2024 13:00 — forked from yihuang/mkenv.sh
build nix shell from python requirements.txt
# build python nix shell from a local `./requirements.txt`
mkdir ./env
cat > ./env/flake.nix << 'EOF'
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
poetry2nix = {
url = "github:nix-community/poetry2nix";
inputs.nixpkgs.follows = "nixpkgs";
@573
573 / yubikey+gpupgp+ssh_howto.md
Created September 19, 2024 14:54 — forked from xirkus/yubikey+gpupgp+ssh_howto.md
Security Adventures 1. How to get yubikey+gpg+ssh+gitbhub working on MacOS

I've spent the day trying to get this setup working with GitHub and given the number of gotcha's I encountered, it seemed like a good idea to document how I finally got this working with as few hacks as possible. There's a lot of documentation out there (some of it old and misleading) and committing here for posterity will help me remember this when I inevitably need to do this again.

Rationale

Passwords are simply not enough these days. Regardless of the company, breaches (and the associated Personally Identifiable Information harvested) are a matter of not if, but when. There are a number of things you can do to protect yourself, but being on the tin-foil-hat side of paranoia, means there are a few Commandents that I adhere to (and recommend for other folks)[Insert link to Fight Club Rules for the Secure Internet].

That being said, if you use 2-factor authentication and have committed to using a hardware token such as the Yubikey, then you're already ahead of the curve. The problem is that wh