Skip to content

Instantly share code, notes, and snippets.

View 0xJohnnyGault's full-sized avatar

Johnny Gault 0xJohnnyGault

View GitHub Profile
### Keybase proof
I hereby claim:
* I am 0xjohnnygault on github.
* I am johnnygault (https://keybase.io/johnnygault) on keybase.
* I have a public key ASDk9YIeIuJmrwYpLHn26zdp7oYmmJIozlpyjGY_U1TLVwo
To claim this, I am signing this object:
@0xJohnnyGault
0xJohnnyGault / uponly.sh
Created October 3, 2023 17:48
In the Arena
curl https://api.starsarena.com/trade/users/trending \
--silent \
-H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36' \
-H 'Authorization: Bearer <YOUR TOKEN HERE>' \
| jq '[.users[]] | sort_by(.twitterFollowers) | .[] | {twitterHandle: .twitterHandle, twitterName: .twitterName, twitterFollowers: .twitterFollowers, price: ((.keyPrice|rtrimstr("000000000")|tonumber)/1000000000) }'
@0xJohnnyGault
0xJohnnyGault / go.mod
Created October 3, 2023 16:20
Go Headless
module github.com/multisig-labs/go-headless
go 1.20
require (
github.com/chromedp/cdproto v0.0.0-20230914224007-a15a36ccbc2e
github.com/chromedp/chromedp v0.9.2
)
require (
@0xJohnnyGault
0xJohnnyGault / node_info.json
Last active March 8, 2023 23:39
GoGoTools: 'ggt node info' command
https://github.com/multisig-labs/GoGoTools
❯ ggt node info | jq
{
"nodeID": "NodeID-FfpWLRXCgiQjbrhk4qxKWHrpZGjeBngTA",
"networkID": 1337,
"networkName": "network-1337",
"uptime": {
"rewardingStakePercentage": "100.0000",
"weightedAveragePercentage": "100.0000"
@0xJohnnyGault
0xJohnnyGault / info.json
Created February 1, 2023 16:40
Avalanche mainnet info
{
"nodeID": "NodeID-[REDACTED]",
"networkID": 1,
"networkName": "mainnet",
"uptime": {
"rewardingStakePercentage": "99.4991",
"weightedAveragePercentage": "98.5386"
},
"getNodeVersion": {
"version": "avalanche/1.9.7",
@0xJohnnyGault
0xJohnnyGault / deploy-local.sh
Created May 18, 2022 01:38
Deploy using forge with bash
#!/usr/bin/env bash
set -Eeuo pipefail
# Experiment to see how using foundry for deploys would work
if [ "${BASH_VERSINFO:-0}" -lt 4 ]; then
echo "script requires bash version >= 4"
exit 1
fi
@0xJohnnyGault
0xJohnnyGault / hash.sh
Created May 18, 2022 01:33
Create a keccak256/abi.encodePacked hash
#!/usr/bin/env bash
set -Eeuo pipefail
trap 'rm -f -- "${TMPFILE}"' EXIT
TMPFILE=$(mktemp) || exit 1
cat << EOF > ${TMPFILE}
pragma solidity ^0.8.0;
contract Hasher {