Skip to content

Instantly share code, notes, and snippets.

function flatten(arr) {
return arr.reduce(function (flat, toFlatten) {
return flat.concat(Array.isArray(toFlatten) ? flatten(toFlatten) : toFlatten);
}, []);
}
@manojktechie
manojktechie / md5-example.go
Created January 19, 2017 22:02 — forked from sergiotapia/md5-example.go
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))
}
{
"public_identifier":"manojktechie",
"profile_pic_url":"https://s3.us-west-000.backblazeb2.com/proxycurl/person/manojktechie/profile?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=0004d7f56a0400b0000000001%2F20240512%2Fus-west-000%2Fs3%2Faws4_request&X-Amz-Date=20240512T031759Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=138938b422e96bc6fb502ee7408a3a862952cb796d7080edeff7f905dd3b93d7",
"background_cover_image_url":"None",
"first_name":"Manoj",
"last_name":"Kumar",
"full_name":"Manoj Kumar",
"follower_count":1337,
"occupation":"Technical Lead at Department of Government Enablement",
"headline":"Experienced Full Stack Developer | Certified in Node.js and AWS | Passionate about AI & Machine Learning",