Skip to content

Instantly share code, notes, and snippets.

View EricEisaman's full-sized avatar

SirFizX EricEisaman

View GitHub Profile
@EricEisaman
EricEisaman / Prologue.js
Last active August 12, 2023 15:41
Prologue Logging Utility
class Prologue {
constructor() {
this.originalConsole = {
log: console.log,
warn: console.warn,
error: console.error,
};
const urlParams = new URLSearchParams(window.location.search);
const logsParam = urlParams.get("logs");
@EricEisaman
EricEisaman / hello_world.py
Created March 17, 2024 16:11 — forked from matthen/hello_world.py
Hello world in python, using genetic algorithm
"""Hello world, with a genetic algorithm.
https://twitter.com/matthen2/status/1769368467067621791
"""
import random
import time
from dataclasses import dataclass
from itertools import chain
from typing import Iterable, List
/**
* Bundled by jsDelivr using Rollup v2.79.1 and Terser v5.19.2.
* Original file: /npm/xstate@5.13.0/dist/xstate.esm.js
*
* Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
*/
var t="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function e(){const e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==t?t:void 0;if(e.__xstate__)return e.__xstate__}const s=t=>{if("undefined"==typeof window)return;const s=e();s&&s.register(t)};class n{constructor(t){this._process=t,this._active=!1,this._current=null,this._last=null}start(){this._active=!0,this.flush()}clear(){this._current&&(this._current.next=null,this._last=this._current)}enqueue(t){const e={value:t,next:null};if(this._current)return this._last.next=e,void(this._last=e);this._current=e,this._last=e,this._active&&this.flush()}flush(){for(;this._current;){const t=this._