Skip to content

Instantly share code, notes, and snippets.

@andijcr
Created January 7, 2025 09:40
Show Gist options
  • Save andijcr/b986cda988ecfd2dff8262f188b99faa to your computer and use it in GitHub Desktop.
Save andijcr/b986cda988ecfd2dff8262f188b99faa to your computer and use it in GitHub Desktop.
github history filler
#!/usr/bin/bash
# cron entry to run every 30 minutes: */30 * * * * path_to_this_script
# set the path of this script as working directory
cd "$(dirname "$0")"
# ensure that the ssh keys are available in this env
eval `ssh-agent`
# update the readme with current date and weather in rome, and push it
printf "%s\n\`\`\`\n%s\n\`\`\`\n" "$(date)" "$(curl wttr.in/Rome?0T)" > README.md
git add README.md
git commit -m "$(curl wttr.in/Rome?format=4)"
git push -u origin main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment