Skip to content

Instantly share code, notes, and snippets.

View pythoninthegrass's full-sized avatar

pythoninthegrass

View GitHub Profile
@pythoninthegrass
pythoninthegrass / hello
Last active April 1, 2026 21:20
Demo for uv's PEP 723 script support with various dependencies.
#!/usr/bin/env -S uv run --script
# /// script
# requires-python = ">=3.13,<3.14"
# 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 nando4eva@ymail.com (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 April 20, 2026 15:22
mise config
[env]
CFLAGS = "-I/opt/homebrew/include"
LDFLAGS = "-L/opt/homebrew/lib"
[settings]
disable_backends = ["dotnet"]
idiomatic_version_file_enable_tools = []
[settings.pipx]
uvx = true
@pythoninthegrass
pythoninthegrass / .env.example
Last active April 29, 2026 05:09
Claude code / desktop settings
# BookStack API Configuration
BOOKSTACK_BASE_URL=
BOOKSTACK_API_TOKEN=
BOOKSTACK_TIMEOUT=30000
# Server Configuration
SERVER_NAME=bookstack-mcp-server
SERVER_VERSION=1.0.0
SERVER_PORT=3000
@pythoninthegrass
pythoninthegrass / drugwars.txt
Created May 16, 2025 15:02 — forked from mattmanning/drugwars.txt
Drugwars for the TI-82/83/83+ Calculators
Lbl G
ClrHome
Disp " J.M.'S DRUGWAR"," SIMULATION",""," VERSION 2.00",""," JUST SAY NO."
2000→Z
5000→Y
0→V
100→K
1→B
2→N
0→I
@pythoninthegrass
pythoninthegrass / drugwars.cpp
Created May 16, 2025 14:57 — forked from gbowne1/drugwars.cpp
ghmiranda-drug-wars-fix
#include <iostream>
#include <vector>
#include <map>
#include <memory>
enum class Objects {
Acid,
Weed,
Speed,
Cocaine,
@pythoninthegrass
pythoninthegrass / scratch.go
Last active May 14, 2025 02:38
llm generated iris rest server to make gql requests
package main
import (
"context"
"fmt"
"net/http"
"strings"
"github.com/kataras/iris/v12"
"github.com/thepolyglotdeveloper/graphql"