This file contains 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
# add packages | |
apk update && apk upgrade | |
apk add vim curl | |
# enable service at boot | |
rc-update add apache2 | |
# start service | |
rc-service apache2 start |
This file contains 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
# terminal sharing with others | |
apt install tmate | |
# better curl | |
apt install httpie | |
# better top | |
apt install bpytop | |
# alternate tree |
This file contains 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
#### make sure you have port 1194 accessible from the internet. | |
### =================== | |
### SERVER SIDE | |
### =================== | |
### create a folder where you keep the data generated by openvpn | |
mkdir -p openvpn-data/conf |
This file contains 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
# ================== | |
# GSUTIL | |
# ================== | |
# copy | |
gsutil cp test.txt gs://my-bucket/folder/ | |
# remove with multiple threads | |
gsutil -m rm -r gs://my-bucket/* |
This file contains 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
# Use a shared / mounted folder to store your backups: | |
/share/all/ | |
# BACKUP to local shared folder: | |
tklbam-backup --address file:///share/all/backup-core210 | |
# create a key/password for your backup | |
tklbam-escrow /share/all/backup-core210-key | |
This file contains 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
# ======================== | |
# SERVER SIDE | |
# ======================== | |
apt install samba | |
mkdir -p /share/samba-all | |
# create user admin with password samba | |
adduser --home /share/users/admin --no-create-home --shell /usr/sbin/nologin --ingroup sambashare admin |
This file contains 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
# BEST PRACTICES | |
# https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#exclude-with-dockerignore | |
# docker commands I use on a daily basis | |
docker run -d --rm --name myRedis -p 6379:6379/tcp redis | |
# interactive mode |
This file contains 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
#!/bin/bash | |
# DEFINE COLORS | |
red='$(tput setaf 1)' | |
green='$(tput setaf 2)' | |
yellow='$(tput setaf 3)' | |
blue='$(tput setaf 4)' | |
magenta='$(tput setaf 5)' | |
cyan='$(tput setaf 6)' | |
gray='$(tput setaf 7)' |
This file contains 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
# Just a couple of commands i use on a daily basis. | |
# GIT IGNORE: https://www.atlassian.com/git/tutorials/saving-changes/gitignore | |
#======================================== | |
# INITIAL SETUP | |
#======================================== | |
git config --global user.email "[email protected]" | |
git config --global user.name "Mike Dev-VM" | |
# configure git to follow tags |