Skip to content

Instantly share code, notes, and snippets.

View pythoninthegrass's full-sized avatar

pythoninthegrass

View GitHub Profile
@pythoninthegrass
pythoninthegrass / backup-saves.service
Last active December 24, 2022 19:16
Backup local Steam Deck save files via ludusavi and rclone
# /usr/lib/systemd/system/backup-saves.service
[Unit]
Description=Run ludusavi then rsync to offsite backup
[Service]
Type=simple
ExecStart=bash /home/deck/backup_saves.sh
@pythoninthegrass
pythoninthegrass / convert.py
Last active November 6, 2022 18:39 — forked from aolle/convert.py
Convert Nimbus Notes HTML to Markdown for UpNote
#!/usr/bin/env python3
"""
NOTE:
Extended into a full repo at https://github.com/pythoninthegrass/convert_html_md
Any future work will be posted there.
SOURCES:
https://gist.github.com/aolle/6e595650391deef79ffb1c9bb38fb6e9
https://dev.to/kcdchennai/python-decorator-to-measure-execution-time-54hk
@pythoninthegrass
pythoninthegrass / osascript_close_windows.sh
Last active November 1, 2022 17:11 — forked from Koze/CloseAllWindows.scpt
Close all windows with AppleScript
#!/usr/bin/env bash
# SOURCE: https://gist.github.com/Koze/2e1a9bf967b2bf865fc9
# close all windows (e.g., thousands of finder windows from unarchiver)
osascript -e 'tell application "Finder" to close windows'
## index 1 is frontmost window
# osascript 'tell application "Finder" to close window 1'
@pythoninthegrass
pythoninthegrass / config.lua
Last active April 25, 2025 19:19
Lunar Vim (lvim) config
--[[
lvim is the global options object
Linters should be
filled in as strings with either
a global executable or a path to
an executable
]]
-- THESE ARE EXAMPLE CONFIGS FEEL FREE TO CHANGE TO WHATEVER YOU WANT
@pythoninthegrass
pythoninthegrass / quickemu_3.16-beta
Created August 1, 2022 02:07
Patched quickemu from @trollkarlen's macOS fork
#!/usr/bin/env bash
export LC_ALL=C
if ((BASH_VERSINFO[0] < 4)); then
echo "Sorry, you need bash 4.0 or newer to run this script."
exit 1
fi
# Check for gnu tools on MacOS
UNAME="uname"
@pythoninthegrass
pythoninthegrass / README.md
Last active April 19, 2025 23:17
sysctl.conf stand-in on macOS 10.15+

com.startup.sysctl.plist

As of at least macOS Catalina 10.15.3, /etc/sysctl.conf values are no longer respected and/or the file straight up doesn't exist (confirmed on macOS Monterey 12.4.)

Ran across a fio shm error: failed to setup shm segment while benchmarking SSDs. The fix was to set shmmni to 4096. The following has to happen:

  • Disable SIP
    • Disclaimer from Apple

      Warning

      Disable SIP only temporarily to perform necessary tasks, and reenable it as soon as possible. Failure to reenable SIP when you are done testing leaves your computer vulnerable to malicious code.

@pythoninthegrass
pythoninthegrass / .bashrc
Last active March 9, 2026 21:14
Synology shell config
#/etc/profile: system-wide .profile file for ash.
# shellcheck disable=SC2155
umask 077
export PATH="/volume1/@appstore/git/bin:/opt/bin:/opt/sbin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/syno/sbin:/usr/syno/bin:/usr/local/sbin:/usr/local/bin"
export PGDATA=/var/services/pgsql
export TERMINFO=/usr/share/terminfo
@pythoninthegrass
pythoninthegrass / config.yml
Last active July 1, 2022 19:30
lazydocker config
# ~/Library/Application Support/jesseduffield/lazydocker/config.yml
gui:
returnImmediately: true
customCommands:
services:
- name: docker-compose
command: docker-compose --env-file=.env up --remove-orphans -d
containers:
- name: bld-meetup
attach: false
@pythoninthegrass
pythoninthegrass / keychron_q1_custom.json
Created June 15, 2022 20:29
Keychron Q1 Via Config: Solid white backlight, F5 + F11 keys w/o Fn
{
"name": "Keychron Q1",
"vendorProductId": 875823367,
"macros": ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""],
"layers": [
[
"KC_ESC",
"KC_BRID",
"KC_BRIU",
"USER00",