Skip to content

Instantly share code, notes, and snippets.

View Ciantic's full-sized avatar

Jari Pennanen Ciantic

View GitHub Profile
// Please find the full, tested version in
// https://github.com/influxdata/influxdb_iox/blob/fe155e15fb2ad166aee66b0458e63c24a8128dd4/query/src/exec/task.rs#L101-L118
pub struct DedicatedExecutor {
state: Arc<Mutex<State>>,
}
/// Runs futures (and any `tasks` that are `tokio::task::spawned` by
/// them) on a separate Tokio Executor
struct State {
@mallardduck
mallardduck / script.sh
Last active January 14, 2025 19:09
How to unpack and modify/customize the initrd (using zstd compression)
export LANG=C
TMP=`mktemp -d`
umask 022
mkdir -p $TMP/earlycpio
mkdir $TMP/initramfs
umask 077
cd $TMP/earlycpio
import {extname} from 'path'
import {build, stop} from 'esbuild'
import {solidPlugin} from 'esbuild-plugin-solid'
import {denoPlugin} from 'esbuild_deno_loader'
const [input] = Deno.args
const ext = extname(input)
const compileOutput = input.replace(ext, '.compiled.js')
const bundleOutput = input.replace(ext, '.bundle.js')
@matthiasr
matthiasr / gpg_wsl2.md
Last active March 30, 2025 10:58
GPG signing with full gpg-agent support in WSL2: the easy way

Problem statement

Signing with GPG in Windows System for Linux (WSL2) does not work smoothly out of the box. Notably, when using a TTY-based pinentry, signing in Visual Studio Code does not work at all.

Solution

  1. Install Gpg4Win: winget install -e GnuPG.Gpg4win or download and install manually
  2. Start Kleopatra and generate or import keys
  3. Insert links to gpg.exe inside of WSL: