Skip to content

Instantly share code, notes, and snippets.

@bbb651
bbb651 / config.fish
Last active February 16, 2025 23:29
Niri + Fish terminal xdg activation
function xdg_activation --on-event fish_preexec
set -l tmpdir /tmp
set -q TMPDIR
and set tmpdir $TMPDIR
set filename (mktemp -u $tmpdir/.xdg-activation.XXXXXXXXXX)
command mkfifo $filename
niri msg action spawn -- sh -c "echo \$XDG_ACTIVATION_TOKEN > $filename" &
set -gx XDG_ACTIVATION_TOKEN (cat $filename)
command rm $filename
end
@bbb651
bbb651 / config.kdl
Last active December 4, 2025 19:57
Niri Window Switcher
binds {
Alt+Tab { spawn "~/.config/niri/switcher.sh"; }
}
@bbb651
bbb651 / pxu.ts
Created May 8, 2024 14:14
Line by line translation of thisismypassword's Picotron pxu decoder from python to typescript
class CursorView {
private data: DataView
private cursor: number = 0
constructor(data: DataView) {
this.data = data;
}
getUint8() { return this.data.getUint8((this.cursor += 1) - 1); }
getUint16() { return this.data.getUint16((this.cursor += 2) - 2, true); }
@bbb651
bbb651 / README.md
Created May 2, 2024 13:44
Picotron Cursors

Default default

Crosshair crosshair

Grab grab

Grabbing

@bbb651
bbb651 / readme.txt
Last active March 23, 2024 22:56
Sokogram (PuzzleScript Script)
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
@bbb651
bbb651 / readme.txt
Last active February 7, 2024 09:23
Nabokos (PuzzleScript Script)
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
@bbb651
bbb651 / readme.txt
Last active January 28, 2024 07:09
Wiggler's Junkyard (PuzzleScript Script)
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
@bbb651
bbb651 / readme.txt
Created January 2, 2024 04:44
Untitled PuzzleScript Script
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
@bbb651
bbb651 / main.py
Created December 31, 2023 02:26
PuzzleScript Image Importer
from __future__ import annotations
from typing import Iterator
import sys
from itertools import count, product, starmap
import numpy as np
from numpy.typing import NDArray
import imageio
@bbb651
bbb651 / rust.json
Created June 23, 2023 07:25
Iced Snippets
{
"Iced Sandbox": {
"prefix": "sandbox",
"body": [
"use iced::{widget::text, Element, Sandbox, Settings, Theme};\n",
"fn main() -> iced::Result {",
"\tApp::run(Settings::default())",
"}\n",
"#[derive(Debug)]",
"struct App {}\n",