Skip to content

Instantly share code, notes, and snippets.

Avatar

Stephanie Sunshine StephanieSunshine

  • Pacific Northwest, United States
View GitHub Profile
View gist:9c869485e239d67f95a027f85ae73f44
page_title: Isula Distributed Data Network Documentation -- Getting Started
page_color: green
template_version: 1.1
# Leave this blank to ignore includes for this book if not needed
include_folder:
book_name: The Book
last_updated: Never!
introduction: Why should I?
chapters:
- title: is this one
View gist:7902af62e21ddebb09ecafc9277190ba
package main
import (
"fmt"
"gopkg.in/yaml.v2"
"io/ioutil"
)
func subtraverse(data *interface{}) {
@StephanieSunshine
StephanieSunshine / dstor-speedtest.bash
Last active Mar 13, 2020
Speedtest cli ( Not Ookla ) 6 way test isolated from dStor Outpost Quickstart ( This needs miller, curl, and jq installed )
View dstor-speedtest.bash
#!/usr/bin/env bash
# apt -y install miller curl jq
# make the font bold
function bold() {
tput bold
}
# break text font color
@StephanieSunshine
StephanieSunshine / config.ini
Last active Mar 19, 2019
GoodBlock Telos bp node mainnet config
View config.ini
blocks-dir = "blocks"
chain-state-db-size-mb = 1024000
reversible-blocks-db-size-mb = 1024000
contracts-console = false
https-client-validate-peers = 1
http-server-address = 127.0.0.1:8888
p2p-listen-endpoint = 0.0.0.0:9876
p2p-max-nodes-per-host = 1
@StephanieSunshine
StephanieSunshine / config.ini
Last active Mar 19, 2019
GoodBlock Telos Mainnet API config.ini
View config.ini
blocks-dir = "blocks"
chain-state-db-size-mb = 10240000
reversible-blocks-db-size-mb = 10240000
contracts-console = false
https-client-validate-peers = 1
http-server-address = 0.0.0.0:8888
p2p-listen-endpoint = 0.0.0.0:9876
p2p-max-nodes-per-host = 1
@StephanieSunshine
StephanieSunshine / graceful_start
Created Mar 18, 2019
Slim Init -- A lightweight init script for EOS block producers to sidestep sysv, upstart, and systemd
View graceful_start
#!/bin/bash
echo 'Gracefully starting Nodeos if we can'
# We have to use full paths
nohup /usr/bin/nodeos --data-dir /home/telos/data --config-dir /home/telos/conf &> /home/telos/log/nodeos &
ps -faux | grep nodeos | grep -v grep
@StephanieSunshine
StephanieSunshine / detective_missed.py
Last active Jan 14, 2019
EOS/Telos Find Missing Blocks (v2)
View detective_missed.py
#!/usr/bin/python
#
# This script is a crude way to figure out who is missing what blocks from our block producer logs
# usage: egrep --line-buffered 'producer_plugin|start_block|produce_block' (/path/to/nodeos/log) | ./detective_missed.py
#
# Stop program on missing blocks found
stopOnFind = False
# Show tick on Good Block
@StephanieSunshine
StephanieSunshine / detective_missed.py
Last active Jan 11, 2019
EOS/Telos Find missing blocks
View detective_missed.py
#!/usr/bin/python
#
# This script is a crude way to figure out who is missing what blocks from our block producer logs
# usage: cat log/nodeos | egrep --line-buffered 'producer_plugin|start_block' | ./detective_missed.py
#
import sys
import iso8601
import re
View tlosfs-watcher.sh
#!/usr/bin/env bash
node_id=`ipfs id | grep \"ID\" | awk '{ print $2; }' | tr -d \" | tr -d \,`
ipfs pubsub sub $node_id | xargs -n 1 -P 0 ipfs pin add &
ipfs pubsub sub unpin | xargs -n 1 -P 0 ipfs pin rm &
@StephanieSunshine
StephanieSunshine / tlosfs
Last active Nov 14, 2018
tlosfs.sh -- an ipfs wrapper for Telos
View tlosfs
#!/usr/bin/env bash
# set -x
add () {
temp_file=`mktemp`
ipfs add &> $temp_file
ipfs_hash=`awk '{ print $4; }' $temp_file`
ipfs_peers=(`ipfs swarm peers | awk -F/ '{ print $7; }'`)
ipfs_peer_count=${#ipfs_peers[@]}
replica_count=`perl -e 'use POSIX; $p='$ipfs_peer_count'; $a=$p/8; $a=$a+8; $a=$p/$a; $a=$a+2; print ceil($a)'`