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 | |
#json per line (same result, but for example can use jq to set _id) | |
7z x -so $1 | jq -c . | couchimport --db mydb --type jsonl |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
sudo wget -O /bin/secretcli https://github.com/enigmampc/SecretNetwork/releases/download/v1.0.4/secretcli-linux-amd64 | |
sudo chmod +x /bin/secretcli | |
mkdir -p ~/.secretcli/config | |
echo 'chain-id = "holodeck-2" | |
indent = true | |
keyring-backend = "test" | |
node = "https://chainofsecrets.secrettestnet.io:26667" | |
output = "json" |
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
ARRAYFORMULA(JOIN(CHAR(10),SPLIT(IMPORTDATA("https://google.com")&CHAR(10),CHAR(10)))) |
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
curl -sSL github.com/assafmo.keys >> ~/.ssh/authorized_keys |
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 | |
curl -s http://bootstrap.mainnet.enigma.co:26657/net_info | | |
jq -cr '.result.peers[] | [.node_info.id,.remote_ip,.node_info.listen_addr] | @csv' | | |
tr -d \" | | |
tr , @ | | |
perl -pe 's#\@tcp://.+?:#:#g' | | |
sort > /tmp/peers.txt | |
echo "# Generated at $(date -u --rfc-3339=seconds) by https://gist.github.com/assafmo/a39fdb535f74ce2d6493a1a3f695e4ca" > /home/ubuntu/peers/peers.txt |
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 | |
NETWORK_BLOCK_NUMBER=$( | |
curl -s http://client.secretnodes.org:26657/status | jq '.result.sync_info.latest_block_height | tonumber' | |
) | |
LOCAL_BLOCK_NUMBER=$(secretcli status | jq '.sync_info.latest_block_height | tonumber') | |
BLOCKS_LEFT_TO_SYNC=$(jq -n "${NETWORK_BLOCK_NUMBER} - ${LOCAL_BLOCK_NUMBER}") | |
sudo journalctl -u secret-node -f | | |
grep -Po 'height=\d+ txs=' | |
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
#!/usr/bin/env jq | |
.chain_id = "secret-2" | | |
.genesis_time = (now | todate) | | |
.consensus_params.block.max_gas = "10000000" | | |
# Initialize x/register | |
.app_state.register = { |
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
seq 2 250000 | | |
parallel --bar 'secretcli q block {} | jq -r ".block.last_commit.signatures[].validator_address | [{}-1,.] | @csv"' |