Skip to content

Instantly share code, notes, and snippets.

@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 April 11, 2024 15:08
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)
@5310
5310 / setup-shared-audio.sh
Created February 21, 2021 15:53
Setup Pulseaudio modules to merge a mic and an application for input #script
# Enter your input and output device names here
source=bluez_source.98_09_CF_F3_12_0F.headset_head_unit
sink=bluez_sink.98_09_CF_F3_12_0F.headset_head_unit
# Module names
sharednull=shared-null-sink
sharedsink=shared-sink
sharedsource=shared-source
# Cleanup devices left over from prior runs
@5310
5310 / eslintrc.js
Last active February 16, 2020 06:31
ESLint config #dotfile
// NOTE: Because common sense is in short supply,
// and now that ESLint v6 can't resolve external configs to extend
// (but can be persuaded to load plugins; not configs),
// the following code is necessary for my setup.
// Credit: https://github.com/eslint/eslint/issues/11914#issuecomment-569108633
const Module = require('module')
const ModuleFindPath = Module._findPath
Module._findPath = (request, paths, isMain) => {
const r = ModuleFindPath(request, paths, isMain)
if (!r) {