Skip to content

Instantly share code, notes, and snippets.

@ds17f
ds17f / claude-later
Created March 4, 2026 05:13
claude-later: sleep until a time then run claude
#!/usr/bin/env bash
set -euo pipefail
usage() {
echo "Usage: claude-later <time> [claude args...]"
echo " claude-later 2:00am -p \"write hello world in go\""
echo " claude-later 14:30 -p \"summarize my notes\""
exit 1
}
@ds17f
ds17f / claude-resume
Created February 20, 2026 06:20
Schedule claude --resume sessions to run overnight in tmux panes. Sleep until a target time, then launch each session as an interactive Claude Code instance.
#!/usr/bin/env bash
set -euo pipefail
# claude-resume — Schedule claude --resume sessions to run overnight in tmux panes
usage() {
cat <<'EOF'
Usage: claude-resume <time> <sessions> [options]
Arguments:
@ds17f
ds17f / nvidia-setup-macbook.md
Last active January 15, 2026 15:20
NVIDIA 470xx driver setup guide for MacBook Pro 11,3 (2014) on Fedora 42 - fixes video stability, suspend/resume, GDM issues

NVIDIA Proprietary Driver Setup for MacBook Pro 11,3 (2014)

Hardware

  • MacBook Pro 11,3 (Mid 2014, 15" Retina)
  • NVIDIA GeForce GT 750M (Kepler, GK107M)
  • Intel Iris Pro 5200 (NOT usable - see GPU Switching section)
  • Fedora 42, Kernel 6.17.11

Driver

  • nvidia-470xx (legacy driver - last to support Kepler GPUs)
@ds17f
ds17f / SafeShutdown.py
Created October 25, 2025 23:47
SafeShutdown.py Script for Retroflag Nespi4 on Debian Bookworm using gpiod instead of the legacy RPi.GPIO
## This script was written by Claude Code when I was trying to set up Safe Shutdown on Bookworm
## Claude told me not to do this but I told it "Make It So!"
## The script worked on the first run, but I don't make any guarantees about it
## Hopefully if you're reading this it will help you too.
## Please link this gist to any threads out there that need it.
import gpiod
import os
import time
import signal
@ds17f
ds17f / fixperms.md
Created April 12, 2023 16:53
Fix Permissions EZ Flash Omega GBA Mac Fat32

Concepts

  • Format the SD Card with Fat32 (not extfat which is the default)
    • If the card is bigger than 32gb this could be problematic, also, it might not be 🤷
  • Copy ROMs to the card
  • Set the Fat32 noarch flag
  • Set the Fat32 nohidden flag

Code

@ds17f
ds17f / NESDevLinks.md
Last active December 29, 2022 15:33
Helpful Links for Developing NES Games
@ds17f
ds17f / sleep_settings.sh
Last active August 11, 2021 14:25
A script for setting the screensaver/sleep timeout on a firetv stck
# Use this to set the screensaver on a firetv
# you can't set it as executable (unless you're rooted)
# so you need to run it as:
# $ source ./sleep_settings.sh
echo "Enter screensaver timeout in minutes (Default 5)"
read SCREENSAVER_ON_IN_MINUTES
echo "Enter screen off timeout in minutes (Default 20)"
read SLEEP_IN_MINUTES
SCREENSAVER_IN_MILLISECONDS=`expr "$SCREENSAVER_ON_IN_MINUTES" \* 60000`
@ds17f
ds17f / git-origins.md
Created April 25, 2019 12:59 — forked from benschw/git-origins.md
fork a repo manually (set source as upstream origin) rather than with the "fork" button. e.g. for in github when you want to fork a project twice.

Ripped off from adrianshort.org

List curent remotes

$ git remote -v

origin  https://github.com/hakimel/reveal.js.git (fetch)
origin  https://github.com/hakimel/reveal.js.git (push)

Rename origin to upstream and add our new empty repo as the origin.

@ds17f
ds17f / make_yaml.py
Created April 8, 2019 21:28
Makes a yaml from command line parameters
import yaml
import sys
VAR_DELIM = ","
KEY_DELIM = ":"
def int_try_parse(value):
try:
return int(value)