Richard Hart

Head of Something @ Somewhere
Kent, UK

My Music
My Photos

LinkedIn
Mastodon

Generate a random email address in TextExpander with Ruby

Made this short snippet to help generate random email addresses using TextExpander. Set the snippet content type to “Shell Script” and paste in the following. You’ll need Ruby installed which comes with most modern versions of OSX.

The snippet will generate a different address every minute and copy it to your local clipboard incase you want to paste it in again. It also uses YOPMail which you can check for emails too.

#!/usr/bin/env ruby -U
email = "#{Time.now.strftime("%m%d%H%M")}@yopmail.com"
IO.popen('pbcopy', 'w') {|io| io.write(email)}
print email

Update: I have a new post on how to do the same using AppleScript.