Create a folder for the repo.
mkdir ~/Desktop/repo && cd ~/Desktop/repoClone the remote repo as a bare repository to .git directory insdie the repo directory.
git clone --bare git@github.com:user/repo.git .git # <-- notice the extra .git| #!/bin/bash | |
| echo Changing to Home directory... | |
| cd $HOME | |
| echo Cloning the repo.. | |
| git clone --bare https://github.com/alhoqbani/dotfiles.git .dotfiles | |
| echo Done Cloning. | |
| echo Checkout the files | |
| cd .dotfiles | |
| git config status.showuntrackedfiles no |
| #!/usr/bin/env bash | |
| C='\033[1;34m' # Purple Color | |
| NC='\033[0m' # No Color | |
| echo '##Installation: statrs' >> installation.log | |
| export DEBIAN_FRONTEND=noninteractive | |
| debconf-set-selections <<< "mysql-server mysql-server/root_password password root" | |
| debconf-set-selections <<< "mysql-server mysql-server/root_password_again password root" | |
| apt-get update -q &>> installation.log |
| #!/usr/bin/env bash | |
| # A script to automate git deployment to the sever. | |
| # credit: https://www.digitalocean.com/community/tutorials/how-to-use-git-hooks-to-automate-development-and-deployment-tasks | |
| # Start by creating a bare git repository and set the path: | |
| # e.g: mkdir -p ~/repos/alhoqbani.com.git && cd ~/repos/alhoqbani.com.git && git init --bare | |
| REPO_PATH=$HOME/repos/alhoqbani.com.git | |
| # Set the path to the DcoumentRoot for the web application. e.g /var/www/html/alhoqbani.com | |
| WORK_DIR_PATH=$HOME/alhoqbani.com |
| #!/usr/bin/env bash | |
| # Script to automate aws ebs volums backups | |
| # It backups all ebs volumes in the defult region | |
| # and deltes all snapshots that older than provided age | |
| # source: https://linuxacademy.com/cp/nuggets/view/id/78 | |
| ACTION=$1 # backup or delete | |
| AGE=$2 # age of backups to delete in days |
| #!/bin/bash | |
| # Author: Hamoud Alhoqbani | |
| # Backup mysql database every day at 00:00 | |
| # crontab -e | |
| # 0 0 * * * /bin/bash /home/user/db_backup/db_backup.sh /home/user/db_backup/cron.log 2>&1 | |
| # Update these variables to your linking. | |
| CURRENT_TIME=$(date +"%Y-%m-%d %I:%M:%S") | |
| DB_USER= | |
| DB_PASS= |
Create a folder for the repo.
mkdir ~/Desktop/repo && cd ~/Desktop/repoClone the remote repo as a bare repository to .git directory insdie the repo directory.
git clone --bare git@github.com:user/repo.git .git # <-- notice the extra .gitBy default when Nginx starts receiving a response from a FastCGI backend (such as PHP-FPM) it will buffer the response in memory before delivering it to the client. Any response larger than the set buffer size is saved to a temporary file on disk.
This process is outlined at the Nginx ngx_http_fastcgi_module page manual page.
| #!/usr/bin/env bash | |
| # Script to generate self-signed certificate to use with Apache in localhost. | |
| # Author: Hamoud Alhoqbani | |
| # For details: https://gist.github.com/alhoqbani/4635bdf31cb96d68193341e00556d846 | |
| [ $# -eq 0 ] && { echo "Usage: $0 domain"; exit 1; } | |
| function print_info() { | |
| printf "\033[0;32m$@\033[0m\n" | |
| } |
An sql query was run to collect data from the database. The query was designed to join temps data from Riyadh city (My choice) and the global temps.
SELECT g.year, c.avg_temp AS riyadh_avg_temp, g.avg_temp AS global_avg_temp
FROM global_data g| { | |
| "version": "1.0", | |
| "override": true, | |
| "fontCss": "@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;700&display=swap');", | |
| "customFonts": [ | |
| { | |
| "fontFamily": "Tajawal", | |
| "fontUrl": "https://fonts.googleapis.com/css2?family=Tajawal:wght@400;700&display=swap" | |
| } | |
| ], |