Skip to content

Instantly share code, notes, and snippets.

@nikileshsa
nikileshsa / iterm2.md
Created October 30, 2018 14:26 — forked from squarism/iterm2.md
iterm2 cheatsheet

Tabs and Windows

Function Shortcut
Fullscreen + Enter
Previous Tab + Left Arrow
Next Tab + Right Arrow
Go to Tab + Number
Go to Window + Option + Number
Go to Split Pane by Direction + Option + Arrow
openssl verify -CAfile ./org0-ca-com.pme ../peer/org0-peer0-com-cert.pme
openssl x509 -in cmds/certs/Org1-localhost-cert.pme -noout -text
➜ ~ docker logs -f localveradev_vera1_1
Starting vera for peer peer1
rm -f /go/bin/vera_peer
rm -rf scratch/*
cd contracts/example && npm uninstall
up to date in 0.036s
cd sdk/nodejs && npm uninstall
up to date in 0.036s
rm -rf contracts/example/node_modules
rm -rf sdk/nodejs/node_modules
@nikileshsa
nikileshsa / gist:b051cffcbd7365aa30909ddea896de75
Created January 16, 2018 19:50
docker ps logs vera peer 0
local-vera-dev git:(nikil/local_dev_for_kevin) ✗ docker logs -f localveradev_vera0_1
Starting vera for peer peer0
rm -f /go/bin/vera_peer
rm -rf scratch/*
cd contracts/example && npm uninstall
up to date in 0.053s
cd sdk/nodejs && npm uninstall
up to date in 0.027s
rm -rf contracts/example/node_modules
rm -rf sdk/nodejs/node_modules
➜ local-vera-dev git:(nikil/local_dev_for_kevin) ✗ docker logs -f localveradev_vera0_1
Starting vera for peer peer0
rm -f /go/bin/vera_peer
rm -rf scratch/*
cd contracts/example && npm uninstall
up to date in 0.049s
cd sdk/nodejs && npm uninstall
up to date in 0.044s
rm -rf contracts/example/node_modules
rm -rf sdk/nodejs/node_modules
➜ xtrace-services git:(dev) ✗ NODE_ENV=dev-local npm test
> xtrace-mqtt@1.0.0 test /Users/niksubra/k/xtrace-services
> NODE_ENV=test nyc ava */run.test.js -v
host localhost:9090
host localhost:9090
✔ SmartContract:: Label object should insert a new label (1s)
- Broker:: It should subscribe and send greeting to broker
FROM golang:1.9.2
ADD . /go/src/github.com/golang/example/outyet
RUN go install github.com/golang/example/outyet
RUN ["chmod", "+x", "/go/src/github.com/golang/example/outyet/bootstrap.sh"]
RUN ["chmod", "+x", "/go/bin/outyet"]
CMD ["/go/src/github.com/golang/example/outyet/bootstrap.sh"]
@nikileshsa
nikileshsa / protobuf-serialization.md
Created November 18, 2017 03:04 — forked from kchristidis/protobuf-serialization.md
Notes on protocol buffers and deterministic serialization (or lack thereof)

There doesn't seem to be a good resource online describing the issues with protocol buffers and deterministic serialization (or lack thereof). This is a collection of links on the subject.

Protocol Buffers v3.0.0. release notes:

The deterministic serialization is, however, NOT canonical across languages; it is also unstable across different builds with schema changes due to unknown fields.

Maps documentation:

Wire format ordering and map iteration ordering of map values is undefined, so you cannot rely on your map items being in a particular order.

@nikileshsa
nikileshsa / protobuf-serialization.md
Created November 18, 2017 03:04 — forked from kchristidis/protobuf-serialization.md
Notes on protocol buffers and deterministic serialization (or lack thereof)

There doesn't seem to be a good resource online describing the issues with protocol buffers and deterministic serialization (or lack thereof). This is a collection of links on the subject.

Protocol Buffers v3.0.0. release notes:

The deterministic serialization is, however, NOT canonical across languages; it is also unstable across different builds with schema changes due to unknown fields.

Maps documentation:

Wire format ordering and map iteration ordering of map values is undefined, so you cannot rely on your map items being in a particular order.

@nikileshsa
nikileshsa / gist:78eafd94191bb034bf9ece57e6366351
Created November 10, 2017 14:07
open ssl cert gen commands
# generate ca private key
openssl ecparam -name prime256v1 -out $curveParamFile
openssl ecparam -in $curveParamFile -genkey -noout -out $cakeyFile
# generate ca cert
openssl req -config $confFile -key $cakeyFile -new -x509 -days 7300 -sha256 -extensions v3_ca -out $cacertFile -subj "/O=$orgName/OU=$orgName/CN=CA"
# generate the signing key for this entity
keyFile=$kyDir/key-$entity.pem
openssl ecparam -in $curveParamFile -genkey -noout -out $keyFile