Skip to content

Instantly share code, notes, and snippets.

@sabman
Last active July 26, 2023 22:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sabman/3223592abc490ffb44ca5cbf41a6292e to your computer and use it in GitHub Desktop.
Save sabman/3223592abc490ffb44ca5cbf41a6292e to your computer and use it in GitHub Desktop.
sudo yum install git
sudo service docker start
sudo gpasswd -a $USER docker
newgrp docker
echo "installing docker-compose..."
# NOTE: to get the latest version (thanks @spodnet):
sudo curl -L https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
# Fix permissions after download:
sudo chmod +x /usr/local/bin/docker-compose
# Verify success:
docker-compose version
git config --global user.name "Shoaib Burq"
git config --global user.email "saburq@gmail.com"
git clone https://github.com/magicmonty/bash-git-prompt.git ~/.bash-git-prompt --depth=1
cat << EOF >> ~/.bashrc
if [ -f "$HOME/.bash-git-prompt/gitprompt.sh" ]; then
GIT_PROMPT_ONLY_IN_REPO=1
source $HOME/.bash-git-prompt/gitprompt.sh
fi
EOF
# add docker compose aliases
# get the url
url="https://gist.githubusercontent.com/sabman/2ee092cc75efb7472c69f7dc2c01b388/raw/1e4d97703f6ab6614d6eb545796f27a330a454b7/aliases.docker-compose.sh"
# get the response
response=$(curl -s $url)
# append to ~/.bashrc
echo "$response" >> ~/.bashrc
# install https://github.com/rupa/z.git into bash
# get the url
url="https://raw.githubusercontent.com/rupa/z/master/z.sh"
# download the file
curl -s $url > ~/.z.sh
# append to ~/.bashrc
echo "source ~/.z.sh" >> ~/.bashrc
# bind up down arrow to search history
cat >> ~/.inputrc <<'EOF'
"\e[A": history-search-backward
"\e[B": history-search-forward
EOF
aliases_url=https://gist.githubusercontent.com/sabman/c239b74ed95a34b5e251e9f611203478/raw/0c31ede66a7d680bde4d3fbfb6b17dafe175c9ff/git-aliases.sh
# download and source this file in my ~/.bashrc
curl -s $aliases_url > ~/.git-aliases.sh
echo "source ~/.git-aliases.sh" >> ~/.bashrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment