Skip to content

Instantly share code, notes, and snippets.

@obar1
Created September 27, 2025 11:30
Show Gist options
  • Save obar1/bf699cd15e4fcbe1c2d8484d62debf7d to your computer and use it in GitHub Desktop.
Save obar1/bf699cd15e4fcbe1c2d8484d62debf7d to your computer and use it in GitHub Desktop.
keep alive girthub codespace
#!/bin/bash
# Interval in seconds (e.g., 300 = 5 minutes)
INTERVAL=300
echo "Keeping Codespace alive. Press [CTRL+C] to stop."
while true; do
echo "Ping at $(date)" > /tmp/keepalive.txt
sleep $INTERVAL
done
# use ad
# nohup ./ka.sh &
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment