Code files
This commit is contained in:
File diff suppressed because one or more lines are too long
Binary file not shown.
@@ -0,0 +1,22 @@
|
||||
Wed Jun 08 2016 22:53:26 GMT+0100 (BST) 896961 bytes removed
|
||||
Wed Jun 08 2016 22:54:14 GMT+0100 (BST) 896961 bytes removed
|
||||
Wed Jun 08 2016 22:54:25 GMT+0100 (BST) 896961 bytes removed
|
||||
Wed Jun 08 2016 22:54:30 GMT+0100 (BST) 896961 bytes removed
|
||||
Wed Jun 08 2016 22:54:36 GMT+0100 (BST) 896961 bytes removed
|
||||
Wed Jun 08 2016 22:54:41 GMT+0100 (BST) 896961 bytes removed
|
||||
Wed Jun 08 2016 22:54:59 GMT+0100 (BST) 10000000 bytes removed
|
||||
Wed Jun 08 2016 22:56:01 GMT+0100 (BST) 100000000 bytes removed
|
||||
Wed Jun 08 2016 22:57:07 GMT+0100 (BST) 897494 bytes removed
|
||||
Wed Jun 08 2016 22:57:23 GMT+0100 (BST) 10000000 bytes removed
|
||||
Wed Jun 08 2016 22:57:32 GMT+0100 (BST) 897432 bytes removed
|
||||
Wed Jun 08 2016 22:57:34 GMT+0100 (BST) 897432 bytes removed
|
||||
Wed Jun 08 2016 22:57:35 GMT+0100 (BST) 897432 bytes removed
|
||||
Wed Jun 08 2016 22:58:21 GMT+0100 (BST) 897432 bytes removed
|
||||
Wed Jun 08 2016 22:59:03 GMT+0100 (BST) 897432 bytes removed
|
||||
Wed Jun 08 2016 23:03:21 GMT+0100 (BST) 897432 bytes removed
|
||||
Wed Jun 08 2016 23:03:56 GMT+0100 (BST) 897432 bytes removed
|
||||
Wed Jun 08 2016 23:04:14 GMT+0100 (BST) 897432 bytes removed
|
||||
Wed Jun 08 2016 23:04:40 GMT+0100 (BST) 897432 bytes removed
|
||||
Wed Jun 08 2016 23:04:45 GMT+0100 (BST) 897432 bytes removed
|
||||
Wed Jun 08 2016 23:50:48 GMT+0100 (BST) 897432 bytes removed
|
||||
Wed Jun 08 2016 23:50:50 GMT+0100 (BST) 897432 bytes removed
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
'use strict'
|
||||
|
||||
setInterval(() => process.stdout.write('.'), 10).unref()
|
||||
|
||||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
const cwd = process.cwd()
|
||||
const bytes = fs.readFileSync(path.join(cwd, 'file.dat'))
|
||||
|
||||
const clean = bytes.filter(n => n)
|
||||
fs.writeFileSync(path.join(cwd, 'clean.dat'), clean)
|
||||
|
||||
fs.appendFileSync(
|
||||
path.join(cwd, 'log.txt'),
|
||||
(new Date) + ' ' + (bytes.length - clean.length) + ' bytes removed\n'
|
||||
)
|
||||
@@ -0,0 +1,19 @@
|
||||
'use strict'
|
||||
|
||||
setInterval(() => process.stdout.write('.'), 10).unref()
|
||||
|
||||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
const cwd = process.cwd()
|
||||
|
||||
fs.readFile(path.join(cwd, 'file.dat'), (err, bytes) => {
|
||||
if (err) { console.error(err); process.exit(1); }
|
||||
const clean = bytes.filter(n => n)
|
||||
fs.writeFile(path.join(cwd, 'clean.dat'), clean, (err) => {
|
||||
if (err) { console.error(err); process.exit(1); }
|
||||
fs.appendFile(
|
||||
path.join(cwd, 'log.txt'),
|
||||
(new Date) + ' ' + (bytes.length - clean.length) + ' bytes removed\n'
|
||||
)
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user