The Git workflow you will be using is as follows:
- Fork the repository to your GitHub account.
- Clone the project on your machine.
#!/bin/bash - | |
export AWS_ACCESS_KEY=<your aws access key> | |
export AWS_SECRET_KEY=<your aws secret> | |
date_current=`date -u +%Y-%m-%d` | |
aws rds describe-db-snapshots --snapshot-type "automated" --db-instance-identifier <db_instance_name> | grep `date +%Y-%m-%d` | grep rds | tr -d '",' | awk '{ print $2 }' > /tmp/sandbox-snapshot.txt | |
snapshot_name=`cat /tmp/<db_instance_name>-snapshot.txt` | |
target_snapshot_name=`cat /tmp/<db_instance_name>-snapshot.txt | sed 's/rds://'` |
The API we are creating in this gist will follow these rules :
password
Grant Type only (no need for Authorization pages and such).v1.api.example.com
)The API will be written in PHP with the Symfony 2 framework. The following SF2 bundles are used :
#!/bin/sh | |
git clone https://github.com/tomaspinho/rtl8821ce.git | |
cd rtl8821ce/ | |
sudo make all | |
sudo make install | |
sudo modprobe -a 8821ce |
#!/bin/bash | |
cd /tmp || exit | |
echo "Downloading sonar-scanner....." | |
if [ -d "/tmp/sonar-scanner-cli-3.2.0.1227-linux.zip" ];then | |
sudo rm /tmp/sonar-scanner-cli-3.2.0.1227-linux.zip | |
fi | |
wget -q https://sonarsource.bintray.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.5.0.2216-linux.zip | |
echo "Download completed." |
Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.
Magic words:
psql -U postgres
Some interesting flags (to see all, use -h
or --help
depending on your psql version):
-E
: will describe the underlaying queries of the \
commands (cool for learning!)-l
: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)If you are using NGINX:
sudo apt-get update
sudo apt-get install software-properties-common
sudo add-apt-repository universe
sudo add-apt-repository ppa:certbot/certbot
sudo apt-get update
againsudo apt-get install certbot python-certbot-nginx
sudo certbot --nginx