Skip to content

Instantly share code, notes, and snippets.

@gaia
gaia / keybase.md
Last active December 18, 2016 00:49

Keybase proof

I hereby claim:

  • I am gaia on github.
  • I am eddieb (https://keybase.io/eddieb) on keybase.
  • I have a public key whose fingerprint is 1E9D A50C C5DB F7BD 0AC5 67D5 6357 5EE3 F0F9 FAFC

To claim this, I am signing this object:

047ad5f2a62779643cd64e5d4217daaae51903f2f0e654c18c0ac5f47591d02f6956a5dc2d29a5fd0cc5ceff86df5ce23f89e532a8b1743c0f59ff4ab8eec40ad8
@gaia
gaia / ChromeAppDownloader.py
Created February 13, 2019 22:07 — forked from arulrajnet/ChromeAppDownloader.py
Python Script to download the Chrome Extensions (CRX) file directly from the google chrome web store.
# -*- coding: utf-8 -*-
"""
Python Script to download the Chrome Extensions (CRX) file directly from the google chrome web store.
Referred from http://chrome-extension-downloader.com/how-does-it-work.php
"""
from __future__ import division
import argparse
import requests
@gaia
gaia / balance-at-cycle.sh
Last active March 21, 2019 17:44
Tezos; query balance at end of cycle
#!/bin/bash
# USAGE: script.sh cyclenumber
# EXAMPLE: balance-at-cycle.sh 80
# REQUIRES: bc
# Note that rewards and bond are released on the last block of a cycle.
# For this reason, the amount you get here is the amount at the end of the cycle entered.
# So if you want to find out the balance at the beggining of cycle 80, you'd enter 79 in this script
# See this answer for more info:
@gaia
gaia / average.sh
Last active September 15, 2019 23:02
Harmony (ONE): your node versus your the other nodes in your shard's average, in %, with alerts.
#!/usr/bin/env bash
# This script will not alert in the first few minutes (seconds_between_alerts)
# the first time it is run (e.g., shard$1-lastalert.txt does not exist)
# Also, it waits for $seconds_wait seconds before running for the first time (in case it is being run by cron)
# Usage: ./average.sh 3 one1xxxxxxxxxxxxxxxxxxxxxxxxxxxx
# That's the shard number followed by your address in that shard
# Optionally, if you just want the stats shown, use
# ./average.sh 3 one1xxxxxxxxxxxxxxxxxxxxxxxxxxxx status
@gaia
gaia / blockspermin.sh
Last active September 15, 2019 23:02
Harmony (ONE): Blocks Per Minute & Seconds Between Blocks
#!/usr/bin/env bash
# This scripts takes no arguments.
blockearn="0.111"
onehour=$(curl -s https://harmony.one/1h | tr -d '[:blank:]' | sed -n '/EARNING/,/NOTEARNING/p')
average0=$(echo "$onehour" | sed -n "/Shard0/,/^$/p" | tail +3 | head -n-1 | sed 's/.*://g' | awk -v N=1 '{ sum += $N } END { if (NR > 0) print sum / NR }')
average1=$(echo "$onehour" | sed -n "/Shard1/,/^$/p" | tail +3 | head -n-1 | sed 's/.*://g' | awk -v N=1 '{ sum += $N } END { if (NR > 0) print sum / NR }')
average2=$(echo "$onehour" | sed -n "/Shard2/,/^$/p" | tail +3 | head -n-1 | sed 's/.*://g' | awk -v N=1 '{ sum += $N } END { if (NR > 0) print sum / NR }')
@gaia
gaia / privconnect.sh
Last active December 18, 2019 00:53
Tezos-Node: If Connection To Private Node is Lost, Trust then Connect
#!/bin/bash
# Usage ./privconnect.sh 300 1.1.1.1
# checks twice, 300 seconds in between, if the node the script is being run on
# is connected to 1.1.1.1:9732. If it isn't trust then connect.
# Run it from cron, make sure the cron interval is greater than the sleep period
# between connection checks in this script. 2x or 3x the sleep period is good.
timeallowed=$1
privnodeip=$2
@gaia
gaia / tezos-reward-gaps.sh
Created December 18, 2019 06:27
tezos-reward-gaps.sh: show time between baking/endorsing to help schedule node maintenance
#!/bin/bash
# This script will only show time gaps between future endorsing slots.
# You need to install JQ: https://stedolan.github.io/jq/
# Enter your path to tezos-client here, without a trailing slash
tc="/home/tezos/tezos/tezos-client"
delegate="tz1______________"
timezone="America/New_York"
@gaia
gaia / attestation.txt
Created April 12, 2022 00:55
Attestation
I contributed to the Semaphore Trusted Setup Multi-Party Ceremony.
The following are my contribution signatures:
Circuit: semaphore16
Contributor # 319
Hash: 07706a0c 76eefc4c 71f9ab19 8f227825
694bf835 28514d9c 58e62b5b 902f47e8
bc4fb094 2edf94c4 97c44604 41aea568
c27ee71f 9924a26b 5e70d6da f99b0b0f