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
#!/bin/bash | |
# $1: version of Docker Engine to install | |
# update the apt package index | |
sudo apt update | |
# install packages to allow apt to use a repository over HTTPS | |
sudo apt install -y \ | |
apt-transport-https \ |
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
# Step 1 — List All Postgres related packages | |
dpkg -l | grep postgres | |
# Step 2 — Remove all current Postgresql related packages | |
sudo apt --purge remove postgresql* | |
# Step 3 — Remove all of the PostgreSQL data and directories | |
sudo rm -rf /var/lib/postgresql/ | |
sudo rm -rf /var/log/postgresql/ | |
sudo rm -rf /etc/postgresql/ |
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
# Step 1 — Update Base Systems | |
sudo apt update && sudo apt -y upgrade | |
# Step 2 — Import Repository Signing Key | |
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - | |
# Step 3 — Add PostgreSQL repository | |
sudo sh -c 'echo "deb [arch=$(dpkg --print-architecture)] http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' | |
# Step 4 — Update again |
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
#! /bin/bash | |
# Get files from Google Drive | |
# $1 = file ID | |
# $2 = file name | |
URL="https://docs.google.com/uc?export=download&id=$1" | |
wget --load-cookies /tmp/cookies.txt "https://docs.google.com/uc?export=download&confirm=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate $URL -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p')&id=$1" -O $2 && rm -rf /tmp/cookies.txt |