Skip to content

Instantly share code, notes, and snippets.


Quoc Hoang hoangddt

View GitHub Profile
hoangddt / libreswan-client-install
Last active Aug 1, 2020
View libreswan-client-install
apt-get -yq install wget dnsutils openssl \
iptables iproute2 gawk grep sed net-tools || exiterr2
apt-get -yq install libnss3-dev libnspr4-dev pkg-config \
libpam0g-dev libcap-ng-dev libcap-ng-utils libselinux1-dev \
libcurl4-nss-dev flex bison gcc make libnss3-tools \
libevent-dev ppp xl2tpd || exiterr2
hoangddt /
Last active Jan 21, 2019
Docker compose keycloak, Postgres Database
docker run --rm -p 8888:8080 -e POSTGRES_USER=keycloak -e POSTGRES_DATABASE=keycloak_db -e POSTGRES_PASSWORD=4vSm/fNxO6LHSymo3yVPgQ== -e POSTGRES_PORT_5432_TCP_ADDR=postgres.default -e POSTGRES_PORT_5432_TCP_PORT='5432' my-keycloak
docker run --name=postgres -p 5432:5432 -e POSTGRES_USER=keycloak -e POSTGRES_DB=keycloak_db -e POSTGRES_PASSWORD=local postgres
psql -h localhost -p 5432 -U keycloak keycloak_db
docker run -it --rm --link postgres:postgres postgres psql -h postgres -U keycloak keycloak_db
hoangddt /
Created Dec 20, 2018 — forked from masak/
How is git commit sha1 formed

Ok, I geeked out, and this is probably more information than you need. But it completely answers the question. Sorry.

Locally, I'm at this commit:

$ git show
commit d6cd1e2bd19e03a81132a23b2025920577f84e37
Author: jnthn <>
Date:   Sun Apr 15 16:35:03 2012 +0200

    When I added FIRST/NEXT/LAST, it was idiomatic but not quite so fast. This makes it faster. Another little bit of masak++'s program.
hoangddt /
Last active Oct 3, 2018
Code Editor setting
// VS COde
    "window.zoomLevel": 0,
    "workbench.colorTheme": "Material Theme",
    "editor.fontFamily": "Inconsolata-g",
    // "editor.fontWeight": "100",
    "editor.fontSize": 11,
    "editor.letterSpacing": 0.3,
    "editor.minimap.showSlider": "always",

sudo service ssh reload



no-port-forwarding,no-agent-forwarding,no-X11-forwarding,command="echo 'Please login as the user "admin" rather than the user "root".';echo;sleep 10" ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC7cyhhhowluDtBnq3cw6opWeuD/AtwFWguGzwKwRZdlGjsNEv7hrsYeee6Cd82B8/pYdXX/e1Lg02hrmBnunvaB/BZD1Kb7IGvzplOjeJiaFqQvW6QMyWd1pt7ZiHmzyZ0uEBgBsgnblBink+25xqAb8gJD5fHVdzT8aEP8M3gs3dMScfhbxWIPC/a8cyzQ/8khNPdyQtaC0eEmXUHGhNsWnDmQv47lDaKjMi+AsoRxrtceGokWg6a9D/IGsxtKFMkMB/RM83UH/Yjcw9HxQPcKDUWEnnhMPGGGuPwQmikDdsipOT7RzFQZhF2MgNp7dwcnpxzp/sT1KW54L6ZjELP id_rsa

hoangddt /
Last active Sep 7, 2018
Writing table


The table give information about the consumer durables owned in Britain over the course of 11 years starting 1972.

Looking at the graph, it is immediately obvious that all the equipments in Britain exprienced an upward progression. The percentage of television registered the highest percentage throughout the period.

In 1972, television registered 93 percent, then increase steadily to 98 percent in 1983. A similar trend was seen in refrigerator and vacuum cleaner, they both slightly increase throughtout the period. To be specific, the figures for these start at 73 and 87 to 94 and 95 respectively. The percent of central heating in 1972 was 39, then increased exponentially to 64 in 1983. A sinilar trend was seen in telephone, which nearly doubled from 42 to 77 percent.

hoangddt / ssh-agent
Created Aug 21, 2018
ssh-agent add default private key
View ssh-agent
ssh-add ~/.ssh/id_rsa
ssh-add -L
hoangddt / x-docker-run
Created Aug 15, 2018
Override the entrypoint when using docker run
View x-docker-run
docker run --rm -ti --entrypoint='' <image> bash
hoangddt /
Created Aug 2, 2018 — forked from kevin-smets/
Local Kubernetes setup on macOS with minikube on VirtualBox and local Docker registry


Minikube requires that VT-x/AMD-v virtualization is enabled in BIOS. To check that this is enabled on OSX / macOS run:

sysctl -a | grep machdep.cpu.features | grep VMX

If there's output, you're good!


You can’t perform that action at this time.