Skip to content

Instantly share code, notes, and snippets.

@jokershigh
jokershigh / FuzzyMatching.md
Created July 28, 2024 03:49 — forked from GolezTrol/FuzzyMatching.md
Fuzzy matching algorithm for Delphi, originally inspired by Sublime

Fuzzy matching algorithm for Delphi/FreePascal

Returns if all characters of a given pattern are found in a string, and calculates a matching score Applies case insensitive matching, although case can influcence the score

Based on the C++ version by Forrest Smith: Original source, Blog

Adapted slightly for own use, especially:

  • Calculation corrected for double byte chars
@jokershigh
jokershigh / client.go
Created November 10, 2022 03:38 — forked from spikebike/client.go
TLS server and client
package main
import (
"crypto/tls"
"crypto/x509"
"fmt"
"io"
"log"
)
@jokershigh
jokershigh / sign.go
Created November 9, 2022 00:48 — forked from raztud/sign.go
Sign string with go and openssl
package main
/**
With openssl command:
# echo -n "string to sign" | openssl rsautl -inkey private.key -sign|base64
or with openssl + sha256 (if it is used SignSHA256 function)
# openssl dgst -sha256 -sign private.key -out sign.txt.sha256 <(echo -n "string to sign") ; cat sign.txt.sha256 | base64
With sign.go