Skip to content

Instantly share code, notes, and snippets.

0x16ca25fccc9c3e1d6eea91b3272f6113f5d94d6a
0xd89D68172B10a1ad9ab9195bB05D8d04b2A4dfAf
## Ethereum 101 Course
## Blockchain Foundation
What is a blockchain?
What are transactions and blocks?
How do P2P systems operate?
The most prominent consensus mechanisms
Difference between private, consortium, and public networks
What does the data structure look like?
wei: 1
kwei: 1.000
ada: 1.000
femtoether: 1.000
mwei: 1.000.000
babbage: 1.000.000
picoether: 1.000.000
gwei: 1.000.000.000
shannon: 1.000.000.000
nanoether: 1.000.000.000
package main
import (
"strconv"
"fmt"
)
type Node struct {
value interface{}
next *Node
# Server Command
echo -e "HTTP/1.1 201 OK\r\n\r\n" | nc -l 8080
# Client Command
echo "firstname=John;lastname=Smith;company=Smith & Sons;id=1234567890;" > req.txt
http --form POST :8080/examplehandler 'content-type: text/plain; Accept: text/plain' < req.txt
@rezamt
rezamt / spiffy-framework
Last active February 24, 2018 15:35
SPIFEE Information
SPIFFE is to secure process to process communication
1- SPIFFE Identity
spiffe://trust-domain/path
1-1 Trusted domain
1-2 path
A- Identifying services directly
spiffe://staging.example.com/payments/mysql or
@rezamt
rezamt / k8s-vagrant-vbx
Created February 24, 2018 15:35
K8s on Vagrant + Virtual box
# Setting up a cluster is as simple as running:
export KUBERNETES_PROVIDER=vagrant
curl -sS https://get.k8s.io | bash
# Will download kubernetes-server-linux-amd64.tar.gz from https://dl.k8s.io/v1.9.3
# Will download and extract kubernetes-client-darwin-amd64.tar.gz from https://dl.k8s.io/v1.9.3
# then specify number of running nodes (master + worker)
export NUM_NODES=3
azure cli
# resource group
az group create -n "rg-demo" --location "Australia Southeast" --no-wait
# ======================== Network
# nsg
az network nsg create -n "nsg-demo" -g "rg-demo" -l "Australia Southeast"
$stName = "<chosen storage account name>"
$locName = "<chosen Azure location name>"
$rgName = "TestRG"
New-AzureRmResourceGroup -Name $rgName -Location $locName
$storageAcc = New-AzureRmStorageAccount -ResourceGroupName $rgName -Name $stName
-Type "Standard_GRS" -Location $locName
$singleSubnet = New-AzureRmVirtualNetworkSubnetConfig -Name singleSubnet
-AddressPrefix 10.0.0.0/24
$vnet = New-AzureRmVirtualNetwork -Name TestNet -ResourceGroupName $rgName -Location $locName - AddressPrefix 10.0.0.0/16 -Subnet $singleSubnet
$pip = New-AzureRmPublicIpAddress -Name TestPIP -ResourceGroupName $rgName -Location $locName - AllocationMethod Dynamic