- Start mongod without auth enabled
Make sure this is commented or missing from
/etc/mongod.conf
#security:
# authorization: enabled
The service should be running:
| import React, { useEffect, useRef, useState } from "react"; | |
| function usePrevious(value: number) { | |
| const ref = useRef<number | null>(null); | |
| useEffect(() => { | |
| ref.current = value; | |
| }); | |
| return ref.current; | |
| } |
| #!/bin/bash | |
| echo | |
| echo "Welcome to the Bitcoin address generator!" | |
| echo "input private key (32 bytes, hex format)" | |
| read priv | |
| echo "" | |
| echo "#####################################" | |
| # priv=0C28FCA386C7A227600B2FE50B7CAE11EC86D3BF1FBE471BE89827E19D72AA1D # Testing only |
| #!/usr/bin/env python | |
| import sys | |
| # Get command line arguments | |
| ########################## | |
| # Note this script will calculate based on an average of 1 day's worth of blocks | |
| if len(sys.argv) < 2: | |
| print "Usage: $ btc_hashrate <blocks-24h> <current-difficulty>" | |
| sys.exit() | |
| assert(consensus.hashGenesisBlock == uint256S("0x000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943")); | |
| assert(genesis.hashMerkleRoot == uint256S("0x4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b")); |
| /** | |
| * Build the genesis block. Note that the output of its generation | |
| * transaction cannot be spent since it did not originally exist in the | |
| * database. | |
| * | |
| * CBlock(hash=000000000019d6, ver=1, hashPrevBlock=00000000000000, hashMerkleRoot=4a5e1e, nTime=1231006505, nBits=1d00ffff, nNonce=2083236893, vtx=1) | |
| * CTransaction(hash=4a5e1e, ver=1, vin.size=1, vout.size=1, nLockTime=0) | |
| * CTxIn(COutPoint(000000, -1), coinbase 04ffff001d0104455468652054696d65732030332f4a616e2f32303039204368616e63656c6c6f72206f6e206272696e6b206f66207365636f6e64206261696c6f757420666f722062616e6b73) | |
| * CTxOut(nValue=50.00000000, scriptPubKey=0x5F1DF16B2B704C8A578D0B) | |
| * vMerkleTree: 4a5e1e |
| #!/bin/bash | |
| if [[ $# -lt 1 ]]; then | |
| echo "Usage: $ secp256k1 <private-key-hex>" | |
| exit 1 | |
| fi | |
| priv=$1 | |
| ## Calculate Public Keys |
| #!/bin/bash | |
| ## Command Line parsing | |
| ####################### | |
| if [[ $# -lt 1 ]]; then | |
| echo "Usage: $ sha256 <input-hex>" | |
| exit 1 | |
| fi | |
| inputHex=$1 |
| #!/bin/bash | |
| ## Command Line parsing | |
| ####################### | |
| if [[ $# -lt 1 ]]; then | |
| echo "Usage: $ hash160 <input-hex>" | |
| exit 1 | |
| fi | |
| inputHex=$1 |
| #!/usr/bin/env python | |
| import sys | |
| if len(sys.argv) < 1: | |
| print "Usage: $ reverse_endian <input-hex>" | |
| line = sys.argv[1] | |
| n = 2 | |
| orig_list = [line[i:i+n] for i in range(0, len(line), n)] |