Skip to content

Instantly share code, notes, and snippets.

Explorable Explanations Design Patterns

Experiencing (First Person + Third Person)

Play the algorithm. Put the reader in the "mind" of the algorithm (first person) while also seeing the algorithm's high level behavior (third person).

@Glench
Glench / gist:8508781
Created January 19, 2014 18:19
get wikipedia titles in a file
curl http://dumps.wikimedia.org/enwiki/latest/enwiki-latest-all-titles-in-ns0.gz | gunzip | sed 's/_/ /g' | grep -v '(redirect)$'
@grenade
grenade / 01-generate-ed25519-ssh-key.sh
Last active March 2, 2025 00:42
generate ed25519 ssh and gpg/pgp keys and set file permissions for ssh keys and config
#!/bin/bash
mkdir -p ~/.ssh
# generate new personal ed25519 ssh keys
ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_ed25519 -C "rob thijssen <[email protected]>"
ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_robtn -C "rob thijssen <[email protected]>"
# generate new host cert authority (host_ca) ed25519 ssh key
# used for signing host keys and creating host certs
"""Analyze a log of a text communication, looking for distinct discussions."""
from collections import Counter, deque
import re
import string
import sys
LINE_RE = re.compile(r"^(?P<timestamp>[\d:]+)\s"
r"<\W?(?P<nick>[\w|^`[\]]+)>\s"
r"(?P<message>.*)$")