Skip to content

Instantly share code, notes, and snippets.

View greenstevester's full-sized avatar

steve greensill greenstevester

  • switzerland
View GitHub Profile
@greenstevester
greenstevester / gist:e56e8bbcae5e26f1c2d708a183d45498
Last active October 6, 2018 06:17
How to run bitcoin source through sonar
First, you have to download and build the Bitcoin Core
------------------------
1. Clone the bitcoin source code and cd into `bitcoin`
git clone https://github.com/bitcoin/bitcoin
cd bitcoin
2. Build bitcoin-core:
@greenstevester
greenstevester / Rinkeby.md
Created February 18, 2018 13:25 — forked from learner-long-life/Rinkeby.md
How to get on Rinkeby Testnet in less than 10 minutes

How to get on Rinkeby Testnet in less than 10 minutes

Following instructions from the excellent https://www.rinkeby.io/

Synchronizing a Full Node

A full node lets you access all state. There is a light node (state-on-demand) and wallet-only (no state) instructions as well,

@greenstevester
greenstevester / gist:3e32b00884af8d42b9506237652dffdf
Last active April 24, 2019 14:41
upgrading angular-cli to the new package @angular/cli
npm uninstall -g angular-cli
npm cache clean --force
npm install -g @angular/cli@latest
@greenstevester
greenstevester / gist:740b562bcc7910656b4e0465a84fdb0a
Last active April 22, 2019 12:40
Uninstall Oracle Java on Mac OSX using the Terminal / Install AdoptOpenJDK using homebrew
Remove Java from the Apple System Preferences Pane
----------------------------------------------------
sudo rm -fr /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin
sudo rm -fr /Library/PreferencePanes/JavaControlPanel.prefPane
sudo rm -fr ~/Library/Application\ Support/Oracle/Java
Install with Homebrew
---------------------
install Homebrew if you haven't already. Make sure it is updated:
@greenstevester
greenstevester / terraform-kubernetes-docker-macos.md
Created September 9, 2021 10:53 — forked from ivaravko/terraform-kubernetes-docker-macos.md
The simple Terraform and Kubernetes with Docker on macOS

If you'd like to experiment with Terraform and Kubernetes on macOS locally, a great provider for doing so is the Kubernetes provider. You can get set up in a few simple steps, like so:

1. Install Docker

Install Docker for Mac if you have not already.

@greenstevester
greenstevester / latency.txt
Created October 23, 2021 15:47 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
Pre-requisite: brew
NOTE: This install is based on nvm:
see http://dev.topheman.com/install-nvm-with-homebrew-to-use-multiple-versions-of-node-and-iojs-easily/
see also http://stackoverflow.com/questions/28017374/what-is-the-suggested-way-to-install-brew-node-js-io-js-nvm-npm-on-os-x
1. brew update
2. brew install nvm
3. Create NVM's working directory if it doesn't exist:
mkdir ~/.nvm
This ensures you have npm setup and configured correctly on osx.
see http://dreamerslab.com/blog/en/npm-basic-commands/
see https://www.sitepoint.com/beginners-guide-node-package-manager/
npm config ls -l
npm config set loglevel info
npm config set registry http://registry.npmjs.org/
npm set progress=false
npm install --verbose
@greenstevester
greenstevester / latency.md
Created February 14, 2022 14:46 — forked from l2dy/latency.md
Latency Numbers Every Programmer Should Know

Latency numbers every programmer should know

L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns             
Compress 1K bytes with Zippy ............. 3,000 ns  =   3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns  =  20 µs
SSD random read ........................ 150,000 ns  = 150 µs

Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs

How to Build a Bitcoin Full Node on a Raspberry Pi 3.
What is a Bitcoin Full Node?
-------------------------------
A Bitcoin full node is much simpler than it sounds.
A full node is simply a computer that is running the Bitcoin Core Wallet.
The Bitcoin Core Wallet, by default, downloads a full copy of the Blockchain.
A. You'll need a 1 TB Hard Drive as of 18.12.2023, its circa 534 GB see https://www.blockchain.com/explorer/charts/blocks-size