Skip to content

Instantly share code, notes, and snippets.

@vbatts
Last active January 27, 2018 16:12
Show Gist options
  • Save vbatts/ed28cddc23d6d2123e0c0295b278471b to your computer and use it in GitHub Desktop.
Save vbatts/ed28cddc23d6d2123e0c0295b278471b to your computer and use it in GitHub Desktop.
๐Ÿ™ ๐Ÿ“Ž Emoji that checksum! ๐ŸŽ‰ ๐Ÿ’ฉ

emojisum

๐Ÿ™ ๐Ÿ“Ž Emoji that checksum! ๐ŸŽ‰ ๐Ÿ’ฉ

I attempted a curated list of 256 emojis that are not entirely similar. Using http://www.webpagefx.com/tools/emoji-cheat-sheet/ to compare them. I went with 256 as that is 8bit/1byte, and the hexadecimal output that is 2 hex characters.

So 1 emoji is 2 hex positions.

new home

Source lives ๐Ÿ‘‰ https://github.com/vbatts/emojisum

build

go get github.com/vbatts/emojisum

usage

emojisum main.go 
SHA1(main.go)=  14b09535217ca8f5f47f4665e2266e686f0728b4
SHA1(main.go)=  :bird::red_car::on::crystal_ball::calendar::lemon::pray::warning::violin::lollipop::facepunch::hearts::tm::children_crossing::hourglass::heavy_plus_sign::house::ant::clap::rocket:
SHA1(main.go)=  ๐Ÿฆ ๐Ÿš— ๐Ÿ”› ๐Ÿ”ฎ ๐Ÿ“† ๐Ÿ‹ ๐Ÿ™ โš ๏ธ๐ŸŽป ๐Ÿญ ๐Ÿ‘Š โ™ฅ๏ธโ„ข๏ธ๐Ÿšธ โŒ›๏ธโž• ๐Ÿ  ๐Ÿœ ๐Ÿ‘ ๐Ÿš€ 

And pretty markdown, like so!

SHA1(main.go)= ๐Ÿฆ๐Ÿš—๐Ÿ”›๐Ÿ”ฎ๐Ÿ“†๐Ÿ‹๐Ÿ™โš ๏ธ๐ŸŽป๐Ÿญ๐Ÿ‘Šโ™ฅ๏ธโ„ข๏ธ๐ŸšธโŒ›โž•๐Ÿ ๐Ÿœ๐Ÿ‘๐Ÿš€

pass in the checksums

Rather than relying on this simple tool to do the checksum itself, you will likely want to rely on OpenSSL or coreutils for checksumming. emojisum can just take those formats on stdin:

$> sha1sum main.go | emojisum -parse-coreutils
7656835947b4c6da272023c56b6f2529511bf88b  main.go
:jp::gb::metal::goat::family::rocket::smiley_cat::swimmer::chocolate_bar::cactus::candy::smile::honeybee::house::cherries::cloud::fries::bow::wavy_dash::musical_score:  main.go
๐Ÿ‡ฏ๐Ÿ‡ต ๐Ÿ‡ฌ๐Ÿ‡ง ๐Ÿค˜ ๐Ÿ ๐Ÿ‘ช ๐Ÿš€ ๐Ÿ˜บ ๐ŸŠ ๐Ÿซ ๐ŸŒต ๐Ÿฌ ๐Ÿ˜„ ๐Ÿ ๐Ÿ  ๐Ÿ’ โ˜๏ธ ๐Ÿ™‡ ใ€ฐ๏ธ ๐ŸŽผ   main.go
$> openssl sha1 main.go |emojisum -parse-openssl
SHA1(main.go)= 7656835947b4c6da272023c56b6f2529511bf88b
SHA1(main.go)= :jp::gb::metal::goat::family::rocket::smiley_cat::swimmer::chocolate_bar::cactus::candy::smile::honeybee::house::cherries::cloud::fries::bow::wavy_dash::musical_score:
SHA1(main.go)= ๐Ÿ‡ฏ๐Ÿ‡ต ๐Ÿ‡ฌ๐Ÿ‡ง ๐Ÿค˜ ๐Ÿ ๐Ÿ‘ช ๐Ÿš€ ๐Ÿ˜บ ๐ŸŠ ๐Ÿซ ๐ŸŒต ๐Ÿฌ ๐Ÿ˜„ ๐Ÿ ๐Ÿ  ๐Ÿ’ โ˜๏ธ ๐Ÿ™‡ ใ€ฐ๏ธ ๐ŸŽผ 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment