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
| version: "3" | |
| # https://github.com/pi-hole/docker-pi-hole/blob/master/README.md | |
| services: | |
| pihole: | |
| container_name: pihole | |
| image: pihole/pihole:latest | |
| # For DHCP it is recommended to remove these ports and instead add: network_mode: "host" | |
| ports: |
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
| # Clone repo | |
| > git clone https://github.com/mr-bolle/docker-openvpn-pihole.git | |
| # Run installer | |
| > cd docker-openvpn-pihole && bash openvpn-install.sh | |
| Hint: | |
| # This repo can't generate password protected client profile. | |
| To create password protected client profile please use following code. |
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
| Some example to setup own vpn server for safety on open wireless. | |
| Server must be KVM based or others. Not OpenVZ. OpenVZ has some difficulties. | |
| Check your server via | |
| > hostnamectl status | |
| # With docker - compose (Tested & running) | |
| https://github.com/kylemanna/docker-openvpn/blob/master/docs/docker-compose.md | |
| # With docker | |
| https://github.com/kylemanna/docker-openvpn |
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
| To list all local users you can use: | |
| > cut -d: -f1 /etc/passwd | |
| ## Some more useful user-management commands (also limited to local users): | |
| # To add a new user you can use: | |
| > sudo adduser new_username | |
| or: | |
| > sudo useradd new_username |
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
| Example docker redis yml file | |
| ---------------------START------------------------ | |
| version: '3' | |
| services: | |
| redis: | |
| image: redis:latest | |
| container_name: redis1 | |
| ports: | |
| - 6379:6379 | |
| volumes: |
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
| tmux: | |
| What is tmux? | |
| Tmux is a terminal multiplexer an alternative to GNU Screen. In other words, it means that you can start a Tmux session and then open multiple windows inside that session. Each window occupies the entire screen and can be split into rectangular panes. | |
| With Tmux you can easily switch between multiple programs in one terminal, detach them and reattach them to a different terminal. | |
| Tmux sessions are persistent, which means that programs running in Tmux will continue to run even if you get disconnected. | |
| All commands in Tmux start with a prefix, which by default is ctrl+b. | |
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
| Need a linux hosted VM (ex. Ubuntu) | |
| STEP 01. Add Following yml file (which is created by default - Git action template) | |
| *******************************File Start************************************* | |
| name: .NET Core | |
| on: | |
| push: | |
| branches: [ master ] | |
| pull_request: |
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
| #To check docker compose version | |
| > docker-compose -v | |
| #To create docker file | |
| > touch docker-compose.yml | |
| #Docker compose file validity | |
| > docker-compose config | |
| #Start docker compose |
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
| Login psql from terminal | |
| > sudo -i -u postgres psql | |
| List of DB | |
| > \l | |
| List available tables | |
| > \dt | |
| Describe a table |
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
| # To get & run redis on docker (6379 is default port) | |
| > docker run -d -p 6379:6379 --name redis1 redis | |
| # Run redis on docker & guaranteed backup (-create /home/redisDB directory 1st in your host machine) | |
| > docker run -v /home/redisDB:/data -d -p 6379:6379 --name redis1 redis redis-server --appendonly yes | |
| # to check if redis is functioning in docker (status checking) | |
| > docker ps | |
| # to view redis logs | |
| > docker logs redis1 | |
| # start a new interactive session (-it) inside the running container | |
| > docker exec -it redis1 sh |