Skip to content

Instantly share code, notes, and snippets.

View bliotti's full-sized avatar
public key cryptography is pretty neat 🔑 🔐

Brian Liotti bliotti

public key cryptography is pretty neat 🔑 🔐
View GitHub Profile
sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
git clone https://github.com/zsh-users/zsh-autosuggestions.git $ZSH_CUSTOM/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $ZSH_CUSTOM/plugins/zsh-syntax-highlighting
@bliotti
bliotti / machine
Last active August 30, 2024 21:01
What machine am I?
#!/usr/bin/env bash
lsb_release -a
echo
cat /etc/os-release
echo
uname -a
# EXAMPLE OUTPUT
#
@bliotti
bliotti / README.md
Created August 30, 2024 19:05
bit axe API

Run these from your terminal

curl http://192.168.1.170/api/system/info

curl http://192.168.1.170/api/swarm/info

curl -X POST http://192.168.1.170/api/system/restart

curl https://api.github.com/repos/skot/esp-miner/releases
@bliotti
bliotti / readme.sh
Created February 27, 2024 17:17
fix backspace
# fix either in bash
# ~/.bashrc
bind '"\C-H":backward-kill-word'
# or in wt.exe (Windows Terminal)
# // %LOCALAPPDATA%\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json
{
"actions": [
{
"$schema": "https://raw.githubusercontent.com/jsonresume/resume-schema/v1.0.0/schema.json",
"basics": {
"name": "Brian Liotti",
"label": "Software Guy",
"image": "",
"email": "bliotti@protonmail.com",
"phone": "(317) 213-0886",
"url": "https://coinguy.io",
"summary": "Software Developer and Engineer, Bitcoin source code dev/contributor",
@bliotti
bliotti / generateCardImage.js
Created May 6, 2023 03:43
Stack images with canvas
....
const generateCardImage = async (cardNumber, cardChoices) => {
const canvas = createCanvas(format.width, format.height);
const ctx = canvas.getContext("2d");
console.log("Creating #", cardNumber)
ctx.clearRect(0, 0, format.width, format.height);
ctx.globalAlpha = 1;
@bliotti
bliotti / example_test_plus_chain_code_questions.py
Last active April 10, 2023 03:45
Lines 229 through 233. Satisfies the following requirements. (Node 1 to mine another block, send it to node 2, and check that node 2 receives it)
#!/usr/bin/env python3
# Copyright (c) 2017-2022 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""An example functional test
The module-level docstring should include a high-level description of
what the test is doing. It's the first thing people see when they open
the file and should give the reader information about *what* the test
is testing and *how* it's being tested
@bliotti
bliotti / get_fingers.sh
Created April 2, 2023 05:14
GET all ssh key fingerprints
find ~/.ssh -name '*.pub' | xargs -I _ ssh-keygen -l -E sha256 -f _
@bliotti
bliotti / copy-ssd.sh
Last active February 6, 2023 08:58
copy ssd raspibolt
sudo systemctl stop btcrpcexplorer
sudo systemctl stop bos-telegram.service
sudo systemctl stop rtl
sudo systemctl stop thunderhub
sudo systemctl stop electrs
sudo systemctl stop lnd
sudo systemctl stop bitcoind
sudo systemctl disable btcrpcexplorer.service
sudo systemctl disable bos-telegram.service
@bliotti
bliotti / git-aliases.sh
Last active October 22, 2023 02:37
awesome-git-aliases
# Run these once, to set aliases to git
git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
git config --global alias.co checkout
git config --global alias.br branch
git config --global alias.ci commit
git config --global alias.st status
git config --global alias.sw switch