I hereby claim:
- I am davidlj95 on github.
- I am davidlj95 (https://keybase.io/davidlj95) on keybase.
- I have a public key whose fingerprint is D214 E5C6 6C18 EEC5 8B21 11CE 1441 FA43 5DE6 AC64
To claim this, I am signing this object:
| #=============================================================================# | |
| # __ __ _____ ____ _ ___ _____ ____ _ _ _ # | |
| # | \/ | / ____|/ __ \| | |__ \ / ____|/ __ \| | (_) | # | |
| # | \ / |_ _| (___ | | | | | ) | | (___ | | | | | _| |_ ___ # | |
| # | |\/| | | | |\___ \| | | | | / / \___ \| | | | | | | __/ _ \ # | |
| # | | | | |_| |____) | |__| | |____ / /_ ____) | |__| | |____| | || __/ # | |
| # |_| |_|\__, |_____/ \___\_\______| |____| |_____/ \___\_\______|_|\__\___| # | |
| # __/ | # | |
| # |___/ # | |
| # # |
| # Libraries | |
| import math | |
| import sys | |
| # Constants | |
| MIN_ARGS = 1 | |
| # Parameters | |
| values = None | |
| values_yes = None |
I hereby claim:
To claim this, I am signing this object:
| #!/bin/bash | |
| # Uses telegram-cli to send a message to the given destination | |
| # Usage: ./telegram_msg <DESTINATION> <MESSAGE> | |
| #============================================================== | |
| # Constants | |
| #============================================================== | |
| APP_NAME=telegram_msg | |
| # Name of the app as appears in logs | |
| APP="/usr/local/bin/telegram-cli" | |
| # telegram-cli location |
| #!/usr/bin/env python3 | |
| # Description: | |
| # ============ | |
| # Script to given a block hash, create a message informing | |
| # if the block signals for BIP-91 / BIP-141 | |
| # | |
| # To do that, connects to the local bitcoind node and | |
| # uses RPC calls to get details on that block and what does | |
| # it signal | |
| # |
| #!/bin/bash | |
| # Get information about the block | |
| info=() | |
| while IFS= read -r line; do | |
| info+=( "$line" ) | |
| done < <( python3 /home/bitcoin/scripts/block-info.py "$1" ) | |
| # Notify the information | |
| telegram-msg Bitcoin-Notifier "|=== NEW BLOCK ===|" "${info[@]}" |
| [Unit] | |
| Description=Bitcoin's [%i] distributed currency daemon | |
| After=network.target | |
| [Service] | |
| User=bitcoin-%i | |
| Group=bitcoin-%i | |
| Type=forking | |
| PIDFile=/var/blockchain/bitcoin/bitcoind_%i.pid |
| #!/bin/bash | |
| # Description: Allows to switch between RPC | |
| # client configurations inside | |
| # ~/.bitcoin folder. If no | |
| # config found, takes default | |
| # Usage: | |
| # bitcoin-cli <node_config> [args] | |
| # | |
| # Passes ~/.bitcoin/<node_config>.conf as | |
| # the configuration file to bitcoin-cli |
| #!/bin/bash | |
| # Name: `pip` package updater | |
| # Description: checks `pip` outdated packages and updates them all at once | |
| # Source: | |
| # https://stackoverflow.com/questions/2720014/upgrading-all-packages-with-pip | |
| pip list --outdated --format=freeze | \ | |
| grep -v '^\-e' | \ | |
| cut -d = -f 1 | \ | |
| xargs -n1 pip install -U |
| """Implements a class registry based on its name using Python 3 metaclasses | |
| **Source:** | |
| - https://effectivepython.com/2015/02/02/\ | |
| register-class-existence-with-metaclasses/ | |
| """ | |
| REGISTRY = {} | |
| """ |