This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** @param {NS} ns **/ | |
export async function main(ns) { | |
var paybackLimit = 24 * 60 * 60; | |
var sleepMilliseconds = 5 * 1000; | |
var budgetPercentage = 0.5; | |
while (true) { | |
var budget = ns.getServerMoneyAvailable('home'); | |
budget *= budgetPercentage; //Don't want to spend all money on hacknet, allow 33% but change this if wanted | |
var nodeNumber = ns.hacknet.numNodes(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$appPools = Get-WebConfiguration -Filter '/system.applicationHost/applicationPools/add' | |
foreach($appPool in $appPools) | |
{ | |
Write-Host $appPool.Name " => userName:"$appPool.ProcessModel.UserName" => Password "$appPool.ProcessModel.Password | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Module | |
{ | |
public class Module | |
{ | |
IData data {get; set;} | |
public Module() | |
{ | |
data = DataFactory.Create(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Module.Data | |
{ | |
public class DataFactory | |
{ | |
private static IData data; | |
static IData Create(IData datasubstitute = null) | |
{ | |
if (datasubstitute != null) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import task1.py | |
import unittest | |
class TestSequenceFunctions(unittest.TestCase): | |
def test1(self): | |
pass | |
if __name__ == '__main__': |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Objective-C methods for Base64 conversion between NSString and NSData. | |
// Note: these do not support trailing '=' characters. | |
// License: Public Domain | |
// Author: Leonard van Driel, 2012 | |
static unsigned char toBase64String[65] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; | |
static unsigned char toBase64Data[256] = { | |
64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, | |
64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, |