Created
October 17, 2014 12:12
-
-
Save jamestyj/2c7886fe650350c0f7a6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function makeEmail() { | |
var strValues="abcdefghijklmnopqrstuvwxyz"; | |
var strEmail = ""; | |
var strTmp; | |
for (var i=0;i<10;i++) { | |
strTmp = strValues.charAt(Math.round(strValues.length*Math.random())); | |
strEmail = strEmail + strTmp; | |
} | |
strTmp = ""; | |
strEmail = strEmail + "@"; | |
for (var j=0;j<8;j++) { | |
strTmp = strValues.charAt(Math.round(strValues.length*Math.random())); | |
strEmail = strEmail + strTmp; | |
} | |
strEmail = strEmail + ".com" | |
return strEmail; | |
} | |
var emails = [] | |
for (var i=0; i<100000; i++) { | |
emails.push(" '" + makeEmail() + "'"); | |
} | |
print("var EMAILS = [") | |
print(emails.join(",\n")) | |
print("]\n") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Execute this via mongo shell and pipe output to
emails.js
: