Skip to content

Instantly share code, notes, and snippets.

View protolambda's full-sized avatar
:shipit:
building L1 and L2 ethereum things

protolambda protolambda

:shipit:
building L1 and L2 ethereum things
View GitHub Profile
@protolambda
protolambda / dark_gtk_fix.css
Created July 6, 2016 16:05
Dark GTK themes mess up some poorly styled webpages; fix that with a Stylish usertheme.
input:not(.urlbar-input):not(.textbox-input) {
-moz-appearance: none !important;
background-color: white;
color: black;
}
#downloads-indicator-counter {
color: white;
}
@protolambda
protolambda / main.dart
Last active October 24, 2016 18:48
2x2x2 Rubik's Cube bitboard generator, for edges. By @protolambda
/*
* Quick but powerful Rubik's cube bitboard generator. For 2x2x2 cubes, could be extended for 3x3x3.
* Made by @protolambda
*
* The bitboards are used for rotating the edges of a face clockwise or counter-clockwise.
*
*/
void main() {
@protolambda
protolambda / startx_trick.sh
Created July 13, 2018 12:36
Simple trick to run startx by default on tty1
# /etc/profile
... *stuff* ...
# autostart xorg-server on tty1
if [[ "$(tty)" == '/dev/tty1' ]]; then
exec startx
fi

ETH 2.0 concept Go client

Initial design doc for a new Go client for ETH 2.0. By @protolambda.

Hope the ideas and outlined problems help design the ETH 2.0 successor of Geth ("Firefly"? See F.A.Q.).

This is a starting point for a work-doc for initial contributors, some of the goals may still change.

@protolambda
protolambda / keybase.md
Created February 21, 2019 21:33
Keybase proof

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

@protolambda
protolambda / remote-ref.sh
Last active May 8, 2019 11:58
Minimal git branch reference for Geth
git init test-geth && cd test-geth
git remote add origin https://github.com/ethereum/go-ethereum.git
SHA1="$(git ls-remote origin refs/heads/master | cut -f1)"
git fetch --no-tags --depth=1 origin "$SHA1"
git cat-file commit "$SHA1"
du -sh .git
# status-quo, readability
def a_next_power_of_2(x):
    if x == 0: return 0
    return 1 if x == 1 else 2 * a_next_power_of_2((x+1)//2)

# faster version, cross-language
def b_next_power_of_2(v: int) -> int:
    """
# Pre-req:
# perf, rust, perl
# Enable debug in cargo
#
# [profile.release]
# debug = true
# create benchmark binary with callgraph information
RUSTFLAGS="-g" cargo bench --features="bench" --no-run
@protolambda
protolambda / repos.py
Last active August 18, 2019 03:01
eth2 repos
graph = {
# Clients
'clients': {
'yeeth': [
'https://github.com/yeeth/BeaconChain.swift.git',
],
'trinity': [
'https://github.com/ethereum/trinity.git',
],
'nimbus': [