Skip to content

Instantly share code, notes, and snippets.

View pythoninthegrass's full-sized avatar

pythoninthegrass

View GitHub Profile
@pythoninthegrass
pythoninthegrass / config.toml
Last active June 4, 2025 23:49
mise config
[settings]
disable_backends = ["dotnet"]
[settings.pipx]
uvx = true
[tools]
"aqua:ahmetb/kubectx" = "0.9.5"
"aqua:ahmetb/kubectx/kubens" = "0.9.5"
"aqua:apple/pkl" = "0.28.2"
{
"permissions": {
"allow": [
"Bash(terraform:*)",
"WebFetch(domain:registry.terraform.io)",
"WebFetch(domain:github.com)",
"WebFetch(domain:cloudinit.readthedocs.io)"
],
"deny": []
}
@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
@pythoninthegrass
pythoninthegrass / cleanup.sh
Last active November 13, 2024 19:16
Cleanup ubuntu servers (non)interactively (cf. no disk space left)
#!/usr/bin/env bash
set -euo pipefail
# $USER
[[ -n $(logname >/dev/null 2>&1) ]] && logged_in_user=$(logname) || logged_in_user=$(whoami)
# $UID
# logged_in_uid=$(id -u "${logged_in_user}")
@pythoninthegrass
pythoninthegrass / deploy.sh
Last active November 12, 2024 04:47
Spin up a kind cluster with jupyterhub
#!/usr/bin/env bash
set -e
# Clean up function
cleanup() {
echo "Cleaning up existing cluster..."
kind delete cluster
}