Skip to content

Instantly share code, notes, and snippets.

View the-mikedavis's full-sized avatar

Michael Davis the-mikedavis

View GitHub Profile
@the-mikedavis
the-mikedavis / jaro.erl
Last active January 6, 2025 22:32
-module(jaro).
-export([distance/2]).
%% This is an Erlang translation of Elixir's `String.jaro_distance/2'.
%% Upstream: https://github.com/elixir-lang/elixir/blob/v1.15.7/lib/elixir/lib/string.ex#L2784-L2879.
%% Jaro Distance is relatively simple - only transpositions of grapheme
%% clusters are allowed which is much simpler than other edit distance
%% measurements like Damerau–Levenshtein (insertion, deletion, substitution
@the-mikedavis
the-mikedavis / BUILD
Created January 19, 2023 16:14
Bazel resize exit MWE
load("//:defs.bzl", "build_run", "build_test")
build_run(name = "hello-run")
build_test(name = "hello-test")
@the-mikedavis
the-mikedavis / erlang.kak
Last active January 6, 2025 22:31 — forked from subsetpark/erlang.kak
A half-baked kakoune language file for erlang.
# Detection
# ---------
hook global BufCreate .*[.](erl|hrl|app\.src) %{
set-option buffer filetype erlang
}
hook global BufCreate .*/rebar.config %{
set-option buffer filetype erlang
}