Skip to content

Instantly share code, notes, and snippets.

@astr0n8t
astr0n8t / init.lua
Created October 2, 2025 04:59
bland init.lua
local map = vim.keymap.set
-- leader y/p to clip
map({ "n", "v" }, "<leader>y", '"+y')
map({ "n", "v" }, "<leader>p", '"+p')
-- f/r magic from prime
map("n", "<leader>s", [[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><Left>]])
@astr0n8t
astr0n8t / nixos-generators config
Created October 7, 2025 17:39
Working format to get a working Raspberry Pi 2B+ SD card build using NixOS and nixos-generators
{
system = "armv7l-linux";
format = "sd-armv7l";
customFormats = { "sd-armv7l" = ./formats/sd-armv7l.nix; };
modules = [
nixos-hardware.nixosModules.raspberry-pi-2
];
}
import serial
import time
# Serial port configuration
serial_port = '/dev/tty.usbserial-0001'
baud_rate = 115200
ser = serial.Serial(serial_port, baud_rate, timeout=1)
num_of_pages = 65535