Skip to content

Instantly share code, notes, and snippets.

View st3b1t's full-sized avatar
🔗
on chain

st3b1t

🔗
on chain
View GitHub Profile
@st3b1t
st3b1t / satlog-rpc.sh
Created February 23, 2024 21:27
testing rpc methods of your rpc Bitcoin full node
#!/bin/sh
#
# included in: https://github.com/st3b1t/SatoshiLog
#
# usage: echo server.banner | satlog-rpc 127.0.0.1 50001
#
read METHOD
HOST=$1
@st3b1t
st3b1t / qrcode.py
Last active February 21, 2024 17:17
commandline qrcode generator
#!/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:
@st3b1t
st3b1t / mnemonic.sh
Created November 23, 2023 22:47
generate secure random mnemonic 24 words in bash
#!/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
@st3b1t
st3b1t / tunnel-bitcoin-node.sh
Created November 9, 2023 21:27
script to create a ssh tunnel to your bitcoin node
#!/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)
@st3b1t
st3b1t / podcast-widget.html
Created October 9, 2023 12:31
podcast rss feed widget
<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>
@st3b1t
st3b1t / ad-blacklist.txt
Created October 5, 2023 14:12
AD BlackLists
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
@st3b1t
st3b1t / wait-for-chmod.sh
Last active October 4, 2023 10:06
waits for a file to have read group permissions before running a certain command
#!/bin/bash
# Copyright @st3b1t 2023
#
# usage: ./wait-for-chmod.sh /path/to/file/to/check <next-command>
#
# example, check bitcoin cookie file is readable by group:
# ./wait-for-chmod.sh /home/bitcoin/.bitcoin/.cookie <next-command>
#
set -e
@st3b1t
st3b1t / acks.txt
Created August 8, 2023 21:13
ACKs
Concept ACK - Agree with the idea and overall direction, but haven't reviewed the code changes or tested them.
utACK (untested ACK) - Reviewed and agree with the code changes but haven't actually tested them.
Tested ACK - Reviewed the code changes and have verified the functionality or bug fix.
ACK - A loose ACK can be confusing. It's best to avoid them unless it's a documentation/comment only change in which case there is nothing to test/verify; therefore the tested/untested distinction is not there.
NACK - Disagree with the code changes/concept. Should be accompanied by an explanation.
@st3b1t
st3b1t / electrum-client.js
Created July 25, 2023 00:29
get amount of certain address in nodejs with bitcoinjs-lib
/*
Usage:
$ node electrum-client.js <servername>:<port> 3Eh99S957RnRrKmiU6DPAphwvjYB8UkeQb
Output:
address:3Eh99S957RnRrKmiU6DPAphwvjYB8UkeQb amount:0.0158 btc
*/
const net = require('net')
, bitcoin = require('bitcoinjs-lib');
@st3b1t
st3b1t / ramdisk.sh
Last active July 21, 2023 20:07
create ramdisk on a Linux distro
#!/bin/sh
#path of the ramdisk
PATH=/media/ram
#automount ad startup
AUTO=",auto"
#disk size
SIZE=2G
sudo mkdir -p /media/ram
sudo echo "tmpfs $PATH tmpfs size=$SIZE,rw$AUTO,user,noatime,x-gvfs-show 0 0" >> /etc/fstab
sudo mount -a