Skip to content

Instantly share code, notes, and snippets.

@earthgecko
earthgecko / bash.generate.random.alphanumeric.string.sh
Last active February 27, 2025 08:43
shell/bash generate random alphanumeric string
#!/bin/bash
# bash generate random alphanumeric string
#
# bash generate random 32 character alphanumeric string (upper and lowercase) and
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
# bash generate random 32 character alphanumeric string (lowercase only)
cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 32 | head -n 1
@abeluck
abeluck / gpg-offline-master.md
Last active October 22, 2023 02:59 — forked from KenMacD/cmd.md
GPG Offline Master Key w/ smartcard
@laanwj
laanwj / sendalert.cpp
Last active July 9, 2018 13:06
Bitcoin send alert code
/*
So you need to broadcast an alert...
... here's what to do:
1. Copy sendalert.cpp into your bitcoind build directory
2. Decrypt the alert keys
copy the decrypted file as alertkeys.h into the src/ directory.
3. Modify the alert parameters in sendalert.cpp
using System;
using System.Collections.Generic;
using System.Linq;
using System.Numerics;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;
namespace Base58ReverseEncoder
{
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
This is a list of unspendable addresses with which to burn coins to. When you send a coin to any of these addresses, they are permanently gone and can never be redeemed.
You can prove this by sending a small test amount to the address and then checking a block explorer or using `getrawtransaction txid 1`. You should see the coins output to somehting like `"raw_scriptPubKey": "76a914000000000000000000000000000000000000000088ac"` Some block explorers are also smart enough to indicate in their user interface that the coins were destroyed.
You can find the version number matching to the desired altcoin by checking two places in the code:
chainparams.cpp for bitcoin 0.9 and later based coins:
@ageis
ageis / openpgp-card-guide.md
Last active November 6, 2024 14:28
Quick GPG Smartcard Guide
@maaku
maaku / bip-sequence-number.mediawiki
Last active August 29, 2015 14:22
BIP XX: Consensus-enforced transaction replacement signaled via nSequence

  BIP: XX
  Title: Consensus-enforced transaction replacement signalled via sequence numbers
  Author: Mark Friedenbach <[email protected]>
  Status: Draft
  Type: Standards Track
  Created: 28-05-2015

Abstract

@petertodd
petertodd / gist:8e87c782bdf342ef18fb
Last active December 13, 2020 05:33
What the CoinWallet.eu tx-flood stress-test means for you and how to deal with it
@robby-d
robby-d / test_bitcoind.py
Last active August 29, 2015 14:24
bitcoind searchrawtransactions tester
#!/usr/bin/env python3
import requests, json
import time
rpcPort = 8332
rpcUser = 'rpc'
rpcPassword = 'YOUR PASSWORD HERE'
serverURL = 'http://' + rpcUser + ':' + rpcPassword + '@localhost:' + str(rpcPort)
def call_rpc(method, params):
@sipa
sipa / blocksize.mediawiki
Last active September 22, 2023 08:22
Block size according to technological growth.

Published as BIP 103