hopfoki.blogg.se

Github bitburner scripts
Github bitburner scripts






  1. #Github bitburner scripts for free
  2. #Github bitburner scripts how to
  3. #Github bitburner scripts install

Note that the optimal split is likely far from 50/50. If weaken would run faster, you need to sleep your script a bit before you run weaken. Then instead of using all available memory for starting grow, use half. Figure out a way to see how long weaken() and grow() will take (hint: the documentation  has functions for this). Thus, if we start our weaken before the grow finishes, it will be way faster. The time taken by weaken(), grow() and hack() is calculated by the server and player status at the start of the operation. What if we could start weakening while the grow is in progress, thus doing the tasks in parallel? We actually can: In my case, the obvious time sink was the weaken directly after grow, because the grow increased security significantly. Start by printing to log the time spent on each step. Let’s assume we’ve gotten to the point where a server is prepped (min security and max money reached) so that our loop is approximately weaken -> grow -> weaken -> hack. In general for optimizations, it’s important to measure what parts of our algorithms has the longest impact on performance. In the early game when most of your ram comes from random servers you’ve rooted, this can count for quite an increase.

#Github bitburner scripts for free

If the control script takes approximately twice the ram of a single thread of weaken.ns, grow.ns or hack.ns, we get 2 additional threads on each of our rooted servers for free by using this technique. The goal here is to write a control script that we run on our home computer, which can spawn weaken.ns grow.ns and hack.ns on other servers – leaving us with all their memory free for doing important jobs. But if we are just attacking the most profitable target with all of these servers of ours anyway, why not stick to a single control script on one server and let it control the others? But if we analyze ram usage on our rooted servers, we see that the actual weaken.ns, grow.ns and hack.ns scripts don’t use all the available ram because the control script takes up quite a chunk. If you deploy this hacking script to each server you have root on, you should be progressing quite well. Since only weaken() grow() and hack() benefit from using additional threads, separating them from everything else will let you run more threads and thus gain a higher payoff.Īt this point it’s worth having the API documentation  handy. When writing scripts you might notice that their ram requirements increase as you use more ns functions. Note that speed here refers to the execution time, not how fast your weaken() grow() and hack() functions run – that is determined by hacking skill. Netscript2 is very close to modern javascript, and their speed is only limited by your computer. script files which are used in the tutorial, are slow and low on features. The first step is to start using netscript2. You might think it’s slow (and you’d be right) and that’s because there are several improvements you can make. Īt this point you have a script that will continuously weaken, grow and hack a given server.

#Github bitburner scripts how to

Github.In addition the the ingame tutorial, there’s a good guide on how to get a decent hacking script started in the online documentation. Use githubhook library at /home/deployer/deploy/server.js var execFile = require('child_process').execFile

github bitburner scripts

#Github bitburner scripts install

Sudo -u deployer npm install -save githubhook Sudo -u deployer mkdir /home/deployer/deploy # but use our deployer user's home directory Within our "production" server: # Log in as user fideloper for sudo Sudo apt-get install -y nodejs Create Listener Here's a Node.JS version of a webhook listener! Install Node.JS curl -sL | sudo bash. Anything that can listen for web hooks will do, but I like NodeJS because small, can listen over HTTP without need of being proxied to from a web server (Nginx, Apache, etc), and can run shell scripts in a solid fashion.

github bitburner scripts

We need a web listener listening for Github webhooks. Paste the contents of the id_rsa.pub file into the Github repository as a deploy hook within the repository settings. On the production server, generate an SSL certificate for the deploy user, and add the resulting public key to Github as a Deploy hook.Ĭreate id_rsa if not exists, else use id_rsa.pub: cd ~/.ssh Let's get to automating! This video will show you how to use NodeJS to listen for GitHub webhooks, and kick off an automated (zero-downtime!) deployment script when we push to our master branch.We'll setup an SSH keypair and install NodeJS so that the server can listen for web hooks and can push/pull to and from the project repository.








Github bitburner scripts