Skip to content

Instantly share code, notes, and snippets.

Avatar
🌍
spreading tribal knowledge

Yash Bhutwala yashbhutwala

🌍
spreading tribal knowledge
View GitHub Profile
@yashbhutwala
yashbhutwala / keybase.md
Created Nov 10, 2017
Github Keybase Proof
View keybase.md

Keybase proof

I hereby claim:

  • I am yashbhutwala on github.
  • I am ybhutwala (https://keybase.io/ybhutwala) on keybase.
  • I have a public key ASDLySZySwjW577_8tBZLNEU6bhkU3DfompmzvKNS29_tgo

To claim this, I am signing this object:

@yashbhutwala
yashbhutwala / blockstack
Created Dec 20, 2017
blockstack verification gist
View blockstack
Verifying my Blockstack ID is secured with the address 1GyegMsvvzyAtdbMFucVyPaYj1i2QWxRDp https://explorer.blockstack.org/address/1GyegMsvvzyAtdbMFucVyPaYj1i2QWxRDp
View wallet_and_segwit.md

I'll first give some thoughts on the design of the wallet in general, before explaining current and future SegWit wallet support.

Current design

Conceptually, a wallet currently contains mapKeys, mapScripts, and setWatchOnly, which together determine which outputs are considered "ours" (IsMine), and how to solve and sign for them. Then the wallet further contains key metadata, key chains, and key pool at the wallet level that feed into this.

We determine whether outputs are ours using ad-hoc logic that mostly answers the question "Could we sign this?", but with some notable exceptions:

View bitcoin-paper-errata-and-details.md

A description of known problems in Satoshi Nakamoto's paper, "Bitcoin: A Peer-to-Peer Electronic Cash System", as well as notes on terminology changes and how Bitcoin's implementation differs from that described in the paper.

Abstract

The longest chain not only serves as proof of the sequence of events witnessed, but proof that it came from the largest pool of CPU power.

View basic-audit-policy.yml
apiVersion: audit.k8s.io/v1
kind: Policy
rules:
- level: Metadata
View kind-config.yml
kind: Cluster
apiVersion: kind.sigs.k8s.io/v1alpha3
nodes:
- role: control-plane
extraMounts:
- hostPath: ~/kind/audit-policy.yaml
containerPath: /etc/kubernetes/audit-policy.yaml
- hostPath: ~/kind/apiserver-audit.log
containerPath: /var/log/apiserver-audit.log
kubeadmConfigPatches:
View apiserver-audit.json
{
"apiVersion": "audit.k8s.io/v1",
"auditID": "cd2da677-f8a1-4c65-8033-a020a7e9f2a8",
"kind": "Event",
"level": "Metadata",
"objectRef": {
"resource": "pods",
"namespace": "kube-system",
"name": "kube-apiserver-single-control-plane",
"apiVersion": "v1"
View kind-calico.yml
# References:
# https://godoc.org/sigs.k8s.io/kind/pkg/internal/apis/config#Cluster
# https://godoc.org/sigs.k8s.io/kind/pkg/internal/apis/config#Networking
kind: Cluster
apiVersion: kind.sigs.k8s.io/v1alpha3
nodes:
- role: control-plane
image: kindest/node:v1.15.3
- role: worker
@yashbhutwala
yashbhutwala / install-helm-v3.sh
Created Nov 8, 2019
Install Helm v3-rc.3 on macOS darwin amd64
View install-helm-v3.sh
#!/bin/bash
set -eou pipefail
#set helm version
helmVersion=helm-v3.0.0-rc.3-darwin-amd64.tar.gz
#download helm version
wget https://get.helm.sh/$helmVersion
tar xvzf $helmVersion
View cluster-api-aws-commands.sh
#!/bin/bash
# https://news.ycombinator.com/item?id=10736584
set -o errexit -o nounset -o pipefail
# this line enables debugging
set -xv
# create cluster
kind -v 3 create cluster --kubeconfig ~/.kube/kind-kubeconfigs --name clusterapi
cp ~/.kube/kind-kubeconfigs ~/.kube/config