Skip to content

Instantly share code, notes, and snippets.

@fabienhinault
Last active March 13, 2018 12:55
Show Gist options
  • Save fabienhinault/3747bee2478ce5c27937534eb2a902d0 to your computer and use it in GitHub Desktop.
Save fabienhinault/3747bee2478ce5c27937534eb2a902d0 to your computer and use it in GitHub Desktop.
#!/bin/bash
cd ~
git clone https://github.com/magicmonty/bash-git-prompt.git .bash-git-prompt --depth=1
cat >> ~/.gitconfig << EOF
[user]
name = Fabien HINAULT
[alias]
lg1-specific = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(auto)%d%C(reset)'
lg2-specific = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(auto)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)'
lg3-specific = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset) %C(bold cyan)(committed: %cD)%C(reset) %C(auto)%d%C(reset)%n'' %C(white)%s%C(reset)%n'' %C(dim white)- %an <%ae> %C(reset) %C(dim white)(committer: %cn <%ce>)%C(reset)'
EOF
cat >> ~/.bashrc << EOF
########################
# FHI
HISTSIZE=
HISTFILESIZE=
alias gl='git lg1-specific'
alias gla='git lg1-specific --branches --tags --remotes'
alias sedi='sed -i~$(date --utc ''+%Y-%m-%d_%H_%M_%S'')'
GIT_PROMPT_ONLY_IN_REPO=1
GIT_PROMPT_THEME=Default_Ubuntu
source ~/.bash-git-prompt/gitprompt.sh
EOF
# install chrome
# https://askubuntu.com/questions/510056/how-to-install-google-chrome/510186
#1 Add Key:
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
#2 Set repository:
echo 'deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main' | sudo tee /etc/apt/sources.list.d/google-chrome.list
#3 Install package:
sudo apt-get update
sudo apt-get install google-chrome-stable
# install vscode
# https://code.visualstudio.com/docs/setup/linux
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg
sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list'
sudo apt-get update
sudo apt-get install code # or code-insiders
# install docker
# https://docs.docker.com/install/linux/docker-ce/ubuntu/#install-docker-ce
sudo apt-get update
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
sudo apt-get update
sudo apt-get install docker-ce
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment