$ uname -r
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
createdb -O odoo_dbuser db_name | |
pg_restore -v -U odoo_dbuser -Fc -d db_name your_dump.dump --no-owner -W | |
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
# Ubuntu 20.04 | |
``` | |
sudo apt update | |
for pkg in docker.io docker-doc docker-compose docker-compose-v2 podman-docker containerd runc; do sudo apt-get remove $pkg; done | |
# Add Docker's official GPG key: | |
sudo apt-get update | |
sudo apt-get install ca-certificates curl gnupg | |
sudo install -m 0755 -d /etc/apt/keyrings |
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
# Hint: the usage of sudo instead of becoming root user is prefered | |
$ sudo apt install -y snap | |
$ sudo snap install microk8s --classic --channel=1.17/stable | |
$ sudo usermod -a -G microk8s $USER | |
$ sudo chown -f -R $USER ~/.kube | |
# Add public IP to CA if it is not already added as this may differ from a vm to another |
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
# Prerequisites: | |
# - OVH/SoYouStart IPS | |
# - OVH/SoYouStart Dedivated Server | |
# | |
* Step 1 (GUI) | |
Chose an ip for each cloud image template amd create Virtual MACs from OVH/SoYouStart Manager | |
* Step 2 (CLI) | |
# cd /var/lib/vz |
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
# Download the certbot and make it executable | |
wget https://dl.eff.org/certbot-auto | |
chmod a+x certbot-auto | |
# When using --standalone make sure to turn your servers are down | |
./certbot-auto certonly --standalone -d hostname.exemple.com | |
# Certifications will be created under: | |
# Certificate: /etc/letsencrypt/live/hostname.exemple.com/fullchain.pem; | |
# AND |
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
// Source : http://stackoverflow.com/questions/3452546/javascript-regex-how-to-get-youtube-video-id-from-url | |
var regExp = /^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=)([^#\&\?]*).*/; | |
var match = url.match(regExp); | |
if (match&&match[2].length==11){ | |
return match[2]; | |
}else{ | |
//error | |
} |