Skip to content

Instantly share code, notes, and snippets.

View Varunram's full-sized avatar

Varunram Ganesh Varunram

View GitHub Profile
@Varunram
Varunram / COMPAT.png
Created November 30, 2017 11:56 — forked from ajtowns/COMPAT.png
github conflicting PRs
COMPAT.png
@Varunram
Varunram / makecert.sh
Created February 7, 2018 11:43 — forked from jim3ma/makecert.sh
Golang TLS server and client
#!/bin/bash
# call this script with an email address (valid or not).
# like:
# ./makecert.sh joe@random.com
mkdir certs
rm certs/*
echo "make server cert"
openssl req -new -nodes -x509 -out certs/server.pem -keyout certs/server.key -days 3650 -subj "/C=DE/ST=NRW/L=Earth/O=Random Company/OU=IT/CN=www.random.com/emailAddress=$1"
echo "make client cert"
openssl req -new -nodes -x509 -out certs/client.pem -keyout certs/client.key -days 3650 -subj "/C=DE/ST=NRW/L=Earth/O=Random Company/OU=IT/CN=www.random.com/emailAddress=$1"
@Varunram
Varunram / client.go
Created February 7, 2018 11:43 — forked from spikebike/client.go
TLS server and client
package main
import (
"crypto/tls"
"crypto/x509"
"fmt"
"io"
"log"
)
@Varunram
Varunram / dlc3point.txt
Created April 12, 2018 16:38 — forked from adiabat/dlc3point.txt
DLC oracle publicly computable R-points
The sigantures in DLC need a pre-committed R point as well as pubkey point.
Oracle pubkey = A, R
value message = v
signature = s
(generator point G)
Contract participants compute oracle point P
P = sG = R - h(v, R)A
// Tracking cursor position in real-time without JavaScript
// Demo: https://twitter.com/davywtf/status/1124146339259002881
package main
import (
"fmt"
"net/http"
"strings"
)