Skip to content

Instantly share code, notes, and snippets.

View metachris's full-sized avatar

Chris Hager metachris

View GitHub Profile
$ type jf
jf is a function
jf ()
{
journalctl -f -u $1 -o cat | ccze -A
}
@metachris
metachris / README.md
Last active July 5, 2023 13:08
Docs for running mev-boost relay + builder in devnets
@metachris
metachris / bid-value.py
Last active December 26, 2023 22:42
Print mev-boost bids with increasing value over time per slot, over a range of slots
# Script to print mev-boost bids with increasing value over time per slot, over a range of slots
#
# - Output format: slot \t ms_sice_first_bid \t value
# - Example output:
#
# 5796970 0 5449783315635486
# 5796970 382 5846633010618753
# 5796970 383 10851145321068865
# 5796970 905 11416821942543104
#
"""
Quick and dirty script to download the delivered payloads from relay data API and write into CSV file.
Relays:
https://boost-relay.flashbots.net
https://bloxroute.max-profit.blxrbdn.com
https://bloxroute.ethical.blxrbdn.com
https://bloxroute.regulated.blxrbdn.com
https://builder-relay-mainnet.blocknative.com
/*
Example for using CloudWatch in Golang.
- https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/WhatIsCloudWatchLogs.html
- https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/working_with_metrics.html
Install dependencies:
go get github.com/aws/aws-sdk-go github.com/google/uuid github.com/zhexuany/wordGenerator
function update_in_place(old_root, new_root) {
function are_compatible(lhs, rhs) {
return lhs.nodeType === rhs.nodeType && lhs.tagName === rhs.tagName && lhs.id === rhs.id
}
if (old_root.nodeType === 3 && new_root.nodeType === 3) {
old_root.textContent = new_root.textContent;
return old_root
}
if (!are_compatible(old_root, new_root) || old_root.nodeType !== 1) {
old_root.parentElement.replaceChild(new_root, old_root);
@metachris
metachris / .editorconfig
Created March 21, 2021 20:16
TypeScript Project Bootstrap
# http://editorconfig.org
root = true
[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
---
- hosts: all
gather_facts: false
become: yes
tasks:
- name: Pull sources from the repository
become_user: node
shell: git pull
args:

Context: https://www.youtube.com/watch?v=4M1jWsD0KJQ

Docker commands

docker rm $( docker ps -qa ) -f
docker run --rm -d --name neo-privatenet -p 20333-20336:20333-20336/tcp -p 30333-30336:30333-30336/tcp cityofzion/neo-privatenet
docker exec -it neo-privatenet /bin/bash

Inside the container