Skip to content

Instantly share code, notes, and snippets.

@KrunoSaho
KrunoSaho / vscodeGodotDebug.json
Created June 6, 2024 04:25
VSCode .NET Godot 4 Debug tasks.json, and launch.json
// Launch
{
"version": "0.2.0",
"configurations": [
{
"name": ".NET Core Launch (console)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
"program": "godot",
<?xml version="1.0" encoding="utf-8"?>
<ItemFilter xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<name>Warlock</name>
<filterIcon>1</filterIcon>
<filterIconColor>7</filterIconColor>
<description />
<lastModifiedInVersion>1.0.0.1</lastModifiedInVersion>
<lootFilterVersion>2</lootFilterVersion>
<rules>
<Rule>
@KrunoSaho
KrunoSaho / gist:0d6f6923c84ef01d21d36ee63fa1eb07
Created October 19, 2023 06:06
Totemancer for Last Epoch
<?xml version="1.0" encoding="utf-8"?>
<ItemFilter xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<name>Totemancer</name>
<filterIcon>14</filterIcon>
<filterIconColor>8</filterIconColor>
<description />
<lastModifiedInVersion>0.9.2.7</lastModifiedInVersion>
<lootFilterVersion>0</lootFilterVersion>
<rules>
<Rule>
@KrunoSaho
KrunoSaho / gist:be2cff52b95a4eedf5446a8e3912613f
Last active February 22, 2024 04:53
Last Epoch Summoner Filter
<?xml version="1.0" encoding="utf-8"?>
<ItemFilter xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<name>Necrodancer</name>
<filterIcon>1</filterIcon>
<filterIconColor>17</filterIconColor>
<description />
<lastModifiedInVersion>1.0.0.1</lastModifiedInVersion>
<lootFilterVersion>2</lootFilterVersion>
<rules>
<Rule>
@KrunoSaho
KrunoSaho / CollectHgwData.js
Last active July 10, 2023 02:25
Batcher Total JS
import { Task, getMyServers, getThreadCountForSimpleOps, makeColour } from "Util";
function interleave(hack, grow, weaken) {
const result = [];
const max = Math.max(hack.length, grow.length, weaken.length);
for (let i = 0; i < max; i++) {
if (i < weaken.length)
result.push(weaken[i]);
if (i < grow.length)
result.push(grow[i]);
if (i < hack.length)
@KrunoSaho
KrunoSaho / Util.ts
Created July 10, 2023 02:09
BB Util
import { NS, Server } from "@ns";
import { copyHackFilesToServers } from "util/CopyFiles";
export enum Task {
Hack = "hacks/SimpleHack.js",
Grow = "hacks/SimpleGrow.js",
Weaken = "hacks/SimpleWeaken.js",
}
export enum PortMessages {
@KrunoSaho
KrunoSaho / bbb.ts
Created July 10, 2023 01:55
bitburner batcher
import { NS, Server } from "@ns";
import { Task, getMyServers, getThreadCountForSimpleOps, makeColour } from "Util";
type ServerWithThreads = { server: Server; task: Task; threads: number };
function interleave(hack: ServerWithThreads[], grow: ServerWithThreads[], weaken: ServerWithThreads[]) {
const result = [] as ServerWithThreads[];
const max = Math.max(hack.length, grow.length, weaken.length);
@KrunoSaho
KrunoSaho / automate.ts
Created July 5, 2023 13:23
bug report
import { NS } from "@ns";
import { buyAllTorStuff, buyServers, getServers, spendHashes } from "./Util";
import { getMostProfitableCrime } from "./util/Crime";
function upgradeHome(ns: NS) {
ns.singularity.upgradeHomeRam();
ns.singularity.upgradeHomeCores();
}
async function* serialBehaviour(ns: NS) {
@KrunoSaho
KrunoSaho / batcher.ts
Created July 1, 2023 05:38
Bitburner scheduler
import { NS, Player, Server } from "@ns";
import {
getThreadCountForSimpleOps,
makeColour,
getTargetServersForHack,
getPurchasedServers,
} from "Util";
type SubscriptPaths = { Path: string; Cost: number };
type ScriptInformation = { Hack: SubscriptPaths; Grow: SubscriptPaths; Weaken: SubscriptPaths };
@KrunoSaho
KrunoSaho / batcher.ts
Last active June 30, 2023 08:59
new batcher
import { NS, Server } from "../NetscriptDefinitions";
import { getThreadCount, getAllServers, breakServers, makeColour } from "./Util";
type SubscriptPaths = { Path: string; Cost: number };
type ScriptInformation = { Hack: SubscriptPaths; Grow: SubscriptPaths; Weaken: SubscriptPaths };
type Operations = "hack" | "grow" | "weaken";
type Operation = (
operation: Operations,
srcServer: string,
targetServer: string,