Skip to content

Instantly share code, notes, and snippets.

View heathkit's full-sized avatar

Michael Giambalvo heathkit

View GitHub Profile
### Keybase proof
I hereby claim:
* I am mgiambalvo on github.
* I am heathkit (https://keybase.io/heathkit) on keybase.
* I have a public key whose fingerprint is F2CE F326 8999 D65F C4D2 3847 46C4 204B 6195 955E
To claim this, I am signing this object:
noremap i a
noremap g d
noremap w <UP>
noremap a <LEFT>
noremap s <DOWN>
noremap d <RIGHT>
noremap W H
noremap S L
var lm = {
buildDefaultAccumulator: function() {
return new lm.Accumulator(0);
},
version: '0.1'
};
lm.Accumulator = function(initial) {
this.value = initial;
#include <iostream>
#include <memory>
class Foobar
{
private:
int _array[10];
public:
Foobar() {
for( int i=0; i<10; i+=1)
You are Flort, a wizard living in the kingdom of Larion. You have a staff and
a spellbook. You finish your long journey and finally arrive at the ruin you've
been looking for. You look around and see that it's not much different than
when you left it. The ground is cracked and worn down, but otherwise there isn't
anything special about this place.
You enter the ruined structure and begin to search the area
> read spellbook
Flort opens up his spellbook and begins to study the pages. He looks through
several spells before he finds one that seems to be appropriate for what he
@heathkit
heathkit / gist:77d47742b15a009054f8899f9bc683bc
Created December 1, 2021 20:10
Shopify JSON template with customization
{
"sections": {
"main": {
"type": "main-product",
"blocks": {
"vendor": {
"type": "text",
"disabled": true,
"settings": {
"text": "{{ product.vendor }}",
// deploy.js
/** @param {NS} ns */
export async function main(ns) {
let previousHost = ns.args[0]
ns.printf("Previous host: %s", previousHost)
let currentHost = ns.getHostname()
let hosts = ns.scan()
for (let host of hosts) {
if (host === previousHost) continue;
if (ns.getServerRequiredHackingLevel(host) < ns.getHackingLevel()) {
let servers = [];
/** @param {NS} ns */
export async function main(ns) {
ns.disableLog("ALL")
let previousHost = ns.args[0];
ns.printf("Previous host: %s", previousHost);
let currentHost = ns.getHostname();
ns.tail()
await scan(ns, currentHost);
/**
* TODO
* - job chunking
* - determine ideal growth factor based on resource?
* - determine hack amount based on resources (or as parameter)
*/
/** @param {NS} ns */
export async function main(ns) {
let target = ns.args[0]
ns.disableLog('ALL')
// optimal_hack.js
/**
* TODO
* - split jobs to fit in available machines
* - determine ideal growth factor based on resource?
* - determine hack amount based on resources (or as parameter)
*/
/** @param {NS} ns */
export async function main(ns) {