zjcqoo

发现一个有趣的工具,可以自定义 git commit hash 的前几位

  •  
  •   zjcqoo · Mar 14, 2017 · 2010 views
    This topic created in 3350 days ago, the information mentioned may be changed or developed.

    刚刚在想,是不是可以通过跑 hash 的方式,自定义 git commit hash 值的前几位。

    于是去网上搜了下,发现之前就有人做过了:

    https://github.com/not-an-aardvark/lucky-commit/commits/master

    不过这个是用 nodejs + 字符串计算的,所以效率比较低。当然,只匹配前 28 bit 的话也用不了多久。

    昨天写的 SHA256 挖连续 28 bit 用 GPU 也就几秒钟够了, SHA1 的话应该更快。

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2773 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 40ms · UTC 11:01 · PVG 19:01 · LAX 04:01 · JFK 07:01
    ♥ Do have faith in what you're doing.