Skip to content

Instantly share code, notes, and snippets.

@garyschulte
garyschulte / TenantDatePartitionWriter.java
Last active January 6, 2017 08:05
tenant date partitioned s3 writer
package com.jivesoftware.cloudalytics.util;
import com.amazonaws.services.s3.AmazonS3;
import com.amazonaws.services.s3.model.CreateBucketRequest;
import com.amazonaws.services.s3.model.ObjectMetadata;
import com.amazonaws.services.s3.model.PutObjectRequest;
import com.amazonaws.services.s3.model.PutObjectResult;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.apache.commons.compress.compressors.gzip.GzipCompressorOutputStream;
import org.apache.commons.io.IOUtils;

Screen Quick Reference

Basic

Description Command
Start a new session with session name screen -S <session_name>
List running sessions / screens screen -ls
Attach to a running session screen -x
Attach to a running session with name screen -r <session_name>
@garyschulte
garyschulte / gist:1fee4b66fac666f6de4e7cb32cb08141
Created January 29, 2020 05:00
first pass at prysmatic dashboard
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
@garyschulte
garyschulte / gist:fda2a1878460f77b98f3af7b17748072
Created February 2, 2020 23:50
First pass at a prysmatic grafana dashboard
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
@garyschulte
garyschulte / gist:269c9f67c8ecc38c762d0246a1c4e2ed
Last active April 21, 2020 19:26
Instructions for building and running prysmatic beacon chain on a pi4
Instructions for building and running prysmatic beacon chain on a pi4:
----------------------------------------------------------------------
* download unofficial arm64 bazel, copy it to /usr/local/bin:
https://github.com/SuburbanDad/bazel/releases/tag/2.1.0-arm64
* clone prysm:
```git clone https://github.com/prysmaticlabs/prysm.git```
* build beacon-chain from prysm repo directory:
```bazel build //beacon-chain:beacon-chain```
@garyschulte
garyschulte / snippet-besu-ohio-mainnet-20.10.2-fast-sync
Last active May 20, 2021 20:58
snippets for bonsai vs forest comparison
{"timestamp":"2021-05-20T20:41:06,601","level":"INFO","thread":"EthScheduler-Workers-2","class":"PersistBlockTask","message":"Imported #12,473,483 / 146 tx / 0 om / 14,972,969 (99.9%) gas / (0x6dc4c501ac876117974f9c08cd2b5e7ffc4e2e5134b71d7b25c287bb1978ea64) in 4.437s. Peers: 26","throwable":""}
{"timestamp":"2021-05-20T20:41:06,601","level":"INFO","thread":"EthScheduler-Workers-2","class":"BlockPropagationManager","message":"Imported 1 pending blocks","throwable":""}
{"timestamp":"2021-05-20T20:41:14,139","level":"INFO","thread":"nioEventLoopGroup-3-2","class":"BlockPropagationManager","message":"Saving announced block 12473485 (0xcee34c1b972f1c5007feb93121e496a61d870ddf746cc2ddaa04166aa339de10) for future import","throwable":""}
{"timestamp":"2021-05-20T20:41:14,139","level":"INFO","thread":"nioEventLoopGroup-3-2","class":"GetBlockFromPeerTask","message":"Failed to download block 0xcee34c1b972f1c5007feb93121e496a61d870ddf746cc2ddaa04166aa339de10 from peer Peer 0x480ba2a9b7f69569ee....","throwable":""}
{"tim
09:36:15.571 INFO - Slot Event *** Slot: 1218179, Block: 64283b..24a5, Epoch: 38068, Finalized checkpoint: 38066, Finalized root: 361ad6..e051, Peers: 74
09:36:27.617 INFO - Slot Event *** Slot: 1218180, Block: 921f2c..9dea, Epoch: 38068, Finalized checkpoint: 38066, Finalized root: 361ad6..e051, Peers: 74
09:36:39.567 INFO - Slot Event *** Slot: 1218181, Block: 36b8c4..856b, Epoch: 38068, Finalized checkpoint: 38066, Finalized root: 361ad6..e051, Peers: 74
09:36:51.572 INFO - Slot Event *** Slot: 1218182, Block: d74150..529c, Epoch: 38068, Finalized checkpoint: 38066, Finalized root: 361ad6..e051, Peers: 74
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x0000007f996b8c0c, pid=3164, tid=3218
#
# JRE version: OpenJDK Runtime Environment (11.0.9+11) (build 11.0.9+11-Ubuntu-0ubuntu1.18.04.1)
@garyschulte
garyschulte / genesis.json
Created July 22, 2021 17:32
example 1559 genesis config
{
"config":{
"chainId":7882,
"constantinoplefixblock": 0,
"aleutblock": 10,
"londonblock": 10,
"clique":{
"blockperiodseconds":15,
"epochlength":30000
}
# This test looks for a few possible problem states with timestamps:
#
# 1. A block with the same timestamp as the parent is invalid
# 2. A block with a timestamp prior to its parent is invalid
# 3. A block with a timestamp one microsecond after its parent is valid
#
# All three conditions come from inequality (49) of the yellow paper
# (https://ethereum.github.io/yellowpaper/paper.pdf, p. 7)
#
# Note that as this test includes blocks that create exceptions, it cannot be
### Keybase proof
I hereby claim:
* I am garyschulte on github.
* I am garythehuman (https://keybase.io/garythehuman) on keybase.
* I have a public key ASDOeGPWksCSngSIfsY3TWc7jLGZ7mRrAQXEoODSoILUKQo
To claim this, I am signing this object: