Skip to content

Instantly share code, notes, and snippets.

@MrPandir
MrPandir / environment.plist
Last active February 16, 2026 17:03
Setting environment variables globally on MacOS at login.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>my.startup</string>
<key>Program</key>
<string>/Users/user/.config/login_setenv.sh</string>
<key>RunAtLoad</key>
<true/>
// ==UserScript==
// @name Fix Reyohoho API
// @namespace https://reyohoho.github.io/
// @version 0.6
// @description Removes leading [] from cache response and rewrites Alloha iframe URL
// @author MrPandir with Grok
// @match https://reyohoho.github.io/reyohoho/*
// @grant none
// @run-at document-start
// ==/UserScript==
@MrPandir
MrPandir / compose.yaml
Created December 23, 2025 18:38
This Adminer plugin keeps you logged in for up to 30 days by extending the login session lifetime.
services:
db:
image: postgres:18
container_name: ${COMPOSE_PROJECT_NAME}_postgres
restart: always
environment:
POSTGRES_USER: user
POSTGRES_PASSWORD: password
POSTGRES_DB: db
# ports:
@MrPandir
MrPandir / measure.nu
Created April 15, 2025 13:50
Nushell performance measurement utility
# Measures the average execution time of a specified function over a given number of iterations
export def main [
func: closure # The function (closure) to be executed
iterations: int = 10000 # Number of iterations to run the function
] {
let start_time = date now
1..($iterations) | each { |_| do $func } | ignore
let end_time = date now
@MrPandir
MrPandir / load_dotenv.py
Last active October 29, 2025 17:38
Lightweight Python .env file reader and environment variable loader
from os import environ
from pathlib import Path
__all__ = ["load_env_to_environ"]
def _format(key_or_value: str) -> str:
return key_or_value.strip(" \"'")
@MrPandir
MrPandir / chat-to-input.js
Last active June 2, 2025 16:12
Inserts single words from Twitch chat into specified websites
// ==UserScript==
// @name Twitch Chat Answer Inserter
// @namespace http://tampermonkey.net/
// @author MrPandir
// @version 1.8.2
// @description Inserts single words from Twitch chat into specified websites
// @match https://slovo.win/*
@MrPandir
MrPandir / carapace.nu
Last active March 30, 2025 16:46
My rewritten carapace configuration file for nushell.
use std "path add"
def cache [] {
let func = $in
let version = version | get version
let path = $nu.temp-path | path join "carapace-cache" $version
try {
open $path