lib_ls.js: minor refactor. rm.js: add. README.md: update.
[?]
Oct 10, 2020, 11:31 PM
5TPN2FMT5IKBTZ4YMFZAIB7R5MUCOT2EZFFS3OMYHHSGUML5BTWACDependencies
- [2]
TDRFRQLAREADME.md: fix a formatting typo and some grammatical nitpicks. - [3]
TDBVUKLOcache some calculations which should increase performance. - [4]
NQ22FUSWadd more options to `main.js`. update `README.md`. - [5]
Y5OWMCQRall: remove unecessary uses of `exec`. refactor. main.js: add RAM reservation logic. lib_ram.js: renamed to lib_ram_server.js. README.js: update. - [6]
SXEJJKPIexecutables: add `--help` flag. hacker.js: change scheduling logic. refactor. kill.js: allow handling more than one server or script at a time. cyclic_weaken.js: add. README.md: update. - [7]
FBAPT2WWexecutables: dynamically load help messages. lshw.js, main.js: add options to change score correction method and score factor multipliers. README.md: update. - [8]
2BKHJI2Sinit - [9]
FCJA5EXScontracts.js: add. README.md: update. - [10]
QU6T4CIVREADME.md: place installation notes nearer to the top. - [11]
5DIUM5GJhacknet.js: convert from helper script to stand-alone script. main.js, README.md: update to accommodate "hacknet.js" changes. README.md: add "Troubleshooting" section and alter misleading information about required server for installation. - [12]
XUZPBRE6main.js: fix regression. lib_ls.js: refactor.
Change contents
- replacement in lib/lib_ls.js at line 3
export const array_get_files_with_string = function (export const array_get_files_with_string = ( - replacement in lib/lib_ls.js at line 5
string_server_source,string_server, - replacement in lib/lib_ls.js at line 7
) {constarray_files_with_string = [],string_type_substring = typeof substring;) => {const string_type_substring = typeof substring; - edit in lib/lib_ls.js at line 10[4.1707]→[4.1707:1726](∅→∅),[4.1726]→[3.7972:8021](∅→∅),[3.8021]→[4.1726:1779](∅→∅),[4.1726]→[4.1726:1779](∅→∅),[4.1779]→[3.8022:8074](∅→∅),[3.8074]→[4.1831:1875](∅→∅),[4.1831]→[4.1831:1875](∅→∅),[4.1944]→[4.1944:1982](∅→∅),[4.1982]→[3.8075:8149](∅→∅),[3.8149]→[4.2038:2070](∅→∅),[4.2038]→[4.2038:2070](∅→∅)
case "object":const substring_length = substring.length;for (let integer_index_substring = 0;integer_index_substring < substring_length;++integer_index_substring) {array_files_with_string.push(ns.ls(string_server_source, substring[integer_index_substring]));}break; - replacement in lib/lib_ls.js at line 11
array_files_with_string.push(ns.ls(string_server_source, substring));break;return ns.ls(string_server, substring);case "object":return substring.flatMap((string_file) => {return array_get_files_with_string(ns, string_server, string_file);}); - replacement in lib/lib_ls.js at line 20[4.3734155]→[4.1876:1910](∅→∅),[4.1910]→[4.3734185:3734187](∅→∅),[4.3734185]→[4.3734185:3734187](∅→∅)
return array_files_with_string;};[4.3734155]}; - replacement in bin/kill.js at line 64
break;;break; - replacement in README.md at line 8
Save all the `.js` files in this repository to the root directory of a rooted server (one with at least enough RAM to run "hacker.js", e.g. "foodnstuff") using the same filenames (but not including the directory names) that they currently have in this repository. If in the start of a new game, run `run botnet.js 0.001` (to increase the RAM available for the scripts) then `run kill.js` (to kill any currently running scripts).Save all the `.js` files in this repository to the root directory of a rooted server (one with at least enough RAM to run "hacker.js", e.g. "foodnstuff") using the same filenames (but not including the directory names) that they currently have in this repository. If in the start of a new game or just after resetting, run `run botnet.js 0.001` to increase the RAM available for the scripts and increase the available hackable servers, then `run kill.js` (to kill any currently running scripts). - edit in README.md at line 214
---### "rm.js" (3.05 GB)* Removes all removable files (which excludes currently running scripts, including this one).* Optionally, removes only files whose names match a given regular expression.* Optionally, removes only files on servers whose names match a given regular expression.* Optionally, removes only files whose names match a given regular expression on servers whose names match a given regular expression.#### USAGE`run rm.js [FLAGS ...] [OPTIONS]`#### FLAGS`-h, --help`* Displays a help message then exits.#### OPTIONS`-e, --server <REGEX>`* REGEX = Regular expression used for server names.`-f, --file <REGEX>`* REGEX = Regular expression used for filenames.#### EXAMPLES`run rm.js`* Removes all removable files.`run rm.js -f txt --file lit` - edit in README.md at line 247
* Removes all files with filenames that match the regular expressions "txt" and "lit".`run rm.js -e home --server harakiri-sushi`* Removes all files from servers whose names match the regular expressions "home" and "harakiri-sushi".`run rm.js -f txt --file lit -e home --server harakiri-sushi`* Removes all files with filenames that match the regular expressions "txt" and "lit" from servers whose names match the regular expressions "home" and "harakiri-sushi". - replacement in README.md at line 343
* [See if this discussion about the hacking strategy used answers your questions](https://old.reddit.com/r/Bitburner/comments/g2ry1t/can_someone_explain_traditional_hacking_loop/). If it doesn't, feel free to contact me through one of the channels above.* [See if this discussion about the hacking strategy used answers your questions](https://web.archive.org/web/20201010181949/https://old.reddit.com/r/Bitburner/comments/g2ry1t/can_someone_explain_traditional_hacking_loop/). If it doesn't, feel free to contact me through one of the channels above.