Skip to content

Instantly share code, notes, and snippets.

View pythoninthegrass's full-sized avatar

pythoninthegrass

View GitHub Profile
@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 / 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 / config.toml
Last active June 20, 2025 19:21
mise config
[settings]
disable_backends = ["dotnet"]
[settings.pipx]
uvx = true
[tools]
1password-cli = "2.30.3"
aqua = "2.51.2"
"aqua:ahmetb/kubectx" = "0.9.5"
{
"permissions": {
"allow": [
"Bash(uv run:*)",
"Bash(timeout 5 uv run:*)",
"Bash(terraform:*)",
"WebFetch(domain:terraform.io)",
"WebFetch(domain:github.com)",
"WebFetch(domain:plainframework.com)",
"WebFetch(domain:readthedocs.io)"
@pythoninthegrass
pythoninthegrass / preseed.yml
Created April 18, 2025 15:43
lxd init preseed config
config:
core.https_address: '[::]:8443'
networks:
- config:
ipv4.address: auto
ipv6.address: auto
description: ""
name: lxdbr0
type: ""
project: default
@pythoninthegrass
pythoninthegrass / distrobox.conf
Created March 30, 2025 18:25
Distrobox config ~/.config/distrobox/distrobox.conf
container_always_pull="1"
container_generate_entry=0
container_manager="docker"
container_image_default="registry.fedoraproject.org/fedora-toolbox:latest"
container_name_default="distrobox-default"
container_user_custom_home="$HOME/.config/distrobox/home"
# container_init_hook="~/.local/distrobox/a_custom_default_init_hook.sh"
# container_pre_init_hook="~/a_custom_default_pre_init_hook.sh"
non_interactive="1"
skip_workdir="0"
@pythoninthegrass
pythoninthegrass / proxy.py
Created February 12, 2025 01:32
Proxy requests from a free list at https://api.proxyscrape.com
#!/usr/bin/env python
import json
import requests
from pathlib import Path
from requests.exceptions import RequestException
from urllib.parse import urlencode
def get_my_ip():
@ading2210
ading2210 / ollama-limiter.sh
Created January 21, 2025 03:23
A bash script to limit ollama download speeds
#!/bin/bash
#see https://github.com/ollama/ollama/issues/2006 for why this is needed
set -e
run_nethogs() {
local pid="$1"
nethogs -t -d 0 -P "$pid" | grep --line-buffered "ollama"
}
@pythoninthegrass
pythoninthegrass / config
Last active May 28, 2025 17:06
Ghosty config (i.e., $HOME/.config/ghostty/config )
title = " "
maximize = true
working-directory = "home"
# TODO: fix `command` / `initial-command` error
# shell-integration = "bash"
# initial-command = "~/.config/ghostty/startup.sh bash"
# command = "bash $HOME/.config/ghostty/startup.sh"
quit-after-last-window-closed = true
quick-terminal-screen = mouse
quick-terminal-autohide = true
[env]
TERM = "xterm-256color"
[terminal.shell]
program = "/usr/bin/bash"
args = ["-l", "-c", "zellij"]
[window]
dimensions.columns = 100
dimensions.lines = 34