This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo mv mynetwork.sh /usr/local/bin/mynetwork |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ sudo apt update -y | |
| $ sudo apt upgrade -y | |
| $ wget https://gist.github.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 [email protected] | |
| $ sudo find / -type f -name "*.ovpn" -ls |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- 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: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pip install PyPDF2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| unzip -O Shift_JIS <zip file> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| BUILDKIT_PROGRESS=plain docker-compose build --no-cache |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "bufio" | |
| "crypto/sha256" | |
| "encoding/hex" | |
| "fmt" | |
| "log" | |
| "os" | |
| "strconv" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
NewerOlder