Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
set -e
SEED=$(( RANDOM + 30000 ))
BITCOIN_DIRS=(/tmp/regtest-{$(( SEED + 50 )),$(( SEED + 51 ))})
BITCOIN_PORTS=($(( SEED + 10 )) $(( SEED + 11 )))
BITCOIND_RPC=($(( SEED + 20 )) $(( SEED + 21)))
export DIR=/tmp/regtest-haskoin-$(( SEED + 40 ))
@jprupp
jprupp / minikey.hs
Last active January 8, 2021 16:38
Casascius Minikey Generator
#!/usr/bin/env stack
{- stack
--resolver lts-16.28
--nix
--nix-packages "secp256k1 pkg-config zlib"
script
--package haskoin-core
--package entropy
--package bytestring
--package text
@jprupp
jprupp / minikey-wif.hs
Created January 8, 2021 17:44
Minikey to WIF converter
#!/usr/bin/env stack
{- stack
--resolver lts-16.28
--nix
--nix-packages "secp256k1 pkg-config zlib"
script
--package haskoin-core
--package bytestring
--package text
--extra-dep haskoin-core-0.18.0
@jprupp
jprupp / release
Created May 19, 2024 22:20
Release a Haskell package to Hackage along with its Haddock documentation
#!/bin/sh
set -xe
yaml_value() {
local thing="$1"
perl -lnE "say if s/^\\s*$thing:\\s*([^\\s]+)\\s*\$/\\1/" package.yaml
}
if [[ ! -f package.yaml ]]