# 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:
"""
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
graph = { | |
# Clients | |
'clients': { | |
'yeeth': [ | |
'https://github.com/yeeth/BeaconChain.swift.git', | |
], | |
'trinity': [ | |
'https://github.com/ethereum/trinity.git', | |
], | |
'nimbus': [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
Based on https://github.com/protolambda/lmd-ghost/
Simulation config:
config := &sim.SimConfig{
ValidatorCount: 40000,
LatencyFactor: 0.8,
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:
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/profile | |
... *stuff* ... | |
# autostart xorg-server on tty1 | |
if [[ "$(tty)" == '/dev/tty1' ]]; then | |
exec startx | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* 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() { | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
input:not(.urlbar-input):not(.textbox-input) { | |
-moz-appearance: none !important; | |
background-color: white; | |
color: black; | |
} | |
#downloads-indicator-counter { | |
color: white; | |
} |
NewerOlder