Skip to content

Instantly share code, notes, and snippets.

@felixr
felixr / LenovoL13YogaGen2.json
Created January 20, 2024 17:45
Lenovo L13 Yoga Gen2 nbfc config
{
"NotebookModel": "LENOVO 20R4001CBR",
"Author": "Rafaelti",
"EcPollInterval": 2000,
"ReadWriteWords": false,
"CriticalTemperature": 92,
"FanConfigurations": [
{
"ReadRegister": 149,
"WriteRegister": 148,
@felixr
felixr / compression_puzzle.uiua
Last active July 19, 2024 21:36
compression puzzle in uiua
https://www.uiua.org/pad?src=0_12_0-dev_2__8J-UoiDihpAg4oqCwrDii5XiipniiqLiirjip7sK8J-XnO-4jyDihpAg4pmt4oi14peH8J-UouKKnOKWoeKKuC1AIAriiY0iM0EyQjJBMUMi8J-XnO-4jyJBQUFCQkFBQyIK
🔢 ← ⊂°⋕⊙⊢⊸⧻
🗜️ ← ♭∵◇🔢⊜□⊸-@
≍"3A2B2A1C"🗜️"AAABBAAC"
@felixr
felixr / gist:936d4b43e26502396a15f2b2f1a67178
Last active March 28, 2025 21:43
bash: run multiple commands and show last line of output
#!/bin/bash
TMPDIR="$(mktemp -d)"
cmd_status() {
local pid=$1
local cmd=$2
local log=$3
if ps h ${PIDS[$cmd_idx]} > /dev/null; then
echo -e "› \033[32m${cmd}\033[0m"
@felixr
felixr / LuaFormatter.md
Last active October 18, 2025 17:29
Lua formatter for silverbullet

Lua Formatter

lua_formatter = lua_formatter or { initDone = false }

-- Not using @johnnymorganz/[email protected]/stylua.web/stylua_lib.js
-- because of https://github.com/JohnnyMorganz/StyLua/issues/999
@felixr
felixr / guide.md
Created April 3, 2026 12:30
Vimium-C guide

My guide to Vimium-C

  • match CSS selector to match elements
    • e.g. map X LinkHints.activate match="li" to hint all
    • elements.
  • clickable CSS selector to match clickable elements
    • e.g. map X LinkHints.activate clickable="li" will add all <li> elements to the set of clickable elements and show hints on the clickable elements. The difference to match is that it extends the default logic for finding clickable elements and it does not replace it.
  • clickableOnHost per-host clickable settings
    • This allows you to set clickable to different values depending on the current host.