Last active
August 29, 2015 14:09
-
-
Save dr-dimitru/6c8cd6aae943227d2024 to your computer and use it in GitHub Desktop.
Meteor Generate random users with names
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
var generateUsers = function(x){ | |
var lastnames = ['Brown', 'Black', 'Green', 'Aaberg', 'Aagard', 'Abdella', 'Abebe', 'Caccamo', 'Caccavale', 'Caccese', 'Cacchione', 'Caccia', 'Cacciatore', 'Easley', 'Easlick', 'Easom', 'Eason', 'East', 'Eastburn', 'Ines', 'Infante', 'Infanti', 'Infantino', 'Infield','Infinger', 'Kaliszewski', 'Kalita', 'Kalivas', 'Kalivoda', 'Kalk', 'Kalka', 'Umpleby', 'Umscheid', 'Umstead', 'Umsted', 'Un', 'Unangst', 'Zediker', 'Zee', 'Zeeb', 'Zeedyk', 'Zeek', 'Zeeman']; | |
var firstnames = ['Mohamed', 'Youssef', 'Ahmed', 'Mahmoud', 'Mustafa', 'Yassin', 'Taha', 'Khaled', 'Hamza', 'Bilal', 'Ibrahim', 'Hassan', 'Hussein', 'Karim', 'Tareq', 'Abdel-Rahman', 'Ali', 'Omar', 'Halim', 'Murad', 'Selim', 'Abdallah', 'Alex', 'Alexander', 'Carter', 'Charlie', 'David', 'Jackson', 'James', 'Jase', 'Joseph', 'Wyatt', 'Charles', 'Clark', 'Cooper', 'Daniel', 'Drake', 'Dylan', 'Edward', 'Eli', 'Elijah', 'Emerson', 'Evan', 'Felix', 'Gabriel', 'Gavin', 'Gus', 'Isaac', 'Isaiah', 'Jacob', 'Jax', 'Kai', 'Kaiden', 'Malcolm', 'Michael', 'Nathaniel', 'Riley', 'Sawyer', 'Thomas', 'Tristan'] | |
var phone = 9096870000; | |
while(x > 0){ | |
var lname = lastnames[Math.floor(Math.random() * lastnames.length)]; | |
var fname = firstnames[Math.floor(Math.random() * firstnames.length)]; | |
var tel = (x + phone) + ''; | |
var obj = { | |
_id: ObjectId().str, | |
"emails" : [ | |
{ | |
"address" : lname + "." + fname + "@veliov.com", | |
"verified" : true | |
} | |
], | |
"locale" : "ru", | |
"profile" : { | |
"birthdate" : "1980-01-01", | |
"companies" : {}, | |
"companiesList" : [], | |
"email" : lname + "." + fname + "@veliov.com", | |
"fullname" : lname + " " + fname, | |
"gender" : "false", | |
"username" : tel | |
}, | |
"services" : { | |
"email" : { | |
"verificationTokens" : [ | |
{ | |
"token" : "GKeDFoUzdBVM02j3Neer2eqcWbSgw2aYt1M_iGEyrZL", | |
"address" : lname + "." + fname + "@veliov.com", | |
"when" : ISODate("2014-11-17T15:39:33.100Z") | |
} | |
] | |
}, | |
"password" : { | |
"bcrypt" : "$2a$10$vVmPPMh9Wrt7TkSxT3pt2OUa3yUAauUSEZ0mhyW01/qfYN5aaCkey" | |
}, | |
"resume" : { | |
"loginTokens" : [] | |
} | |
}, | |
"username" : tel | |
} | |
db.users.insert(obj); | |
--x; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment