I have moved this script over from a gist to a repository.
I have also made it super easy to install this utility:
curl -fsSL https://git.io/vwRRf | bash
Additional functions have also been added, including OTA flashing and manual DFU control. Find out more in the repository, https://github.com/nrobinson2000/po-util