Skip to content

Instantly share code, notes, and snippets.

View pythoninthegrass's full-sized avatar

pythoninthegrass

View GitHub Profile
On the First day of Christmas\nMy true love sent to me\nA Partridge in a Pear Tree.\n\nOn the Second day of Christmas\nMy true love sent to me\nTwo Turtle Doves, and\nA Partridge in a Pear Tree.\n\nOn the Third day of Christmas\nMy true love sent to me\nThree French Hens,\nTwo Turtle Doves, and\nA Partridge in a Pear Tree.\n\nOn the Fourth day of Christmas\nMy true love sent to me\nFour Calling Birds,\nThree French Hens,\nTwo Turtle Doves, and\nA Partridge in a Pear Tree.\n\nOn the Fifth day of Christmas\nMy true love sent to me\nFive Gold Rings,\nFour Calling Birds,\nThree French Hens,\nTwo Turtle Doves, and\nA Partridge in a Pear Tree.\n\nOn the Sixth day of Christmas\nMy true love sent to me\nSix Geese-a-Laying,\nFive Gold Rings,\nFour Calling Birds,\nThree French Hens,\nTwo Turtle Doves, and\nA Partridge in a Pear Tree.\n\nOn the Seventh day of Christmas\nMy true love sent to me\nSeven Swans-a-Swimming,\nSix Geese-a-Laying,\nFive Gold Rings,\nFour Calling Birds,\nThree French Hens,\nTwo Turtle Doves, and\
@pythoninthegrass
pythoninthegrass / python_commands.md
Last active December 5, 2021 21:16
Python Commands

Python Commands

Aliases

# ~/.bashrc

...

# ALIAS
alias python='python3.10'
@pythoninthegrass
pythoninthegrass / Brewfile
Last active March 13, 2026 01:01
Reinstall with overwrite all formulae, casks, or Mac app store apps. Especially useful when migrating to Apple Silicon (arm64)
tap "abridoux/formulae"
tap "aws/tap"
tap "azure/azd"
tap "buo/cask-upgrade"
tap "cirruslabs/cli"
tap "controlplane-com/cpln"
tap "cue-lang/tap"
tap "d12frosted/emacs-plus"
tap "datolabs-io/opsy", "https://github.com/datolabs-io/opsy"
tap "dopplerhq/cli"
@pythoninthegrass
pythoninthegrass / docker_backup.sh
Created January 2, 2022 22:37
Compresses Docker volumes, moves to NFS, and cleans up excess archives
#!/usr/bin/env bash
# SOURCES:
# https://www.reddit.com/r/unRAID/comments/go9vz8/backing_up_large_plex_folder/
# https://www.rootusers.com/13-simple-xz-examples/
# https://unix.stackexchange.com/questions/548434/multithreaded-xz-with-gzip-pv-and-pipes-is-this-the-most-efficient-i-can-ge
# https://help.ubuntu.com/community/BackupYourSystem/TAR
# https://github.com/ColonelRyzen/unraid_plex_ssd_backup/blob/master/plex_ssd_backup.sh
# https://gist.github.com/robsonke/c5c478bae476adb32d48
# https://stackoverflow.com/questions/27793125/bash-need-to-strip-single-quotes-around-a-string/27795009#27795009
# EditorConfig is awesome: https://EditorConfig.org
# top-most EditorConfig file
root = true
# Unix-style newlines and whitespace cleanup
[*]
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
@pythoninthegrass
pythoninthegrass / beautiful_idiomatic_python.md
Created January 28, 2022 22:03 — forked from 0x4D31/beautiful_idiomatic_python.md
[Beautiful Idiomatic Python] Transforming Code into Beautiful, Idiomatic Python #python

Transforming Code into Beautiful, Idiomatic Python

Notes from Raymond Hettinger's talk at pycon US 2013 video, slides.

The code examples and direct quotes are all from Raymond's talk. I've reproduced them here for my own edification and the hopes that others will find them as handy as I have!

Looping over a range of numbers

for i in [0, 1, 2, 3, 4, 5]:
@pythoninthegrass
pythoninthegrass / .bash_aliases
Last active November 30, 2026 03:48
Bash shell config (~/.bashrc) for Intel and ARM Macs
# shellcheck disable=all
# homebrew — init early so brew tools (envsubst, etc.) are on PATH for all blocks below
[[ -f "/opt/homebrew/bin/brew" ]] && eval "$(/opt/homebrew/bin/brew shellenv)"
[[ -f "/home/linuxbrew/.linuxbrew/bin/brew" ]] && eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
# bun — init early so check_bin opencode finds it before the alias block
[[ -d "$HOME/.bun/bin" ]] && export PATH="$HOME/.bun/bin:$PATH"
# PATH
@pythoninthegrass
pythoninthegrass / main.yml
Created February 22, 2022 05:21
Send submodule updates to parent repo
name: Send submodule updates to parent repo
on:
push:
branches:
- main
- master
jobs:
update:
@pythoninthegrass
pythoninthegrass / config
Created March 19, 2022 02:15 — forked from miguelmota/config
Arch linux VNC server setup
session=lxqt
geometry=1920x1080
localhost # comment this out to allow connections from anywhere
alwaysshared