Skip to content

Instantly share code, notes, and snippets.

View shi-yan's full-sized avatar
💭
keyboard smashing

Shi Yan shi-yan

💭
keyboard smashing
View GitHub Profile
@shi-yan
shi-yan / gist:dc93b6fb121b89e65ec849e0db68f51e
Last active May 5, 2020 08:28 — forked from yuezhu/gist:47b15b4b8e944221861ccf7d7f5868f5
Generate self-signed certificate for HAProxy
# Generate a unique private key (KEY)
sudo openssl genrsa -out xxx.local.key 2048
# Generating a Certificate Signing Request (CSR)
sudo openssl req -new -key xxx.local.key -out xxx.local.csr
# Creating a Self-Signed Certificate (CRT)
sudo openssl x509 -req -days 365 -in xxx.local.csr -signkey mydomain.key -out xxx.local.crt
# Append KEY and CRT to xxx.local.pem
@shi-yan
shi-yan / gist:6fa8aeea3d04f1b149f46ff725408d28
Last active January 14, 2017 21:46 — forked from giosakti/gist:3027026
[Git] Fetch & merge upstream/downstream repo
downstream github
git remote add <upstream>/<repo> ssh://git@bitbucket.org/<upstream>/<repo>.git
git fetch <upstream>/<repo>
git checkout master
git merge remotes/<upstream>/<repo>/master
sync submodules
git submodule update --init --recursive