Skip to content

Instantly share code, notes, and snippets.

View yashbhutwala's full-sized avatar
🌍
spreading tribal knowledge

Yash Bhutwala yashbhutwala

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

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 December 20, 2017 03:02
blockstack verification gist
Verifying my Blockstack ID is secured with the address 1GyegMsvvzyAtdbMFucVyPaYj1i2QWxRDp https://explorer.blockstack.org/address/1GyegMsvvzyAtdbMFucVyPaYj1i2QWxRDp

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:

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.

apiVersion: audit.k8s.io/v1
kind: Policy
rules:
- level: Metadata
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:
{
"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"
# 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 November 8, 2019 14:05
Install Helm v3-rc.3 on macOS darwin amd64
#!/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
#!/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