After years of sitting and programming, I’ve started using a stand-up desk. And now, I’ve added one more habit to stay a little more mobile during the workday.
I’ve added a global Mercurial commit hook that suggests exercise every time I make a mercurial commit. Here’s the code:
#!/bin/bash
RANDOM=$$$(date +%s)
COUNT=$((RANDOM % 15 + 5))
EXERCISES=(
"push ups"
"crunches"
"burpees"
"curls"
"upright rows"
"russian twist"
"leg raises"
"dips"
"superman"
"calf raises"
"squat"
)
EXERCISE=${EXERCISES[$RANDOM % ${#EXERCISES[@]} ]}
echo -e "Commit reward: \e[01;34m $COUNT $EXERCISE \e[00m"I added it to my global .hgrc file as a hook, and now I get a recommendation for an exercise eat time I commit.
If you’ve got space (or if you’re in a home office), you can add a few basic supplies that will offer you some additional options:
- TheraBand Latex-Free Resistance Bands - tie these to something solid and do some rotator cuff exercises.
- Foam Roller to work on your upper back posture