Exporting (iCloud) Keychain and Safari credentials to a CSV file

I wrote up a gist of the steps I took to export a list of “domain, user name, password” triples from iCloud Keychain and Safari.