Skip to content

Instantly share code, notes, and snippets.

@5310
5310 / !.md
Last active June 24, 2024 15:24
Keychron K2 Pro Via config, 2024-06-24 #script

My first custom profile for the Keychron K2 Pro. Configured with and saved from Via.

  • 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 July 2, 2024 12:18
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 set up and working!
@5310
5310 / style.css
Created May 7, 2024 13:01
Custom stylesheet for LYV VDO.ninja layout #userstyle
#gridlayout .container_holder_video {
video {
border-radius: 0.75rem;
}
.video-label {
font-size: 2rem;
font-weight: bolder;
padding-inline: 1ch;
border-radius: 0.75rem;
opacity: 50%;
@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
@5310
5310 / retarget-symlinks.sh
Created September 4, 2023 08:39
Retarget absolute local symlinks for old mountpoint into relative symlinks #script
@5310
5310 / 1.bqn
Last active December 25, 2022 15:12
Learning BQN with Project Euler
# Euler 1 expression
+´ ×⟜(∨´ 0 = 3‿5 | ⊢)¨ ↕100
# Euler 1 operator
_comb_ ← {𝕩 𝔽 𝕨 𝔾 𝕩}
3‿5 +´∘×_comb_(∨˝ (0 = |⌜)) ↕100
@5310
5310 / code.md
Last active October 21, 2021 14:33
Tabula serialization mocks
type variables
worker
x
number
const f(x): Math.floor(Math.random()*x)