Skip to content

Instantly share code, notes, and snippets.

@strophy
strophy / keybase.md
Created October 26, 2017 09:22
Keybase

Keybase proof

I hereby claim:

  • I am strophy on github.
  • I am strophy (https://keybase.io/strophy) on keybase.
  • I have a public key ASCIS01uGk9OhsrY5T0vOBZoI6pnXNONoy50sci49scGigo

To claim this, I am signing this object:

@strophy
strophy / dash_budget_payout_dates.sh
Last active September 5, 2022 15:15 — forked from moocowmoo/dash_budget_payout_dates.sh
estimate future dash budget payout dates
#!/bin/bash
D0=$(TZ=UTC date --date="$(date --date="2015-12-07T08:27:12+0000")");
for block in `seq 398784 16616 $((382168 + (16616*48)))`;
do DD=$(TZ=UTC date --date="$(date --date="$D0") +727 hours +5 minutes +2 seconds");
D0=$DD;
echo "$block - $DD";
done
Vote YES to send strophy some more tDASH to continue testing 0.13.0 features, like this proposal! This will also result in improved upgrade documentation, probably.
@strophy
strophy / config.yml
Created January 24, 2020 23:54
ytt docker-dash configuration templating
#@data/values
---
network: testnet
@strophy
strophy / superblock.sh
Last active March 24, 2020 06:09
Calculate timestamp, block, blockhash and coinbase payout amount for all Dash superblocks to date
#!/bin/bash
height=$(dash-cli getblockcount)
for ((block=332320;block<height;block+=16616));do
blockhash=$(dash-cli getblockhash $block)
txhash=$(dash-cli getblock $blockhash|jq -r '.tx[0]')
time=$(dash-cli getblock $blockhash|jq -r '.time')
time=$(TZ=GMT date -d @$time +"%Y%m%d%H%M")
amount=$(dash-cli getrawtransaction $txhash 1|jq '.vout|map(.valueSat)|add')
@strophy
strophy / find_payments.sh
Created March 25, 2020 07:29
Find all superblock payments to a given list of addresses (CSV two fields: address,description)
#!/bin/bash
n=0
echo "Reading csv from stdin..." 1>&2
while IFS=,$'\r' read a b;do
echo "$a - $b" 1>&2
ADDRESS[$n]="$a"
DESC[$n]="$b"
((n++))
done
@strophy
strophy / mn-status-output
Created April 2, 2020 05:00
Suggested sample output of mn status commands
$ mn status
{
"hostname": "", # hostname
"uptime": "", # uptime
"distro": "", # cat /etc/issue
"user": "", # whoami
"loadAverage": "", # uptime
"diskFree": "", # df -h /
"memFree": "", # free -h
"cpus": , # lscpu | grep 'CPU(s)' -m 1
@strophy
strophy / export_grafana_dashboards.sh
Created January 13, 2021 01:10 — forked from UdjinM6/export_grafana_dashboards.sh
Export all public Graphana dashboards
#!/bin/bash
full_url="http://your_graphana_host_here"
name="dashboards"
create_slug () {
echo "$1" | iconv -t ascii//TRANSLIT | sed -r s/[^a-zA-Z0-9]+/-/g | sed -r s/^-+\|-+$//g | tr A-Z a-z
}
process_db_json() {
@strophy
strophy / genesis.json
Last active November 16, 2021 09:58
dash platform tenderdash genesis file
{
"genesis_time": "2021-07-22T12:57:05.429Z",
"chain_id": "dash-testnet-6",
"initial_height": "0",
"initial_core_chain_locked_height": 542300,
"initial_proposal_core_chain_lock": null,
"consensus_params": {
"block": {
"max_bytes": "22020096",
"max_gas": "-1",
@strophy
strophy / grpc.yaml
Last active February 3, 2021 04:08
dash platform envoy configuration file
static_resources:
listeners:
- name: listener_0
address:
socket_address:
address: 0.0.0.0
port_value: 8080
filter_chains:
- filters: