Skip to content

Instantly share code, notes, and snippets.

View ibraheem-ghazi's full-sized avatar

Ibraheem Ghazi Alnabriss ibraheem-ghazi

  • Palestine - Gaza
View GitHub Profile
@ibraheem-ghazi
ibraheem-ghazi / cd_setup.sh
Created August 15, 2024 10:31
Setup a Bare Git repo, for auto deployment code to Ubuntu server, a Bare repo created with a new username at /home/$USERNAME/git/$REPO_NAME, once you push to it, the code will be copied to the target_dir. Not Fully tested for common cases, but its working. If you used this script, read it, and modify it as needed.
#!/bin/bash
# If you keep getting permission denied or something do the following:
# - sudo nano /etc/ssh/sshd_config
# - Uncomment and ensure the following lines are present:
# PubkeyAuthentication yes
# AuthorizedKeysFile .ssh/authorized_keys
# - sudo systemctl restart ssh.service
# To Remove (reverse) the user/repo setup
@ibraheem-ghazi
ibraheem-ghazi / install-redis.sh
Created December 5, 2019 12:46
Bash script to install Redis on Ubuntu server protected with OpenSSL password
#!/bin/bash
clear
#color the output of echo
COLOR='\033[1;32m'
RED='\033[0;31m'
WHITE='\033[1;37m'
NC='\033[0m' # No Color