Skip to content

Instantly share code, notes, and snippets.

function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms))
}
function gong() {
const audio = new Audio("https://bustadice.com/5bb187b7ef764e76fb519939f77288c1.mp3")
audio.play()
return new Promise(resolve => audio.onended = resolve)
}
await gong()
@danielevns
danielevns / main.js
Last active December 14, 2022 04:28
bustabit.com v2 history generation
const { createHash, createHmac } = require("crypto");
const salt = "0000000000000000004d6ec16dafe9d8370958664c1dc422f452892264c59526"; // chosen in seeding event: https://bitcointalk.org/index.php?topic=2807542.msg28778130#msg28778130
let [id, hash] = process.argv.slice(2);
id = Number(id);
if (Number.isNaN(id) || !Number.isSafeInteger(id) || id < 1) {
printUsageMessage();
process.exit(1);

Keybase proof

I hereby claim:

  • I am danielevns on github.
  • I am devans (https://keybase.io/devans) on keybase.
  • I have a public key ASDGGrF8we_up6CUGg-pwrG6N1F_IaH41XRzitAUYyXptwo

To claim this, I am signing this object:

2018-01-01 $34,121,136.38
2018-02-01 $996,376,713.88
2018-03-01 $62,256,276.78
2018-04-01 $55,414,979.30
2018-05-01 $64,872,011.18
2018-06-01 $64,930,742.51
2018-07-01 $398,807,398.10
2018-08-01 $113,090,361.89
2018-09-01 $73,694,508.50
2018-10-01 $105,458,904.53
@danielevns
danielevns / main.go
Created March 6, 2023 13:23
Experimental determination of bustabit's house edge
package main
import (
"crypto/hmac"
"crypto/sha256"
"encoding/hex"
"fmt"
"math"
"math/big"
)