Skip to content

Instantly share code, notes, and snippets.

View luanvuhlu's full-sized avatar

luan vu luanvuhlu

View GitHub Profile
@luanvuhlu
luanvuhlu / mynetwork.sh
Last active April 4, 2024 12:23
fix network after connect cyberghost
sudo mv mynetwork.sh /usr/local/bin/mynetwork
@luanvuhlu
luanvuhlu / openvpn-install.sh
Last active October 19, 2023 16:06
Create a OpenVPN Server in Ubuntu
$ sudo apt update
$ sudo apt upgrade
$ wget https://gist.githubusercontent.com/luanvuhlu/7f637f2646a8eb4471a0fcf9b200f7c0/raw/22ab116f89e319ea7bb83524ac11bc232acfc83d/openvpn-install.sh -O openvpn-install.sh
$ sudo chmod +x openvpn-install.sh
$ sudo bash openvpn-install.sh
$ sudo systemctl status openvpn-server@server.service
$ sudo find / -type f -name "*.ovpn" -ls
@luanvuhlu
luanvuhlu / fabfile.py
Last active May 22, 2024 04:43
Build and deploy a jar file to a remote server
# -*- coding: utf-8 -*-
"""
Created by: Luan Vu
This script is used to build and deploy a jar file to a remote server.
It uses Fabric to run commands on the remote server
and uses python-dotenv to load environment variables from a .env file.
Setup:
Create a new file named .env with the following content:
pip install PyPDF2
@luanvuhlu
luanvuhlu / gist:32252f69a7458907c7065514876befc3
Created October 26, 2022 17:11
unzip with specific charset
unzip -O Shift_JIS <zip file>
@luanvuhlu
luanvuhlu / 01-Add User.sh
Last active April 18, 2022 12:57
Install Spring Boot Application in Centos
$ yum update
# Add new user and setup ssh
$ adduser luan
$ passwd luan
$ usermod –aG wheel luan
# or
$ visudo
# Add the line and save
UserName ALL=(ALL) ALL
@luanvuhlu
luanvuhlu / docker_build.sh
Created March 24, 2022 11:43
docker compose build no cache
BUILDKIT_PROGRESS=plain docker-compose build --no-cache
@luanvuhlu
luanvuhlu / sha256_decode.go
Last active February 11, 2022 04:53
Decode sha256 hash with number less than or equal 100000000
package main
import (
"bufio"
"crypto/sha256"
"encoding/hex"
"fmt"
"log"
"os"
"strconv"
@luanvuhlu
luanvuhlu / docker_maven.sh
Created November 9, 2021 03:13
Docker maven
docker run -it --rm -v "$(pwd)":/usr/src/mymaven -v /home/luanvv/.m2:/root/.m2 -w /usr/src/mymaven maven:3.8.3-openjdk-17 mvn clean package
@luanvuhlu
luanvuhlu / Dockerfile
Last active September 8, 2021 03:24
Dockerfile Terraform
FROM ubuntu:20.04
RUN apt-get update -y
RUN apt-get install -y gnupg software-properties-common curl
## AWS CLI
RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
RUN apt install -y unzip
RUN unzip -q awscliv2.zip
RUN ./aws/install
## VIM