Created
September 17, 2016 03:08
-
-
Save cratermoon/393448fa912a73a71464c6f073888c7c to your computer and use it in GitHub Desktop.
create 1000 files match Screenhive file
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
const fs = require('fs'); | |
for (i = 0; i < 1000; i++) { | |
var appid = Math.floor(Math.random() * (531480 - 5)) + 5; | |
var ds = (new Date()).toISOString().replace(/[^0-9]/g, "") | |
var filename = appid + "_" + ds + "_1.png"; | |
fs.open(filename, "w", (err, fd) => { | |
fs.close(fd, console.log); | |
} | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment