Skip to content

Instantly share code, notes, and snippets.

@assafmo
assafmo / shockwave-alpha.sh
Last active April 11, 2022 17:45
Launching a new local testnet
SGX_MODE=SW SCRT_SGX_STORAGE="$(pwd)/.sgx_secrets" LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$(pwd)" RUST_BACKTRACE=1 ./secretd --home "$(pwd)/.secretd" tx gov submit-proposal software-upgrade v1.3 --upgrade-height 28100 --title hi --description bye --deposit 10000000uscrt -y --from a
SGX_MODE=SW SCRT_SGX_STORAGE="$(pwd)/.sgx_secrets" LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$(pwd)" RUST_BACKTRACE=1 ./secretd --home "$(pwd)/.secretd" tx gov vote 1 yes --from a -y
@assafmo
assafmo / index.html
Last active March 28, 2024 15:24
SEO
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!-- SEO Title -->
<meta name="application-name" content="$SHORT_TITLE" />
<meta name="title" content="$TITLE" />
@assafmo
assafmo / Showcase_of_Secret_Network_for_LinkNow_by_Blocklike.pdf
Last active July 14, 2021 17:09
Showcase of Secret Network for LinkNow by Blocklike
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@assafmo
assafmo / Showcase of Secret Network for Privacy in Cosmos.pdf
Last active June 30, 2021 14:11
Showcase of Secret Network for Privacy in Cosmos
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@assafmo
assafmo / secretcli.sh
Last active June 9, 2021 14:11
{secret,terra}cli setup for testnet
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"
@assafmo
assafmo / gist:e7b67c14934e1bbf9f3bfc6406d32264
Created December 20, 2020 09:20
Google sheets HTTP GET into a single cell
ARRAYFORMULA(JOIN(CHAR(10),SPLIT(IMPORTDATA("https://google.com")&CHAR(10),CHAR(10))))
@assafmo
assafmo / add_ssh_auth_keys.sh
Created September 28, 2020 12:46
Add my SSH keys to a new machine
curl -sSL github.com/assafmo.keys >> ~/.ssh/authorized_keys
@assafmo
assafmo / node_sync_eta.sh
Last active September 23, 2020 21:26
Node sync progress bar + ETA
#!/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=' |
@assafmo
assafmo / 1_curl_tor.sh
Last active April 16, 2025 20:39
Use curl with TOR as proxy
#!/bin/bash
# Install
sudo apt install -y tor
# Use
curl --proxy socks5h://localhost:9050 https://check.torproject.org
@assafmo
assafmo / convert_secret-1_export_to_secret-2_genesis.jq
Last active September 8, 2020 13:13
Convert secret-1 export to secret-2 genesis.json
#!/usr/bin/env jq
.chain_id = "secret-2" |
.genesis_time = (now | todate) |
.consensus_params.block.max_gas = "10000000" |
# Initialize x/register
.app_state.register = {