Skip to content

Instantly share code, notes, and snippets.

View pythoninthegrass's full-sized avatar

pythoninthegrass

View GitHub Profile
@pythoninthegrass
pythoninthegrass / install_python.sh
Last active August 10, 2025 08:22
Install custom python versions in unraid
#!/usr/bin/env bash
# Modular Python installer with Docker fallback
set -e
# Help function
halp() {
cat << EOF
Usage: $(basename "$0") [version]
#!/usr/bin/env bash
# SOURCE: https://github.com/Lanjelin/unraid/blob/main/unraid-brew/README.md
# Where we store the actual bins -- should be on ssd/nvme
# Use drive directly, and not via /mnt/user/
# Makes a huge impact on performance
UNRAID_BREW_PATH=/mnt/cache/appdata/linuxbrew
UNRAID_BASH=0
UNRAID_ZSH=0
@pythoninthegrass
pythoninthegrass / push.sh
Created July 23, 2025 17:20
mvp for pushover.net
#!/usr/bin/env bash
export PUSHOVER_USER_KEY="<your_user_key>"
export PUSHOVER_APP_TOKEN="<your_app_token>"
curl -s \
--form-string "token=$PUSHOVER_APP_TOKEN" \
--form-string "user=$PUSHOVER_USER_KEY" \
--form-string "message=Hello, world!" \
https://api.pushover.net/1/messages.json
@pythoninthegrass
pythoninthegrass / hello
Last active July 22, 2025 08:34
Demo for uv's PEP 723 script support with various dependencies.
#!/usr/bin/env -S uv run --script
# /// script
# requires-python = ">=3.13"
# dependencies = [
# "httpx>=0.28.1",
# "python-decouple>=3.8",
# "sh>=2.2.2",
# ]
# [tool.uv]
@pythoninthegrass
pythoninthegrass / remap_media_keys.json
Last active June 24, 2025 19:43
Use karabiner to remap media keys for YouTube Music Desktop (ytmdesktop) on macOS
{
"description": "Remap media keys for YouTube Music Desktop (ytmdesktop)",
"manipulators": [
{
"from": { "consumer_key_code": "play_or_pause" },
"to": [
{
"key_code": "p",
"modifiers": ["command", "option", "shift"]
}
@pythoninthegrass
pythoninthegrass / git_bundle.sh
Last active June 14, 2025 03:33
Alternative to git archive that retains git tracked files/directories
#!/usr/bin/env bash
# shellcheck disable=SC2046,SC2164,SC2317
# Global variables
logged_in_user=""
logged_in_home=""
repo_dir=""
output_dir=""
progress_file=""
@pythoninthegrass
pythoninthegrass / nvidia_error43_fixer.ps1
Created June 12, 2025 02:39
Refactor nando4eva's batch script to use powershell w/error handling
# Script: nvidia-error43-fixer.ps1
# Author: (C) 2018-2021 [email protected] (Converted to PowerShell by @pythoninthegrass)
# Homepage: https://egpu.io/nvidia-error43-fixer
param(
[switch]$Force
)
# Check if running as administrator
function Test-Administrator {
@pythoninthegrass
pythoninthegrass / zellij.kdl
Created June 9, 2025 20:37
zellij config
theme "tokyo-night"
default_layout "compact"
on_force_close "quit"
@pythoninthegrass
pythoninthegrass / config.toml
Last active August 11, 2025 20:18
mise config
[settings]
disable_backends = ["dotnet"]
[settings.pipx]
uvx = true
[settings.python]
compile = true
[tools]
@pythoninthegrass
pythoninthegrass / .editorconfig
Last active August 14, 2025 19:41
Claude code / desktop settings
# EditorConfig is awesome: https://EditorConfig.org
# top-most EditorConfig file
root = true
# Unix-style newlines and whitespace cleanup
[*]
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true