Created
June 8, 2012 15:15
-
-
Save zmaril/2896110 to your computer and use it in GitHub Desktop.
Generating schema
This file contains hidden or 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
| #Not valid coffeescript, but close | |
| generate = {} | |
| generate.ip = ()-> | |
| numbers = (Math.round(Math.random()*255)+1) for i in [0..4] | |
| numbers.join(".") | |
| generate.user_agent = ()-> | |
| ["Mozilla","Apple","Windows","Etc"].random() | |
| pages = ["Main","Settings","Content","About"...] | |
| generate.sites = ()-> | |
| (page for page in pages when Math.random() < 0.5) | |
| generate.user = (id)-> | |
| "id": id | |
| "ip": @ip() | |
| "user-agent": @user_agent() | |
| "pages-visited": @pages() | |
| users = ( generate.user() for i in [0..10000]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment