Project

shamazing

0.01
No commit activity in last 3 years
No release in over 3 years
A library to discover amazing things about a SHA1 hash (or MD5 or whatever). It's sha-mazing. Almost as shamazing as that pun.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 0.16.0
 Project Readme

shamazing

A library to discover amazing things about a SHA1 hash (or MD5 or whatever). It's sha-mazing. Almost as shamazing as that pun.

Areas of shamazingness

  • Longest string (9c2cddfaedaea9689a22e37aaa20191041554fe8)
  • Longest integer (9c2cddfaedaea9689a22e37aaa20191041554fe8)
  • Longest repeating sequence (9c2cddfaedaea9689a22e37aaa20191041554fe8)

Install

gem install shamazing

Usage

Command Line Interface

$ shamazing 9c2cddfaedaea9689a22e37aaa20191041554fe8
Longest string: cddfaedaea
Longest integer: 20191041554
Longest repeating: aaa

$ shamazing 9c2cddfaedaea9689a22e37aaa20191041554fe8 --string
cddfaedaea

$ shamazing 9c2cddfaedaea9689a22e37aaa20191041554fe8 -s
cddfaedaea

$ shamazing 9c2cddfaedaea9689a22e37aaa20191041554fe8 --integer
20191041554

$ shamazing 9c2cddfaedaea9689a22e37aaa20191041554fe8 -i
20191041554

$ shamazing 9c2cddfaedaea9689a22e37aaa20191041554fe8 --repeating
aaa

$ shamazing 9c2cddfaedaea9689a22e37aaa20191041554fe8 -r
aaa

# Search through the shas using `git log --format="%H"` in the current directory.
$ shamazing -s
cddfaedaea

# Return the full SHA with --full
$ shamazing --full
Longest string: 17705a5a37fbd11017f0d5e053b474dabbbd4022
Longest integer: 0c4b61fc2c5e7dd5566d42d0de1c431984899ddf
Longest repeating: 17705a5a37fbd11017f0d5e053b474dabbbd4022

Ruby Interface

require 'shamazing'

sha = '9c2cddfaedaea9689a22e37aaa20191041554fe8'

Shamazing.string(sha)
# => cddfaedaea

Shamazing.integer(sha)
# => 20191041554

Shamazing.repeating(sha)
# => aaa

shas = %w(
  fdb31214c2cca29e4f723ad676cddb043bd73986
  0c4b61fc2c5e7dd5566d42d0de1c431984899ddf
  9c2cddfaedaea9689a22e37aaa20191041554fe8
  f1b4c270f6746cbfff99bbf0f5a2388f4e509943
)
Shamazing.string_from_array(shas)
# => cddfaedaea
Shamazing.integer_from_array(shas)
# => 20191041554
Shamazing.repeating_from_array(shas)
# => fff

An Holman Project

Just a little diddy for dicking around with all these hashes. Made by @holman.