Skip to content

Instantly share code, notes, and snippets.

@codinggg
codinggg / golang-tls.md
Created December 16, 2019 07:07 — forked from denji/golang-tls.md
Simple Golang HTTPS/TLS Examples

Moved to git repository: https://github.com/denji/golang-tls

Generate private key (.key)
# Key considerations for algorithm "RSA" ≥ 2048-bit
openssl genrsa -out server.key 2048

# Key considerations for algorithm "ECDSA" ≥ secp384r1
# List ECDSA the supported curves (openssl ecparam -list_curves)
@codinggg
codinggg / event.cpp
Created November 7, 2019 05:31 — forked from darkf/event.cpp
Simple event system in C++
#include <functional>
#include <map>
#include <typeinfo>
#include <iostream>
struct Event {
virtual ~Event() {}
};
struct TestEvent : Event {
std::string msg;
@codinggg
codinggg / Compile_Bitcoin_on_Ubuntu_14_04
Created September 11, 2018 07:43 — forked from kostaz/Compile_Bitcoin_on_Ubuntu_14_04
Compile Bitcoin on Ubuntu 14.04
Assuming the username of the Ubuntu user is "theusername".
Preparation
-----------
```
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install build-essential libtool autotools-dev autoconf pkg-config libssl-dev
@codinggg
codinggg / setup-zeromq.sh
Created September 4, 2018 01:16 — forked from katopz/setup-zeromq.sh
Setup zeromq in Ubuntu 16.04
#!/usr/bin/bash
# Download zeromq
# Ref http://zeromq.org/intro:get-the-software
wget https://github.com/zeromq/libzmq/releases/download/v4.2.2/zeromq-4.2.2.tar.gz
# Unpack tarball package
tar xvzf zeromq-4.2.2.tar.gz
# Install dependency