Skip to content

Instantly share code, notes, and snippets.

jon at kestrel in ~/fs/git/kubernetes-client-haskell(master|…)
$ git reset --hard
HEAD is now at 94ee7cc Merge pull request #92 from jonschoning/fix-incorrectly-generated-querystrings

jon at kestrel in ~/fs/git/kubernetes-client-haskell(master|…)
$ stack build
kubernetes-client-core> build (lib)
kubernetes-client-core> Preprocessing library for kubernetes-client-core-
kubernetes-client-core> Building library for kubernetes-client-core-
jonschoning /
Created Nov 4, 2021 — forked from snth/
Procedural version of do nothing script
import sys
def wait_for_enter():
input("Press Enter to continue: ")
def create_ssh_keys(context):
ssh-keygen -t rsa -f ~/{username}
View klein-ps
/usr/bin/xscreensaver -nosplash
xwinwrap -b -fs -sp -fs -nf -ov -- nice -n 19 /usr/lib/xscreensaver/klein -root -view-mode walk -mode wireframe -speed-wx 0.01 -speed-wy 0.01 -speed-wz 0.01 -speed-xy 0.1 -speed-xz 0.01 -speed-yz 0.01 -walk-direction -14.3363 -walk-speed .03 -window-id WID
/usr/lib/xscreensaver/klein -root -view-mode walk -mode wireframe -speed-wx 0.01 -speed-wy 0.01 -speed-wz 0.01 -speed-xy 0.1 -speed-xz 0.01 -speed-yz 0.01 -walk-direction -14.3363 -walk-speed .03 -window-id 0x5c00001
View pactl-obsvirtual
pactl load-module module-null-sink sink_name="obsvirtual_sink" sink_properties=device.description="obsvirtual" # Create Sink
pactl load-module module-remap-source source_name="obsvirtual_source" master="obsvirtual_sink.monitor" # Create Source
jonschoning / facebook-messages-declutter.js
Last active Nov 29, 2020
Facebook messages: Declutter
View facebook-messages-declutter.js
// ==UserScript==
// @name Facebook messages: Declutter
// @version 1
// @grant none
// ==/UserScript==
const SPECS =
[ { selectors: `._4_j5`, description: 'remove right pane', action: action_remove, enabled: true }
jonschoning /
Created Nov 27, 2020 — forked from angerman/
Cross compiling ws-tunnel
# prefetch wstunnel's master for nix, and store the result in wstunnel.json
nix-prefetch-git > wstunnel.json
# and build the wstunnel-tarball with nix, using the haskell.nix infra structure as above (see default.nix)
nix build \
-f default.nix \
rpi64-musl.wstunnel-tarball \
-o rpi64-musl-wstunnel-tarball
--arg wstunnel-json ./ws-tunnel.json
View records.cs
using System;
static void Run()
Employee foo = new Employee("Aysha", "Stein", "1234");
Person bar = (Person)foo with { FirstName = "John", LastName = "Doe"};
Console.WriteLine($"foo: {foo}");
Console.WriteLine($"bar: {bar}");
View .xscreensaver
# XScreenSaver Preferences File
# Written by xscreensaver-demo 5.42 for jon on Mon May 4 21:24:53 2020.
timeout: 1:00:00
cycle: 1:00:00
lock: True
lockTimeout: 0:00:00
passwdTimeout: 0:05:00
visualID: default
View index.html
<!DOCTYPE html>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<title>Random Roads</title>
<link href="style.css" rel="stylesheet" type="text/css" />
<script src="//"></script>

Monads and delimited control are very closely related, so it isn’t too hard to understand them in terms of one another. From a monadic point of view, the big idea is that if you have the computation m >>= f, then f is m’s continuation. It’s the function that is called with m’s result to continue execution after m returns.

If you have a long chain of binds, the continuation is just the composition of all of them. So, for example, if you have

m >>= f >>= g >>= h

then the continuation of m is f >=> g >=> h. Likewise, the continuation of m >>= f is g >=> h.