Skip to content

Instantly share code, notes, and snippets.

Arch Linux ARM on Crostini

Screenshot

I got Arch Linux ARM installed on a Lenovo Chromebook Duet! I mostly used the instructions from the Arch Wiki as reference.

0. Before we begin

@storopoli
storopoli / 9barista_coffee.md
Created December 28, 2021 22:07
9Barista Coffee

9Barista Coffee

  1. 120mL Water
  2. 18g Coffee
  3. Tamping — firm push downwards — around 5kg of force is enough
  4. Medium to High Heat — closest to 3in in diameter
  5. Expresso should be 35-40mL
  6. Pour your espresso straight away

Grinder

@qguv
qguv / vscode-wayland.md
Last active June 13, 2025 12:07
Visual Studio Code: Enable native Wayland support

Native wayland support is now working consistently for me in VSCode, giving much better text rendering. Unfortunately, it's still hidden behind some command-line flags.

By adding some files to /usr/local/*, you can ensure that VSCode always launches with these flags.

Adding launch flags to VSCode

Assuming that the VSCode launcher is /usr/bin/code-oss (as is the case in Arch):

  1. Create /usr/local/bin/code-oss with the following content:
@jpsamaroo
jpsamaroo / ffmpeg-cut.jl
Created July 7, 2022 20:40
FFMPEG Cutting Script - in Julia
#!/usr/bin/env julia
function ts_to_s(ts::AbstractString)
secs = tryparse(Float64, ts)
if secs !== nothing
return secs
end
hours, mins, secs = parse.(Float64, split(ts, ':'))
return (hours * 60 * 60) + (mins * 60) + secs
end
@daemonhorn
daemonhorn / freebsd_yubikey_authentication.md
Last active July 26, 2025 22:23
Setting up yubikey/solo2 for piv, fido, and gpg on FreeBSD (Firefox, Chromium, PAM, SSH, and GnuPG)

Overview

How to configure FreeBSD and applicable applications to work with Yubikey for authentication. This serves as my work-in-progress documentation of the configuration knobs needed to make this work properly.

  • FreeBSD ssh with piv smartcard slot on Yubikey (pkcs11 via libykcs11.so)
  • FreeBSD ssh with fido support on Yubikey
  • FreeBSD Firefox/Chromium with fido + webauthn support on Yubikey
  • FreeBSD local console and gdm authentication using pam on Yubikey
  • FreeBSD official YubiKey tools

Latest Tested FreeBSD versions

  • FreeBSD 13.2 Testing (Aug 2023)
  • FreeBSD stable/13 Testing (Aug 2023) with OpenSSH_9.3p2
#!/usr/bin/env bash
set -e # Exit on error
if [ "$EUID" -ne 0 ]; then
echo "To ensure correct permissions, this script must be run as root."
exit 1
fi
install_location="/var/lib/safing-portmaster" # Must not include trailing slash
#! /usr/bin/env bash
usage() {
echo "
Bind/unbind a USB device from a given vendor:product id
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-d|--dry-run] [--hdmi|microsd|usba|ssd250] [--detect=deviceid:vendorid] [on|off]
Example usage: $(basename "${BASH_SOURCE[0]}") --hdmi off
Example usage: $(basename "${BASH_SOURCE[0]}") --detect=27c6:609c
" >&2
@yzdbg
yzdbg / auto-dr.md
Last active November 3, 2023 17:11

Automating Daily Reports, because fuck it, really...

Each day at our company, developers are required to document their activities, painstakingly jotting down their daily work and future plans. A monotonous chore that I just really dislike.

So now, there's a scribe for that :

auto-dr-

Code

@dangovorenefekt
dangovorenefekt / blockmetatwitter.md
Last active January 14, 2025 22:25
Block Meta and Twitter (nginx)
@RobinLinus
RobinLinus / covenants_cat_ecdsa.md
Last active January 30, 2025 12:44
Emulate covenants using only OP_CAT and ECDSA signatures

Covenants with CAT and ECDSA

In his article, CAT and Schnorr Tricks I, Andrew Poelstra showed how to emulate OP_CHECKSIGFROMSTACK-like covenants using only OP_CATand Schnorr signatures.

Here, we show that a similar trick is possible to emulate covenants using only OP_CAT and ECDSA signatures.

The High-Level Idea

Recall the ECDSA Signature Equation