ADMIN_USER=thiago
usermod -a $ADMIN_USER -G sudo
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
DNSSERVER=8.8.8.8; while true; do dig @$DNSSERVER www.google.com | grep time|awk '{print $1"@"$DNSSERVER}'; sleep 0.5; done |
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
# You should have a basic install after this | |
sudo apt-get update && sudo apt-get install --yes python3-pip | |
# Updating pip3, following the recomendation on https://jupyter.readthedocs.io/en/latest/install.html | |
# sudo is optional in this step | |
sudo pip3 install --upgrade pip | |
# Installing virtualenv. Instructions: https://virtualenv.pypa.io/en/stable/installation | |
sudo pip3 install virtualenv |
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
apt-get update | |
# Ansible | |
apt-get update | |
apt-get install dirmngr |
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 | |
# SSH server installation | |
sudo apt-get update | |
sudo apt-get install --yes ssh | |
# mosh and tmux make life easier :) | |
sudo apt-get install --yes mosh tmux |
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
## https://docs.microsoft.com/en-us/cli/azure/install-azure-cli-apt?view=azure-cli-latest | |
AZ_REPO=$(lsb_release -cs) | |
echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $AZ_REPO main" | \ | |
sudo tee /etc/apt/sources.list.d/azure-cli.list | |
sudo apt-key adv --keyserver packages.microsoft.com --recv-keys 52E16F86FEE04B979B07E28DB02C46DF417A0893 | |
sudo apt-get install apt-transport-https |
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
pip3 install --user --upgrade awscli | |
aws --version |
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
pip3 install --user --upgrade youtube-dl | |
# Download a youtube playlist, only videos newer than 3 months | |
youtube-dl --dateafter now-3months https://www.youtube.com/playlist?list=PLI1_CQcV71RmeydXo-5K7DAxLsUX6SVhL | |
# Organizing downloaded files in folders | |
youtube-dl --output '%(playlist)s/%(playlist_index)s- %(title)s.%(ext)s'" |
PostgreSQL Exercises provides exercises for learning SQL, using a Postgres instance. This is a reference on how to setup a dedicated environment using a Docker container.
The official Docker image for Postgres will be used.
Data is persisted in a named volume PGEXERCISES
, mapped to the default path inside the container.
We aren't defining a password, as the connection will be local (from inside the container).
OlderNewer