Skip to content

Instantly share code, notes, and snippets.

@5310
5310 / nix-home-manager-update.sh
Last active March 14, 2025 18:25
Script to update and clean-up after Home-manager, because it can't be bothered to #script
#!/bin/bash
# update nix and home-manager
nix flake update --flake ~/.config/home-manager/
home-manager switch
# cleanup nix
home-manager expire-generations -1days
nix-collect-garbage -d
nix store optimise
@5310
5310 / _heliboard-layouts-bn
Last active March 1, 2025 13:43
Heliboard Bengali layouts #dotfiles
- oni
- bornanukromik
A simple reorganiation of the Bengali script in conventional "alphabetical" order
- bornanukromik_matrapurbok
Modifies the vowels to input their mark forms on tap, and phonemic forms on hold.
- scio
- qwertylike
Tries to conform to a conventional Latin QWERTY layout as much as possible, with some choice exceptions.
@5310
5310 / userscript.js
Last active February 18, 2025 18:25
Use Fira Code for code-blocks on Workflowy #userscript
// ==UserScript==
// @name Workflowy Code to Fira Code
// @version 2025-02-18
// @description Uses Fira Code (or the Nerd Font variant) for all inline code or code-block entries on Workflowy
// @author 5310
// @match https://workflowy.com/
// @icon https://www.google.com/s2/favicons?sz=64&domain=workflowy.com
// @grant none
// @license MIT
// ==/UserScript==
@5310
5310 / _twitch-player-w-chat
Last active September 3, 2024 12:50
Twitch Player + Chat #web
A simple page that loads both the Twitch.tv player and the chat window following their embedding API, so it actually works when embedded.
@5310
5310 / _keychron-k2-pro-2024-06-24
Last active September 3, 2024 12:27
Keychron K2 Pro Via config, 2024-06-24 #script
My first custom profile for the Keychron K2 Pro. Configured with and saved from [Via](https://usevia.app/).
- Still uses the out of the box "Mac/Win" layer allocation
- Layers 0 and 1, dead to me
- Layers 2 is the default
- Layers 3 is the `fn` overlay
- `del` is `insert`
- `ralt` and `,./kl;iop` are numpad digits
- `↑←↓→` keys move the mouse
- `enter` is click
@5310
5310 / _nixpkgs+home-manager+flakes
Last active April 17, 2025 15:35
Fledgling Nixpkgs config using Flakes and Home Manager #dotfiles
- Installed using the [Determinate Systems Installer](https://github.com/DeterminateSystems/nix-installer)
- Specifically for the Steam Deck using the `deck` profile: `... install steam-deck`
- [NixGL](https://github.com/nix-community/home-manager/blob/master/docs/manual/usage/gpu-non-nixos.md) set up and working!
- Now a module included with Home Manager
- But the wrappers still need to be used with installed packages
@5310
5310 / README.md
Last active June 10, 2024 21:11
Install Packet Tracer inside Distrobox #article

On the host, make an Ubuntu toolbox container. Stock Ubuntu would probably work as well.

distrobox create -Y -i quay.io/toolbx/ubuntu-toolbox:22.04 -n packettracer

Then enter the container and install things.

# On the host
@5310
5310 / test-rocm.py
Last active March 15, 2024 13:04 — forked from damico/test-rocm.py
Script for testing PyTorch support with AMD GPUs using ROCM
import torch, grp, pwd, os, subprocess
devices = []
try:
print("\n\nChecking ROCM support...")
result = subprocess.run(['rocminfo'], stdout=subprocess.PIPE)
cmd_str = result.stdout.decode('utf-8')
cmd_split = cmd_str.split('Agent ')
for part in cmd_split:
item_single = part[0:1]
item_double = part[0:2]
@5310
5310 / minimal.sh
Last active March 10, 2024 01:53
ComfyUI provisioning scripts #script
#!/bin/bash
NODES=(
"https://github.com/ltdrdata/ComfyUI-Manager"
)
CHECKPOINT_MODELS=(
# "https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main/v1-5-pruned-emaonly.ckpt"
# "https://huggingface.co/stabilityai/stable-diffusion-2-1/resolve/main/v2-1_768-ema-pruned.ckpt"
# "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/resolve/main/sd_xl_base_1.0.safetensors"
@5310
5310 / find-broken-symlinks.sh
Created September 4, 2023 08:56
Find all the broken symlinks #script