Skip to content

Instantly share code, notes, and snippets.

View rootiest's full-sized avatar
:octocat:
Printing printers

Rootiest rootiest

:octocat:
Printing printers
View GitHub Profile
@rootiest
rootiest / PIV-Key-Notes.md
Created September 30, 2026 05:55
A guide for writing secrets/notes to an unused PIV object to store them securely on a hardware device

Storing Notes and Secrets in PIV Data Objects

This guide shows how to store small notes or secrets on the PIV application of a YubiKey or an RP2350-based key (such as RS-Key), protected by the PIV PIN.

Contents

@rootiest
rootiest / p.fish
Last active April 26, 2026 03:57
Fish Copy/Paste utility functions (requires wl-copy or xclip package installed)
function p --description 'Put from clipboard'
# Check for help flag
if contains -- -h $argv; or contains -- --help $argv
echo "Usage: p [OPTIONS]"
echo ""
echo "Description:"
echo " Pastes content from the system clipboard to stdout."
echo ""
echo "Examples:"
echo " p Print clipboard content"
[gcode_macro clean_nozzle]
gcode:
SAVE_GCODE_STATE NAME=clean_nozzle_state
G90
G0 Z2 F5000
G0 X116.8 Y354 F10000
{% for wipe in range(8) %}
{% for coordinate in [(81.8,354),(116.8,354)] %}
G0 X{coordinate[0]} Y{coordinate[1] - 0.5 * wipe} Z0 F6000
{% endfor %}
@rootiest
rootiest / people-matcher.markdownfile
Last active June 23, 2025 02:57
Dynamic Obsidian Note for retrieving data from people-journals (Requires DataView and Meta-Bind)
---
meta-date: 2025-06-21
meta-name: Chris
---
# Search within People Notes
Pick Date: `INPUT[datePicker(title(Choose date)):meta-date]`
Pick Name: `INPUT[text(placeholder(Enter name..)):meta-name]`
@rootiest
rootiest / minimum_fan_speed.cfg
Last active February 18, 2025 09:33
Minimum Fan Speed Override
# -------------------------------------------------------------------------- #
# MINIMUM FAN SPEED OVERRIDE #
# -------------------------------------------------------------------------- #
# Override the default fan speed to set a minimum floor #
# and adjust the values to fit the new range. #
# Examples: (with min_fan_speed = 128) #
# M106 S255 ; set fan speed to 255 #
# M106 S25 ; set fan speed to 159 #
# M106 S0 ; set fan speed to 0 #
# M106 S50 ; set fan speed to 128 #
@rootiest
rootiest / PREP_PRINT.cfg
Last active February 10, 2025 22:33
SuperSlicer Super Start for Klipper
[gcode_macro PREP_PRINT]
description: Loads and starts the print
variable_x_max: 0
variable_y_max: 0
variable_z_max: 0
variable_nozzle: 0
variable_fila_dia: 0
variable_bed_temp: 0
variable_extruder_temp: 0
variable_chamber_temp: 0
@rootiest
rootiest / SET_NEVERMORE.cfg
Last active January 31, 2025 19:30
Nevermore SET_MATERIAL
# Set Material-specific Nevermore Speed
#
# Add this immediately after your start_print line of the start gcode in Prusa/SuperSlicer:
# SET_NEVERMORE MATERIAL='{filament_type[initial_extruder]}'
#
# Add this immediately after your start_print line of the start gcode in Cura:
# SET_NEVERMORE MATERIAL='{material_type}'
#
[gcode_macro SET_NEVERMORE]
gcode:
[delayed_gcode delayed_printer_off]
initial_duration: 600
gcode:
{% if printer.idle_timeout.state == "Idle" %}
M117 Shutdown
WLED_OFF
POWEROFF
{% endif %}
[gcode_macro POWEROFF]
@rootiest
rootiest / trap.lua
Last active November 27, 2024 14:40
Block all keys except hjkl in buffer
-- stylua: ignore
local function setup_buffer_keymaps(bufnr)
-- Create buffer-local keymaps for 'h', 'j', 'k', 'l'
local opts = { noremap = true, silent = true, buffer = bufnr }
vim.keymap.set('n', 'h', '<cmd>echo "Pressed h"<CR>', opts)
vim.keymap.set('n', 'j', '<cmd>echo "Pressed j"<CR>', opts)
vim.keymap.set('n', 'k', '<cmd>echo "Pressed k"<CR>', opts)
vim.keymap.set('n', 'l', '<cmd>echo "Pressed l"<CR>', opts)
@rootiest
rootiest / func.lua
Created August 17, 2024 16:52
NeoVim Utility Functions
-- ╭─────────────────────────────────────────────────────────╮
-- │ FUNCTION DATA │
-- ╰─────────────────────────────────────────────────────────╯
local M = {}
-- Check if the terminal is kitty
function M.is_kitty()
local term = os.getenv("TERM") or ""
local kit = string.find(term, "kitty")