This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Proof Of Work in NodeJs by st3b1t, part of: https://github.com/st3b1t/bitcoin-nodejs-playground | |
usage: | |
$ node index.js <DIFFICULTY> | |
*/ | |
const crypto = require('crypto'); | |
const difficulty = Number(process.argv[2] ?? 4); | |
const blockHeader = 'Bl0ckH34d3r:'; | |
const prefix = '0'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
PART OF: https://github.com/st3b1t/libp2p-nodejs-playground | |
setup: | |
$ npm install libp2p @chainsafe/libp2p-noise @chainsafe/libp2p-yamux @libp2p/bootstrap @libp2p/mdns @libp2p/websockets | |
run: | |
$ node libp2p_websocket.js <PORT> | |
open in more terminal with different port |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# copyright 2024 st3b1t | |
# Calculate the avg time of last NBLOCKS | |
NBLOCKS=10 | |
#pick last NBLOCKS blocks | |
PREV_TIMESTAMP=0 | |
DIFF_SUM=0 | |
COUNT=0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import sys | |
import os | |
import importlib.util | |
import argparse | |
import json | |
## | |
# usage examples: | |
# ./electrs-client.py server.version | |
# ./electrs-client.py mempool.get_fee_histogram |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# included in: https://github.com/st3b1t/SatoshiLog | |
# | |
# usage: echo server.banner | satlog-rpc 127.0.0.1 50001 | |
# | |
read METHOD | |
HOST=$1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
# EASY-INSTALL-ENTRY-SCRIPT: 'qrcode==7.3.1','console_scripts','qr' | |
# | |
# requirements: pip install qrcode | |
import re | |
import sys | |
__requires__ = 'qrcode==7.3.1' | |
try: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Copyright @st3b1t 2023 | |
# | |
# generate secure random mnemonic 24 words in bash | |
# | |
bip39=(abandon ability able about above absent absorb abstract absurd abuse access accident account accuse achieve acid acoustic acquire across act action actor actress actual adapt add addict address adjust admit adult advance advice aerobic affair afford afraid again age agent agree ahead aim air airport aisle alarm album alcohol alert alien all alley allow almost alone alpha already also alter always amateur amazing among amount amused analyst anchor ancient anger angle angry animal ankle announce annual another answer antenna antique anxiety any apart apology appear apple approve april arch arctic area arena argue arm armed armor army around arrange arrest arrive arrow art artefact artist artwork ask aspect assault asset assist assume asthma athlete atom attack attend attitude attract auction audit august aunt author auto autumn average avocado avoid awake aware away awesome awful awkward axis baby bachelor bacon b |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# script to create a ssh tunnel to your bitcoin node | |
# and expose in localhost temporary port of bitcoin core | |
# | |
#user to access bitcoin node | |
USERNODE=user-ssh-node | |
#ip or hostname of bitcoin node | |
HOSTNODE=bitcoind-host | |
#ssh port(usually 22) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head></head> | |
<body> | |
<h1>Podcast RSS Box</h1> | |
<div id="feed" style="max-width: 50%;border:1px solid blue;padding:10px"> | |
</div> | |
<script src="https://code.jquery.com/jquery-3.0.0.min.js"></script> | |
<script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts | |
https://adaway.org/hosts.txt | |
https://v.firebog.net/hosts/AdguardDNS.txt | |
https://v.firebog.net/hosts/Easyprivacy.txt | |
https://winhelp2002.mvps.org/hosts.txt |
NewerOlder