Skip to content

Instantly share code, notes, and snippets.

@keesey
keesey / levenshtein.ts
Last active February 14, 2024 10:59
Levenshtein distance implemented in TypeScript
export function levenshtein(a: string, b: string): number
{
const an = a ? a.length : 0;
const bn = b ? b.length : 0;
if (an === 0)
{
return bn;
}
if (bn === 0)
{
@zlorb
zlorb / linux_fun.md
Last active June 19, 2024 08:24 — forked from marianposaceanu/linux_fun.md
How to have some fun using the terminal.

Linux fun-o-matic

How to have some fun using the terminal.

  1. Install cowsay [0] via : sudo apt-get install cowsay
  2. Install fortune [1] via : sudo apt-get install fortune
  3. Install figlet [3] via : sudo apt-get install figlet
  4. Make sure you have Ruby installed via : ruby -v
  5. Install the lolcat [2] via : gem gem install lolcat
  6. (option) Add to .bash_profile and/or .bashrc