[Application Options]
feeurl=https://nodes.lightning.computer/fees/v1/btc-fee-estimates.json
[Bitcoin]
bitcoin.active=1
bitcoin.mainnet=1
bitcoin.node=neutrino
[neutrino]
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
<?xml version="1.0" encoding="UTF-8"?> | |
<opml version="1.1"> | |
<head> | |
<title> | |
Feeder | |
</title> | |
</head> | |
<body> | |
<outline title="Stacker+News" text="Stacker+News" type="rss" xmlUrl="https://stacker.news/rss"/> | |
<outline title="𝐁𝐂𝟏𝟗𝟖𝟒" text="𝐁𝐂𝟏𝟗𝟖𝟒" type="rss" xmlUrl="https://bc1984.com/rss/"/> |
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
# lnd-postgres-kv-decoder.py | |
from decouple import config | |
import psycopg2 | |
import psycopg2.extras | |
import pandas as pd | |
import time | |
tables = ['channeldb_kv', 'decayedlogdb_kv', 'macaroondb_kv', | |
'towerclientdb_kv', 'towerserverdb_kv', 'walletdb_kv'] |
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
### PostgreSQL: format multiple columns into string for each row using a semicolon as separator between fields | |
``` | |
SELECT | |
FORMAT('%s; %s; %s; %s', | |
col_one, col_two, col_three, col_four) | |
AS entries | |
FROM table_name; | |
``` |
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
[Unit] | |
Description=I2P Router written in C++ | |
Documentation=man:i2pd(1) https://i2pd.readthedocs.io/en/latest/ | |
After=network.target | |
ConditionFileIsExecutable=/usr/sbin/i2pd | |
[Service] | |
User=i2pd | |
Group=i2pd | |
RuntimeDirectory=i2pd |
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 | |
MOUNTPOINT="/mnt/ext" | |
DISK="/dev/sda1" | |
echo "" | |
echo "-------------------------------------------------------------------------------- DISK SPACE USED/REMAINING" | |
df -m | head -n 1 ; df -m | grep "$DISK" | |
df -H | head -n 1 ; df -H | grep "$DISK" | |
echo "-------------------------------------------------------------------------------- DISK I/O" | |
echo "" |
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
# bitcoin-inflation.py | |
# based on: https://github.com/ndsvw/Bitcoin-Supply-Calculator/blob/master/btcsupply.py | |
def btc_supply_at_block(b): | |
max_supply = 20999999.9769 | |
if b >= 33 * 210000: | |
return max_supply, 1.0 | |
else: | |
reward = 50e8 | |
supply = 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
### Python Clean Code Tips & Tools | |
Check the quality of your code inside your CI pipeline. | |
- flake8 - style guide enforcer | |
- black - code formatting | |
- isort - optimize imports | |
- bandit - check for security vulnerabilities | |
- safety - check for security vulnerabilities of dependencies |
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
// a simple Go-based website | |
// based on: https://www.digitalocean.com/community/tutorials/how-to-make-an-http-server-in-go | |
// with 100 bytes of CSS from: https://gist.github.com/JoeyBurzynski/617fb6201335779f8424ad9528b72c41 | |
package main | |
import ( | |
"errors" | |
"fmt" | |
"io" |
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
import datetime as dt | |
import requests | |
import io | |
import pandas as pd | |
import matplotlib.pyplot as plt | |
from matplotlib.pyplot import figure | |
from matplotlib import ticker | |
from matplotlib.ticker import (MultipleLocator, FormatStrFormatter, AutoMinorLocator) | |
%matplotlib inline |
NewerOlder