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 / nginx-template.conf
Last active July 9, 2024 12:06
Rootiest Nginx Sample Template
# Template nginx config
# https://notes.rootiest.dev
# Define the server IP and ports here.
upstream notes {
# Name the upstream and zone after the service
zone notes 64k;
# Define the server IP and port
server 100.73.247.145:5230;
# Or path
# server /notes/index.html;
@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")
@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 / 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]`