Skip to content

Instantly share code, notes, and snippets.

View prestonvanloon's full-sized avatar
⛓️
Buidl ETH2

Preston Van Loon prestonvanloon

⛓️
Buidl ETH2
View GitHub Profile

Keybase proof

I hereby claim:

  • I am prestonvanloon on github.
  • I am prestonvanloon (https://keybase.io/prestonvanloon) on keybase.
  • I have a public key ASCRb4NSwTNmuYUBsoBb7DgRSqaTQvl9vIWPMVpYk0aj7wo

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am prestonvanloon on github.
  • I am prestonvanloon (https://keybase.io/prestonvanloon) on keybase.
  • I have a public key ASBumLn_VZ31EXWmLB5lhI7-_17W5yRtkpXb9IkSY3woDwo

To claim this, I am signing this object:

@prestonvanloon
prestonvanloon / example.go
Created June 26, 2018 16:27
Mutation testing example
// Data represents some arbitrary thing in the universe.
type Data struct {
prices []int
checked bool
}
// Moon? returns true if the price is indicative of the thing going to the moon.
func Moon(data *Data) bool {
// Is the next line important?
// Would any test fail if this line were mutated to
// _ = true ?
@prestonvanloon
prestonvanloon / list
Created July 22, 2018 01:04
How geth-sharding was pruned of all geth commits
git filter-branch --commit-filter '
if echo $GIT_AUTHOR_NAME | grep -F -f /tmp/list >/dev/null;
then
git commit-tree "$@";
else
skip_commit "$@";
fi' HEAD
@prestonvanloon
prestonvanloon / gcrgc.sh
Created September 24, 2018 11:49 — forked from ahmetb/gcrgc.sh
Script to clean up Google Container Registry images pushed before a particular date
#!/bin/bash
# Copyright © 2017 Google Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@prestonvanloon
prestonvanloon / birthday.sol
Created February 8, 2019 01:55
Birthday card for my friend
pragma solidity 0.5.1;
/// @title birthday.sol -- A birthday card for a special person.
/// @author Preston Van Loon <preston@prysmaticlabs.com>
contract BirthdayCard {
event PassphraseOK(string passphrase);
string public message;
bytes32 hashed_passphrase;
time="2019-03-05 23:40:06" level=info msg="Starting Jaeger exporter endpoint at address = http://jaeger-collector.istio-system.svc.cluster.local:14268" prefix=tracing
2019/03/05 23:40:06 Endpoint has been deprecated. Please use CollectorEndpoint instead.
time="2019-03-05 23:40:06" level=info msg="Using custom parameter configuration" prefix=node
time="2019-03-05 23:40:06" level=info msg="checking db" prefix=node
time="2019-03-05 23:40:07" level=info msg="Starting beacon node" prefix=node version="Git commit: c22e4dc2ae6655dbaaf1f76f6b1ba3a89a354cf0. Built at: 2019-03-05 23:16:16+00:00"
time="2019-03-05 23:40:07" level=info msg="Starting 7 services: [*p2p.Server *powchain.Web3Service *operations.Service *blockchain.ChainService *sync.Service *rpc.Service *prometheus.Service]" prefix=registry
time="2019-03-05 23:40:07" level=info msg="Starting service" prefix=p2p
time="2019-03-05 23:40:07" level=info msg="Starting service" endpoint="ws://public-rpc-nodes.pow.svc.cluster.local:8546" prefix=powchain
time="2019-03
@prestonvanloon
prestonvanloon / bench_test.go
Created March 16, 2019 16:26
Testing out hobbits
package example
import (
"testing"
proto "github.com/golang/protobuf/proto"
)
func BenchmarkHobbits(b *testing.B) {
example_ping_req := "EWP 0.1 PING none none 0 5\n12345"
└── tests
├── bls
├── epoch_processing
│   ├── crosslinks
│   │   ├── crosslinks_mainnet.yaml
│   │   └── crosslinks_minimal.yaml
│   └── registry_updates
│   ├── registry_updates_mainnet.yaml
│   └── registry_updates_minimal.yaml
├── operations
2019/09/01 23:32:02 maxprocs: Updating GOMAXPROCS=2: determined from CPU quota
time="2019-09-01 23:32:02" level=info msg="Starting pprof server" addr="http://127.0.0.1:6060/debug/pprof"
time="2019-09-01 23:32:02" level=info msg="Starting Jaeger exporter endpoint at address = http://jaeger-collector.istio-system.svc.cluster.local:14268/api/traces" prefix=tracing
time="2019-09-01 23:32:02" level=info msg="Using custom parameter configuration" prefix=node
time="2019-09-01 23:32:02" level=warning msg="Using non standard genesis delay. This may cause problems in a multi-node environment." prefix=flags
time="2019-09-01 23:32:02" level=warning msg="Using new P2P service." prefix=flags
time="2019-09-01 23:32:02" level=warning msg="Using new sync services." prefix=flags
time="2019-09-01 23:32:02" level=warning msg="Using new database service." prefix=flags
time="2019-09-01 23:32:02" level=warning msg="Using new blockchain service." prefix=flags
time="2019-09-01 23:32:02" level=info msg="Checking db" path="/data/beacon