Skip to content

Instantly share code, notes, and snippets.

View jeroenvanwijgerden's full-sized avatar

Jeroen van Wijgerden jeroenvanwijgerden

  • The Netherlands
  • 16:12 (UTC +01:00)
View GitHub Profile
type Compose = {
<A, B>(
fn1: (x: A) => B
): (arg: A) => B;
<A, B, C>(
fn1: (x: A) => B,
fn2: (x: B) => C
): (arg: A) => C;
<A, B, C, D>(
fn1: (x: A) => B,
#!/bin/bash
# Turn off all monitors other than DP0
xrandr --output DisplayPort-0 --auto --primary --output DisplayPort-1 --off --output DisplayPort-2 --off --output HDMI-A-0 --off
# Check if the command argument is provided
if [ $# -eq 0 ]; then
exit 0
fi
@jeroenvanwijgerden
jeroenvanwijgerden / saytime.sh
Last active November 17, 2023 17:14
Says the time, e.g. at 18:09 you will hear "eightteen o' nine"
#!/bin/bash
hours=$(date +"%-H")
minutes=$(date +"%-M")
if [ ${#minutes} -eq 1 ]; then
minutes="o$minutes"
fi
spd-say "$hours $minutes"
@jeroenvanwijgerden
jeroenvanwijgerden / somtoday-allen-afwezig.js
Created October 30, 2022 05:36
In een Somtoday lesregistratie, zet alle lln afwezig.
// ==UserScript==
// @name Somtoday Allen Afwezig
// @namespace http://tampermonkey.net/
// @version 1.0
// @description In een Somtoday lesregistratie, zet alle lln afwezig.
// @author Jeroen van Wijgerden
// @match https://docent.somtoday.nl/rooster/les/*/registratie
// @grant none
// ==/UserScript==
@jeroenvanwijgerden
jeroenvanwijgerden / tampermonkey-slidedeck.js
Created October 30, 2022 04:55
Tampermonkey script to create a slide deck of the images on a page.
// ==UserScript==
// @name SlideDeck
// @namespace http://tampermonkey.net/
// @version 1.0
// @description Creates a slide deck of images on page. Arrow keys to navigate.
// @author Jeroen van Wijgerden
// @match *://*/*
// @grant none
// ==/UserScript==
@jeroenvanwijgerden
jeroenvanwijgerden / cyoa.js
Last active March 26, 2022 12:06
small Choose Your Own Adventure program in JavaScript
const states = {
1 : ["You are in a dark dungeon. In front of you a heavy oaken door stands ajar. Behind you is a hole from which foul odors rise.",
[[2, "Go through the door.", "You go through the door."],
[3, "Go down the hole.", "As you carefully clamber down the hole, your grip slips and you plummet into the darkness."]]],
2 : ["You are in a narrow, dimly lit corridor. To your left is more darkness, to your right is light.",
[[3, "Go left.", "As you walk, your foot lands of a pressure plate. With the low rumble of stone against stone, the floor opens and you fall down."],
[4, "Go right.", "You walk along the corridor."]]],
3 : ["After a monstrous splash you emerge, gasping, from filth-laden water. In the distance you see the edge of the sewage canal. Below the surface you feel that you're standing on some sort of log.",
[[5, "Swim to the edge.", "After many strokes through the murky water you hoist yourself onto the edge."],
[6, "Dive to