Skip to content

Instantly share code, notes, and snippets.

Avatar

Samvit Jain SamvitJ

View GitHub Profile
@SamvitJ
SamvitJ / Paxos.txt
Created Oct 23, 2016
Paxos Pseudocode
View Paxos.txt
--- Paxos Proposer ---
proposer(v):
choose n > n_p
send prepare(n) to all servers including self
if prepare_ok(n, n_a, v_a) from majority:
v’ = v_a with highest n_a; choose own v otherwise
send accept(n, v’) to all
if accept_ok(n) from majority:
send decided(v’) to all
@SamvitJ
SamvitJ / install-cert.sh
Last active Apr 29, 2016
Scripts for importing/installing self-signed certificate on OS X
View install-cert.sh
# Cert signed by a root CA
scp twenty-client@10.8.220.169:~/scripted/root-CA/{server.crt,rootCA.pem} .
sudo security add-trusted-cert -d -r trustRoot -k "/Library/Keychains/System.keychain" "./rootCA.pem"
sudo security add-trusted-cert -r trustRoot -k "/Library/Keychains/System.keychain" "./server.crt"
# Self-signed cert
scp twenty-client@10.8.220.169:~/scripted/server-only/server.crt .
sudo security add-trusted-cert -d -r trustRoot -k "/Library/Keychains/System.keychain" "./server.crt"