Skip to content

Instantly share code, notes, and snippets.

View iMplode-nZ's full-sized avatar

iMplode nZ iMplode-nZ

View GitHub Profile
@iMplode-nZ
iMplode-nZ / configmdadm.sh
Last active March 30, 2022 18:07
Raid0 for Ubuntu (Zorin OS), NVME ssds
#!/bin/sh
PREREQ='mdadm mdrun'
prereqs() {
echo "$PREREQ"
}
case $1 in
prereqs)
prereqs
exit 0
@iMplode-nZ
iMplode-nZ / lockstep.js
Created November 17, 2020 22:20
Short thing for deterministic lockstep.
const playerId = 123; // Unique ID.
let tick = 0;
let minTick = 0;
const state = [/* INITIAL STATE*/];
const inputs = [[]];
(function run() {
tick++;
// currentInputs is an array of all inputs. Each input is of an "input" type.
// Inputs is an array of inputs, ordered by tick, with each input containing a .playerId which is the