Skip to content

Instantly share code, notes, and snippets.

@stolksdorf
stolksdorf / haikus.md
Last active May 1, 2024 01:56
Haikubot

Coolsville Haikus

[in #hmmm on 2019-4-2 at 12:43:20]

>Is it alright?

>I guess it must be ok

>Hoo bop bop bop

@stolksdorf
stolksdorf / UHC Commands
Last active January 29, 2024 03:13
List of commands to setup UHC mode
/*
Run these comamnds as OP as you setup the server
The only need to be ran once and are not player specific
*/
//add "playing" team
/scoreboard teams add Playing
//add death counter
/scoreboard objectives add Deaths deathCount Deaths
@stolksdorf
stolksdorf / MInecraft UHC Primer.md
Last active October 5, 2022 00:20
A primer for playing Minecraft UHC for players with little experience with Minecraft.

Minecraft UHC

Ultra Hardcore is amode of Minecraft that closely resembles the Hunger Games. Players are dropped randomly in a bounded landscape with nothing. From there you make scanvenge, build tools, and hunt down other players Battle Royal style.

The two major modifications to Vanilla Minecraft are firstly we're disabling the night/day cycle and secondly disabling health regeneration. The former to allow for more player interaction and less deaths from aggressive mobs. The latter so every point of damage is permanent, so running away to regen health is not viable, and small things, like fall damage, must be accounted for.

This primer will cover the basics, new additions to the game that are useful, PvP advice, and some more advance tactics yourself and other players may use.

Basics

@stolksdorf
stolksdorf / map_reduce.js
Last active July 19, 2022 05:18
A collection of useful one-liners I tend to use
/* Non-mutating */
const map = (obj,fn)=>Object.keys(obj).map((key)=>fn(obj[key],key));
const reduce = (obj,fn,init)=>Object.keys(obj).reduce((a,key)=>fn(a,obj[key],key),init);
const filter = (obj,fn)=>Object.keys(obj).reduce((a,key)=>!!fn(obj[key],key)?a.concat(obj[key]):a,[]);
const times = (n,fn)=>Array.apply(null,{length:n}).map((_,i)=>fn(i));
const construct = (obj,fn)=>Object.keys(obj).reduce((a,key)=>{const [k,v]=fn(obj[key],key);a[k]=v;return a;},{});
const sequence = async (obj,fn)=>Object.keys(obj).reduce((a,key)=>a.then((r)=>fn(obj[key],key,r)), Promise.resolve());

(This is a brief summary of Ethereum's white paper)

Ethereum 101

What is Ethereum

Ethereum is a new cryptocurrency, like Bitcoin or Litecoin, that adds a number of new features. Most notably the inclusion of Agents (also known as Contracts); Independent Turing-complete programs that exist on the Ethereum blockchain. These Agents can receive Ether (Ethereum's currency) and other inputs, perform computations, hold balances, transfer Ether, and even activate other Agents.

Ethereum also attempts to fix some current issues with cryptocurenncy mining, such as rise of specialized hardware, large mining pools that aim to control the network, and the lack of reward for stale blocks, dissuading miners with weaker hardware.

Agents

@stolksdorf
stolksdorf / bolani.md
Created April 12, 2022 22:33
[recipe]
@stolksdorf
stolksdorf / basic_bread.md
Last active April 9, 2022 19:58
[recipe] Various Breads
@stolksdorf
stolksdorf / audrianna_bread.md
Last active April 1, 2022 20:10
recipe - My Recipes

Oatmeal Bread

(from Galilee Bible Camp)

I use the dough cycle on a bread machine and add the ingredients in the following order:

1.5 c water 3 T oil 1.5 T molasses 1.5 T sugar

[context: a friend shared an infographic about how companies lose good talent, my response ballooned into a massive essay/rant. Enjoy]

I've been studying this a bunch to try and understand why business are ran so weird compared to like 30-50 years ago. It's become "more profitable" to have higher turn-over, higher burnout, more bullshit jobs, incompeteance rewarded and promoted. There's a bunch of factors at play here.

1. No Slack at Work

There's no slack at work anymore. Demands on a business are variable; seasonal sales, new competitors, regulation changes. Short-term Resources available to a business are variable; goods shortages, sick workers, environmental issues (pandemic), onbarding new workers, training.

So you have these two flucating variables. When supply is greater than demand it creates a surplus of potential output, when demand is greater, a shortage of potential output. Both cases are bad for businesses, so the goal is to minimize the total delta. However since you can't control these

@stolksdorf
stolksdorf / js_pad.md
Last active August 22, 2021 18:21
js pad - a bookmarklet for js fiddling

js_pad

a micro javascript sandbox to play around in

Make a new bookmark, then copy and paste this as the URL:

data:text/html,<html contenteditable onkeyup="try{this.style.color='rgb(240,239,208)';console.clear();eval(this.innerText);}catch(err){this.style.color='rgb(223,175,143)';console.log(err);}"><title>js_pad</title><style>html{background:rgb(63,63,63);color:rgb(240,239,208);font-size:1.5em;font-family:Monospace}</style></html>

how it works

uses contenteditable to make the root html element edittable. On every keypress it evals the page's content. Changes the text color if it's valid code or not. Open dev tools and use console.log to see the results for your code.