Skip to content

Instantly share code, notes, and snippets.

View DjLeChuck's full-sized avatar

Vivien DE BONA DjLeChuck

View GitHub Profile
@sergiotapia
sergiotapia / md5-example.go
Last active December 5, 2023 03:53
Golang - How to hash a string using MD5.
import (
"crypto/md5"
"encoding/hex"
)
func GetMD5Hash(text string) string {
hasher := md5.New()
hasher.Write([]byte(text))
return hex.EncodeToString(hasher.Sum(nil))
}
@Olousouzian
Olousouzian / symfony-tail-dev-color.sh
Created May 9, 2016 15:11
Symfony tail -f color synthax.
tail -f app/logs/dev.log | awk '
/(request|app)\.INFO/ {print "\033[36m" $0 "\033[39m"}
/(request|app)\.WARNING/ {print "\033[33m" $0 "\033[39m"}
/(request|app)\.ERROR/ {print "\033[31m" $0 "\033[39m"}
/(request|app)\.CRITICAL/ {print "\033[31m" $0 "\033[39m"}
'