Skip to content

Instantly share code, notes, and snippets.

@felko
felko / migrate.py
Last active May 2, 2020 20:41
Migrate neuron zettelkastens to the new hash ID format
#!/usr/bin/env python3.8
import re
import sys
import os
import uuid
from pathlib import Path
import glob
import time
import datetime
@felko
felko / migrate.py
Last active May 2, 2020 22:09
Migrate your zettelkasten to the new link format
#!/usr/bin/env python3.8
import os
import sys
import re
import glob
ZK, = sys.argv[1:]
def make_link_regex(url_regex):
@felko
felko / TreeModule.scala
Last active September 28, 2024 10:05
Trees that grow in Scala 3 using match types
package amyc.ast
import amyc.utils.Positioned
/* A polymorphic module containing definitions of Amy trees.
*
* This trait represents either nominal trees (where names have not been resolved)
* or symbolic trees (where names/qualified names) have been resolved to unique identifiers.
* This is done by having two type fields within the module,
* which will be instantiated differently by the two different modules.