Compare commits
No commits in common. "d20c29d04243897550a27f56334dedadb9627b8d" and "993723865d4368d1c5c3d4d07932f441ff870c01" have entirely different histories.
d20c29d042
...
993723865d
|
@ -8,7 +8,6 @@
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"assert": "^2.0.0",
|
"assert": "^2.0.0",
|
||||||
"buffer": "^5.5.0",
|
"buffer": "^5.5.0",
|
||||||
"crypto-browserify": "^3.12.0",
|
|
||||||
"events": "^3.1.0",
|
"events": "^3.1.0",
|
||||||
"parcel": "^2.8.3",
|
"parcel": "^2.8.3",
|
||||||
"parcel-namer-without-hash": "^0.0.1",
|
"parcel-namer-without-hash": "^0.0.1",
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { XTerm } from 'xterm-for-react';
|
import { XTerm } from 'xterm-for-react'
|
||||||
import { Terminal } from 'xterm';
|
|
||||||
|
|
||||||
export class Console extends React.Component {
|
export class Console extends React.Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
|
@ -17,21 +16,14 @@ export class Console extends React.Component {
|
||||||
background: '#212121',
|
background: '#212121',
|
||||||
brightGreen: '#15a179'
|
brightGreen: '#15a179'
|
||||||
},
|
},
|
||||||
convertEol: true,
|
convertEol: true
|
||||||
rows: 30,
|
|
||||||
cols: 200
|
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</div>;
|
</div>;
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
const term_ref = this.terminal.current;
|
require('./emulator')(this.terminal.current);
|
||||||
require('./emulator')(term_ref);
|
this.terminal.current.terminal.focus();
|
||||||
|
|
||||||
/** @type { Terminal } */
|
|
||||||
const terminal = term_ref.terminal;
|
|
||||||
|
|
||||||
terminal.focus();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,25 +0,0 @@
|
||||||
const { Terminal } = require("xterm");
|
|
||||||
const package = require('../../../package.json');
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @param {string[]} argv
|
|
||||||
* @param {Terminal} terminal
|
|
||||||
*/
|
|
||||||
module.exports = (argv, terminal) => {
|
|
||||||
if (argv.indexOf('--help') != -1) {
|
|
||||||
terminal.write(
|
|
||||||
`Usage: ${argv[0]} [options]
|
|
||||||
-V Print resume.js version
|
|
||||||
`
|
|
||||||
);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (argv.indexOf('-V') != -1) {
|
|
||||||
terminal.write(`resume.js version ${package.version} by ${package.author}\n`);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
terminal.clear();
|
|
||||||
}
|
|
|
@ -11,7 +11,6 @@ let cmds = {
|
||||||
'import_file': require('./import_file'),
|
'import_file': require('./import_file'),
|
||||||
'zsh': require('./zsh'),
|
'zsh': require('./zsh'),
|
||||||
'ps': require('./ps'),
|
'ps': require('./ps'),
|
||||||
'clear': require('./clear'),
|
|
||||||
|
|
||||||
// alias l='ls -l'
|
// alias l='ls -l'
|
||||||
'l': (a,t) => {require('./ls')([...a, '-l'], t)},
|
'l': (a,t) => {require('./ls')([...a, '-l'], t)},
|
||||||
|
|
|
@ -3,21 +3,6 @@ fs.writeFileSync('README.md', 'uwu');
|
||||||
const { ufs } = require('unionfs');
|
const { ufs } = require('unionfs');
|
||||||
|
|
||||||
ufs.use(fs).use(vol.fromJSON(require('./files')));
|
ufs.use(fs).use(vol.fromJSON(require('./files')));
|
||||||
|
ufs.constants = fs.constants;
|
||||||
if (!fs.existsSync('dev'))
|
|
||||||
fs.mkdirSync('dev');
|
|
||||||
|
|
||||||
// /dev/random & /dev/random
|
|
||||||
(async () => {
|
|
||||||
const delay = t => new Promise(resolve => setTimeout(resolve, t));;
|
|
||||||
const crypto = require('crypto');
|
|
||||||
|
|
||||||
while (true) {
|
|
||||||
await delay(3);
|
|
||||||
const buffer = crypto.randomBytes(16);
|
|
||||||
fs.writeFileSync('dev/urandom', buffer);
|
|
||||||
fs.writeFileSync('dev/random', buffer)
|
|
||||||
}
|
|
||||||
})();
|
|
||||||
|
|
||||||
module.exports = ufs;
|
module.exports = ufs;
|
Loading…
Reference in New Issue