Skip to content

Instantly share code, notes, and snippets.

Avatar
🚀
If you want to truly understand something, try to change it.

Hoang Trinh piavgh

🚀
If you want to truly understand something, try to change it.
View GitHub Profile
@piavgh
piavgh / docker-compose.yml
Last active Aug 13, 2020
Traefik docker-compose.yml for OpenPaaS SPAs
View docker-compose.yml
version: '3'
services:
reverse-proxy:
# The official v2 Traefik docker image
image: traefik:v2.2
# Enables the web UI and tells Traefik to listen to docker
command:
- "--log.level=INFO"
- "--accesslog=true"
@piavgh
piavgh / add-docker-user.sh
Created Aug 17, 2020
Add a Docker user with the name from command line
View add-docker-user.sh
#!/usr/bin/env bash
help() {
cat <<EOF
Arguments:
+\$1 given username
Usage example:
$ ./add-docker-user.sh jenkins
EOF
}
View docker-clear-log.sh
#!/bin/bash -e
if [[ -z $1 ]]; then
echo "No container specified"
exit 1
fi
if [[ "$(docker ps -aq -f name=^/${1}$ 2> /dev/null)" == "" ]]; then
echo "Container \"$1\" does not exist, exiting."
exit 1
View checkport
alias checkport="sudo lsof -i -P -n | grep LISTEN"
@piavgh
piavgh / cloudSettings
Last active Feb 19, 2021
VSCode Settings Linagora Ubuntu
View cloudSettings
{"lastUpload":"2021-02-19T15:56:43.702Z","extensionVersion":"v3.4.3"}