Skip to content

Instantly share code, notes, and snippets.

View fusion809's full-sized avatar
💭
I may be slow to respond.

Brenton Horne fusion809

💭
I may be slow to respond.
View GitHub Profile
#!/usr/bin/env bash
# Capture all available commands
commlist=$(compgen -c | sort -u | xargs -n 100 brl which 2>/dev/null)
nocomm=$(echo "$commlist" | tr ' ' '\n' | wc -l)
# Run calculation in R
function Rcalc {
out=$(R -q -e "$1")
echo "$out" | head -n 2 | tail -n 1 | sed -E 's/^\[1\]\s//g'
}
@fusion809
fusion809 / command-analyse-bedrock.sh
Created February 8, 2026 12:15
Generalized script for displaying the percentage of commands provided by each stratum under Bedrock.
commlist=$(compgen -c | sort -u | xargs -n 100 brl which 2>/dev/null)
nocomm=$(echo $commlist | tr ' ' '\n' | wc -l)
function Rcalc {
out=$(R -q -e "$1")
echo "$out" | head -n 2 | tail -n 1 | sed -E 's/^\[1\]\s//g'
}
stratList=$(brl list | grep -v bedrock; echo global;)
stratList=$(echo $stratList | tr ' ' '\n' | sort -u)
commlist=$(compgen -c | sort -u | xargs -n 100 brl which 2>/dev/null)
nocomm=$(echo $commlist | tr ' ' '\n' | wc -l)
function Rcalc {
R -q -e "$1" | head -n 2 | tail -n 1 | sed -E 's/^\[1\]\s//g'
}
stratList=$(brl list | grep -v bedrock; echo global;)
stratList=$(echo $stratList | tr ' ' '\n' | sort -u)
echo $stratList | tr ' ' '\n' | while read -r s; do
@fusion809
fusion809 / journalctl-xe-b-1.log
Created November 20, 2025 10:12
Output of `journalctl -xe -b -1` on NixOS 25.05 system in which GUI wasn't starting and agetty terminals were not accessible.
Nov 20 19:21:01 nixos xserver-wrapper[1674]: (++) from command line, (!!) notice, (II) informational,
Nov 20 19:21:01 nixos xserver-wrapper[1674]: (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
Nov 20 19:21:01 nixos xserver-wrapper[1674]: (++) Log file: "/dev/null", Time: Thu Nov 20 19:21:01 2025
Nov 20 19:21:01 nixos xserver-wrapper[1674]: (++) Using config file: "/nix/store/bclaji8yziq12w970m583iwb967dmf2w-xserver.conf"
Nov 20 19:21:01 nixos xserver-wrapper[1674]: (==) Using config directory: "/etc/X11/xorg.conf.d"
Nov 20 19:21:01 nixos xserver-wrapper[1674]: (==) Using system config directory "/nix/store/9cw3i2572j11ly85m67d9rh5idpyz0ki-xorg-server-21.1.18/share/X11/xorg.conf.d"
Nov 20 19:21:01 nixos xserver-wrapper[1674]: (==) ServerLayout "Layout[all]"
Nov 20 19:21:01 nixos xserver-wrapper[1674]: (**) |-->Screen "Screen-nvidia[0]" (0)
Nov 20 19:21:01 nixos xserver-wrapper[1674]: (**) | |-->Monitor "<default monitor>"
Nov 20 19:21:01 nixos xserver-wrapper[1674]: (**) | |
00:00:01.176643 VirtualBox VM 7.1.12 r169651 linux.amd64 (Jul 14 2025 12:42:24) release log
00:00:01.176645 Log opened 2025-10-26T16:38:07.262390000Z
00:00:01.176645 Build Type: release
00:00:01.176647 OS Product: Linux
00:00:01.176648 OS Release: 6.17.4
00:00:01.176649 OS Version: #1-NixOS SMP PREEMPT_DYNAMIC Sun Oct 19 14:37:45 UTC 2025
00:00:01.176675 DMI Product Name: MS-7B90
00:00:01.176686 DMI Product Version: 1.0
00:00:01.176692 Firmware type: UEFI
00:00:01.177233 Secure Boot: Disabled
@fusion809
fusion809 / wayland-compositors
Last active October 18, 2025 11:59
List Wayland compositors available on Arch Linux
#!/bin/zsh
function list {
yay -Ss "ayland" | grep -v "compositors" | grep -B 1 -i "[Cc]ompositor" | grep -v "\-\-" | sed -e '/-git/{N;d}' | sed -e 'N;/library/D' | sed -e 'N;/a [wW]ayland/D' | sed -e 'N;/Binary space partitioned layout/D' | sed -e 'N;/test/D' | sed -e '/-utils/{N;d}' | sed -e '/greenisland/{N;d}' | sed -e '/stacktile/{N;d}' | sed -e '/-dock/{N;d}' | sed -e '/swaylock/{N;d}' | sed -e '/Orphaned/{N;d}'
}
function pkg_line {
list | sed '0~2d'
}
function pkg_name {
line 92: Package catchfile Error: File `"Lecture notes".w18' not found. \CatchFileDef\@tempa{\ip@file}{}
line 94: Argument of \zap@space has an extra }. ...empa{\expandafter\zap@space\@tempa\@empty}
line 94: Paragraph ended before \zap@space was complete. ...empa{\expandafter\zap@space\@tempa\@empty}
line 104: Paragraph ended before \ip@only@six was complete. ...ef\@tempc{\expandafter\ip@only@six\@tempa
line 104: Undefined control sequence. ...expandafter\ip@only@six\@tempa------\@nil
line 81: Hyper reference `sec:system' on page 3 undefined
: There were undefined references.
This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020/Arch Linux) (preloaded format=pdflatex 2020.8.26) 22 SEP 2020 19:28
entering extended mode
\write18 enabled.
%&-line parsing enabled.
**"Lecture notes.tex"
(./Lecture notes.tex
LaTeX2e <2020-02-02> patch level 5
L3 programming layer <2020-06-03>
(/usr/share/texmf-dist/tex/latex/base/article.cls
Document Class: article 2019/12/20 v1.4l Standard LaTeX document class
execve("/data/data/com.termux/files/usr/bin/julia", ["julia"], 0x7fc1b2ea50 /* 28 vars */) = 0
getpid() = 9890
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x716a43b000
set_tid_address(0x716a559ee0) = 9890
faccessat(AT_FDCWD, "/dev/urandom", R_OK) = 0
futex(0x716a556040, FUTEX_WAKE_PRIVATE, 2147483647) = 0
getrandom("\x18\x54\xcd\xbf\x6e\xfe\x69\xef\xcf\x2a\x0b\x32\x0e\x3b\x84\x2c\xc2\x33\x6e\x2e\xcb\x8f\x9f\x52\x42\xe5\xd3\xbf\xdb\x61\x15\x2d"..., 40, GRND_NONBLOCK) = 40
mmap(NULL, 1104, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x716a43a000
prctl(PR_SET_VMA, PR_SET_VMA_ANON_NAME, 0x716a43a000, 1104, "arc4random data") = 0
sched_getscheduler(0) = 0 (SCHED_OTHER)
/nix/var/nix/profiles/default-2-link -> /nix/store/57904rflsfh46y7fxi62rzc7sidc9vmq-user-environment
/nix/var/nix/profiles/per-user/fusion809/channels-174-link -> /nix/store/kldb0bm5vkyhagmyi7sjqzwjd0wqhhd1-user-environment
/nix/var/nix/profiles/per-user/fusion809/profile-678-link -> /nix/store/xrvygpld6bkvhj05w2f72jyxfv5gwkgg-user-environment
/nix/var/nix/profiles/per-user/root/channels-124-link -> /nix/store/jwrh0v9dpmpffx1xymwy89grkqy6in41-user-environment
/nix/var/nix/profiles/per-user/root/channels-125-link -> /nix/store/cpa3mfrj9cdph2mzzb77a5jbis10r0kd-user-environment
/nix/var/nix/profiles/per-user/root/channels-126-link -> /nix/store/kqw05mbr4is2yqxm7fc64pc5nqlcwwri-user-environment
/nix/var/nix/profiles/per-user/root/channels-127-link -> /nix/store/mq0xyfh4r21fazg6wa89g14bx2m1mpy6-user-environment
/nix/var/nix/profiles/per-user/root/channels-128-link -> /nix/store/5s2q37a0375w0j0q6sv4v7lvr3yypaf9-user-environment
/nix/var/nix/profiles/per-user/root/channels-129-link -> /nix/store/6qhy5fpy9rksbh6c9v4q