Years ago, when I was new at HubSpot, I was asked to write our first deploy script for our Java applications. I started off with a set of bash scripts and ended up switching over to use Python, Paramiko, and a few other packages. I would have loved to use Fabric, but it wasn’t able to do much at the time.
The great Patrick Fitzsimmons had written a similar script for our C# applications, and his included a math challenge with every deploy. I believe this was modelled after the Gmail Mail Googles feature that prevents you from sending email late at night, drunk. Anyway, I loved this little feature that Patrick coded.
The other day, George was deploying some code here at BabbaCo and acidentally pushed to production instead of staging. Not a big deal, but it brought the math challenge concept back to mind. So I just updated our fabric deploy script with this code to challenge the user with a simple math problem when deploying to production.
Consider plugging this into your own deploy script, or other places where it might be useful. Enjoy!