enable pre-commit
This commit is contained in:
parent
c2259c5783
commit
1732ed5cd2
45
.pre-commit-config.yaml
Normal file
45
.pre-commit-config.yaml
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
# See https://pre-commit.com for more information
|
||||||
|
# See https://pre-commit.com/hooks.html for more hooks
|
||||||
|
repos:
|
||||||
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
|
rev: v2.4.0
|
||||||
|
hooks:
|
||||||
|
- id: trailing-whitespace
|
||||||
|
- id: end-of-file-fixer
|
||||||
|
- id: check-yaml
|
||||||
|
- id: check-added-large-files
|
||||||
|
- id: check-merge-conflict
|
||||||
|
- id: pretty-format-json
|
||||||
|
- id: check-symlinks
|
||||||
|
- id: detect-aws-credentials
|
||||||
|
- id: detect-private-key
|
||||||
|
- id: flake8
|
||||||
|
- id: requirements-txt-fixer
|
||||||
|
- id: sort-simple-yaml
|
||||||
|
- repo: git://github.com/antonbabenko/pre-commit-terraform
|
||||||
|
rev: v1.25.0 # Get the latest from: https://github.com/antonbabenko/pre-commit-terraform/releases
|
||||||
|
hooks:
|
||||||
|
- id: terraform_fmt
|
||||||
|
- id: terraform_docs
|
||||||
|
- id: terraform_tflint
|
||||||
|
args: ['--deep']
|
||||||
|
- id: terraform_validate
|
||||||
|
- repo: https://github.com/jumanjihouse/pre-commit-hooks
|
||||||
|
sha: 1.11.2
|
||||||
|
hooks:
|
||||||
|
- id: shellcheck
|
||||||
|
- id: shfmt
|
||||||
|
- id: script-must-have-extension
|
||||||
|
- id: git-check
|
||||||
|
# - id: git-dirty
|
||||||
|
- id: forbid-binary
|
||||||
|
- id: bundler-audit
|
||||||
|
#- repo: https://github.com/ansible/ansible-lint.git
|
||||||
|
# rev: v4.1.0
|
||||||
|
# hooks:
|
||||||
|
# - id: ansible-lint
|
||||||
|
# files: \.(yaml|yml)$
|
||||||
|
#- repo: https://github.com/pre-commit/mirrors-autopep8
|
||||||
|
# rev: 'v1.5' # Use the sha / tag you want to point at
|
||||||
|
# hooks:
|
||||||
|
# - id: autopep8
|
3
Brewfile
3
Brewfile
@ -158,3 +158,6 @@ brew "coreutils"
|
|||||||
brew "gh" # GitHub CLI
|
brew "gh" # GitHub CLI
|
||||||
brew "bash" # time to upgrade bash
|
brew "bash" # time to upgrade bash
|
||||||
brew "popeye" # Kubernetes resources sanity analysis
|
brew "popeye" # Kubernetes resources sanity analysis
|
||||||
|
brew "pre-commit" # https://pre-commit.com/#install
|
||||||
|
brew "terraform-docs" # https://github.com/segmentio/terraform-docs
|
||||||
|
brew "shfmt" # format shell
|
||||||
|
53
centos.sh
53
centos.sh
@ -45,14 +45,14 @@ rm -rf fonts
|
|||||||
|
|
||||||
# Install ZSH
|
# Install ZSH
|
||||||
sudo yum -y install zsh
|
sudo yum -y install zsh
|
||||||
curl https://raw.githubusercontent.com/git-ftp/git-ftp/master/git-ftp > /bin/git-ftp
|
curl https://raw.githubusercontent.com/git-ftp/git-ftp/master/git-ftp >/bin/git-ftp
|
||||||
# Install git-ftp
|
# Install git-ftp
|
||||||
chmod 755 /bin/git-ftp
|
chmod 755 /bin/git-ftp
|
||||||
|
|
||||||
# Install Golang
|
# Install Golang
|
||||||
yum install golang golang-godoc golang-vet golang-src golang-pkg-linux-amd64 -y
|
yum install golang golang-godoc golang-vet golang-src golang-pkg-linux-amd64 -y
|
||||||
echo "export GOPATH=\"$HOME/go\"" >> ~/.zshrc
|
echo "export GOPATH=\"$HOME/go\"" >>~/.zshrc
|
||||||
echo "export PATH=\"$GOPATH/bin:$PATH\"" >> ~/.zshrc
|
echo "export PATH=\"$GOPATH/bin:$PATH\"" >>~/.zshrc
|
||||||
. ~/.zshrc
|
. ~/.zshrc
|
||||||
|
|
||||||
# Install Hugo
|
# Install Hugo
|
||||||
@ -74,21 +74,21 @@ source "/root/.sdkman/bin/sdkman-init.sh"
|
|||||||
|
|
||||||
# Install Plantuml
|
# Install Plantuml
|
||||||
sdk install java
|
sdk install java
|
||||||
curl -L http://sourceforge.net/projects/plantuml/files/plantuml.jar/download -o /usr/local/bin/plantuml.jar && \
|
curl -L http://sourceforge.net/projects/plantuml/files/plantuml.jar/download -o /usr/local/bin/plantuml.jar &&
|
||||||
echo 'java -jar /usr/local/bin/plantuml.jar $@' > /usr/local/bin/plantuml && \
|
echo 'java -jar /usr/local/bin/plantuml.jar $@' >/usr/local/bin/plantuml &&
|
||||||
chmod +x /usr/local/bin/plantuml
|
chmod +x /usr/local/bin/plantuml
|
||||||
|
|
||||||
# Using pyenv to be able to install specific python versions https://stackoverflow.com/questions/49794432/how-to-setup-a-pipenv-python-3-6-project-if-os-python-version-is-3-5
|
# Using pyenv to be able to install specific python versions https://stackoverflow.com/questions/49794432/how-to-setup-a-pipenv-python-3-6-project-if-os-python-version-is-3-5
|
||||||
curl https://pyenv.run | bash
|
curl https://pyenv.run | bash
|
||||||
echo "export PYENV_ROOT=\"$HOME/.pyenv\"" >> ~/.zshrc
|
echo "export PYENV_ROOT=\"$HOME/.pyenv\"" >>~/.zshrc
|
||||||
echo "export PATH=\"$PYENV_ROOT/bin:$PATH\"" >> ~/.zshrc
|
echo "export PATH=\"$PYENV_ROOT/bin:$PATH\"" >>~/.zshrc
|
||||||
echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init -)"\nfi' >> ~/.zshrc
|
echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init -)"\nfi' >>~/.zshrc
|
||||||
source ~/.zshrc
|
source ~/.zshrc
|
||||||
yum -y install git gcc zlib-devel bzip2-devel readline-devel sqlite-devel openssl-devel
|
yum -y install git gcc zlib-devel bzip2-devel readline-devel sqlite-devel openssl-devel
|
||||||
# Install Python 3
|
# Install Python 3
|
||||||
pyenv install 3.7.3
|
pyenv install 3.7.3
|
||||||
pyenv global 3.7.3
|
pyenv global 3.7.3
|
||||||
ln -snf /root/.pyenv/versions/3.7.3/bin/python /usr/bin/python3.7
|
ln -snf /root/.pyenv/versions/3.7.3/bin/python /usr/bin/python3.7
|
||||||
|
|
||||||
# ripgrep
|
# ripgrep
|
||||||
sudo yum-config-manager --add-repo=https://copr.fedorainfracloud.org/coprs/carlwgeorge/ripgrep/repo/epel-7/carlwgeorge-ripgrep-epel-7.repo
|
sudo yum-config-manager --add-repo=https://copr.fedorainfracloud.org/coprs/carlwgeorge/ripgrep/repo/epel-7/carlwgeorge-ripgrep-epel-7.repo
|
||||||
@ -122,13 +122,13 @@ yum -y install ansible
|
|||||||
yum -y install cargo
|
yum -y install cargo
|
||||||
# Next gen ls command https://github.com/Peltoche/lsd
|
# Next gen ls command https://github.com/Peltoche/lsd
|
||||||
cargo install lsd
|
cargo install lsd
|
||||||
echo 'export PATH="/root/.cargo/bin:$PATH"' >> ~/.zshrc
|
echo 'export PATH="/root/.cargo/bin:$PATH"' >>~/.zshrc
|
||||||
source ~/.zshrc
|
source ~/.zshrc
|
||||||
|
|
||||||
# Prepare swipl install
|
# Prepare swipl install
|
||||||
yum -y install epel-release
|
yum -y install epel-release
|
||||||
yum groupinstall -y "Development Tools"
|
yum groupinstall -y "Development Tools"
|
||||||
yum -y install ninja-build libunwind freetype-devel gmp-devel java-1.8.0-openjdk-devel jpackage-utils libICE-devel libjpeg-turbo-devel libSM-devel libX11-devel libXaw-devel libXext-devel libXft-devel libXinerama-devel libXmu-devel libXpm-devel libXrender-devel libXt-devel ncurses-devel openssl-devel pkgconfig readline-devel libedit-devel unixODBC-devel zlib-devel uuid-devel libarchive-devel libyaml-devel
|
yum -y install ninja-build libunwind freetype-devel gmp-devel java-1.8.0-openjdk-devel jpackage-utils libICE-devel libjpeg-turbo-devel libSM-devel libX11-devel libXaw-devel libXext-devel libXft-devel libXinerama-devel libXmu-devel libXpm-devel libXrender-devel libXt-devel ncurses-devel openssl-devel pkgconfig readline-devel libedit-devel unixODBC-devel zlib-devel uuid-devel libarchive-devel libyaml-devel
|
||||||
|
|
||||||
## Prepare cmake3 install
|
## Prepare cmake3 install
|
||||||
#pyenv install 3.6.0
|
#pyenv install 3.6.0
|
||||||
@ -166,22 +166,22 @@ cd "$HOME"
|
|||||||
sudo curl -o /usr/local/bin/googler https://raw.githubusercontent.com/jarun/googler/v3.9/googler && sudo chmod +x /usr/local/bin/googler
|
sudo curl -o /usr/local/bin/googler https://raw.githubusercontent.com/jarun/googler/v3.9/googler && sudo chmod +x /usr/local/bin/googler
|
||||||
|
|
||||||
# Install BAT (cat with more power)
|
# Install BAT (cat with more power)
|
||||||
wget https://github.com/sharkdp/bat/releases/download/v0.11.0/bat-v0.11.0-x86_64-unknown-linux-musl.tar.gz \
|
wget https://github.com/sharkdp/bat/releases/download/v0.11.0/bat-v0.11.0-x86_64-unknown-linux-musl.tar.gz &&
|
||||||
&& tar -xzvf bat-v0.11.0-x86_64-unknown-linux-musl.tar.gz \
|
tar -xzvf bat-v0.11.0-x86_64-unknown-linux-musl.tar.gz &&
|
||||||
&& mv bat-v0.11.0-x86_64-unknown-linux-musl/bat /usr/local/bin/ \
|
mv bat-v0.11.0-x86_64-unknown-linux-musl/bat /usr/local/bin/ &&
|
||||||
&& rm -rf bat-v0.11.0-x86_64-unknown-linux-musl*
|
rm -rf bat-v0.11.0-x86_64-unknown-linux-musl*
|
||||||
|
|
||||||
# Install fselect
|
# Install fselect
|
||||||
cargo install fselect
|
cargo install fselect
|
||||||
|
|
||||||
# surfraw
|
# surfraw
|
||||||
git clone --depth 1 https://gitlab.com/surfraw/Surfraw.git \
|
git clone --depth 1 https://gitlab.com/surfraw/Surfraw.git &&
|
||||||
&& cd Surfraw \
|
cd Surfraw &&
|
||||||
&& ./prebuild \
|
./prebuild &&
|
||||||
&& ./configure \
|
./configure &&
|
||||||
&& make && make install \
|
make && make install &&
|
||||||
&& cd .. \
|
cd .. &&
|
||||||
&& rm -rf Surfraw
|
rm -rf Surfraw
|
||||||
|
|
||||||
# Dictionary
|
# Dictionary
|
||||||
yum -y install dictd
|
yum -y install dictd
|
||||||
@ -196,13 +196,13 @@ yes | ~/.fzf/install
|
|||||||
#exec "$SHELL"
|
#exec "$SHELL"
|
||||||
|
|
||||||
# Install diff-so-fancy
|
# Install diff-so-fancy
|
||||||
curl https://raw.githubusercontent.com/so-fancy/diff-so-fancy/master/third_party/build_fatpack/diff-so-fancy > /usr/local/bin/diff-so-fancy && chmod +x /usr/local/bin/diff-so-fancy
|
curl https://raw.githubusercontent.com/so-fancy/diff-so-fancy/master/third_party/build_fatpack/diff-so-fancy >/usr/local/bin/diff-so-fancy && chmod +x /usr/local/bin/diff-so-fancy
|
||||||
|
|
||||||
# Install nice disk usage
|
# Install nice disk usage
|
||||||
yum -y install ncdu
|
yum -y install ncdu
|
||||||
|
|
||||||
# Install tldr alternative to help
|
# Install tldr alternative to help
|
||||||
curl https://raw.githubusercontent.com/raylee/tldr/master/tldr > /usr/local/bin/tldr && chmod +x /usr/local/bin/tldr
|
curl https://raw.githubusercontent.com/raylee/tldr/master/tldr >/usr/local/bin/tldr && chmod +x /usr/local/bin/tldr
|
||||||
|
|
||||||
# Add pandoc
|
# Add pandoc
|
||||||
yum -y install pandoc
|
yum -y install pandoc
|
||||||
@ -220,7 +220,7 @@ yum -y install neofetch
|
|||||||
|
|
||||||
cargo install nu
|
cargo install nu
|
||||||
|
|
||||||
cat <<EOF > /etc/yum.repos.d/kubernetes.repo
|
cat <<EOF >/etc/yum.repos.d/kubernetes.repo
|
||||||
[kubernetes]
|
[kubernetes]
|
||||||
name=Kubernetes
|
name=Kubernetes
|
||||||
baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64
|
baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64
|
||||||
@ -232,7 +232,6 @@ EOF
|
|||||||
|
|
||||||
yum install -y kubectl
|
yum install -y kubectl
|
||||||
|
|
||||||
|
|
||||||
# Install the harbottle-main repo
|
# Install the harbottle-main repo
|
||||||
sudo yum -y install https://harbottle.gitlab.io/harbottle-main/7/x86_64/harbottle-main-release.rpm
|
sudo yum -y install https://harbottle.gitlab.io/harbottle-main/7/x86_64/harbottle-main-release.rpm
|
||||||
yum -y install kubectx
|
yum -y install kubectx
|
||||||
|
45
dot_git-template/.pre-commit-config.yaml
Normal file
45
dot_git-template/.pre-commit-config.yaml
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
# See https://pre-commit.com for more information
|
||||||
|
# See https://pre-commit.com/hooks.html for more hooks
|
||||||
|
repos:
|
||||||
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
|
rev: v2.4.0
|
||||||
|
hooks:
|
||||||
|
- id: trailing-whitespace
|
||||||
|
- id: end-of-file-fixer
|
||||||
|
- id: check-yaml
|
||||||
|
- id: check-added-large-files
|
||||||
|
- id: check-merge-conflict
|
||||||
|
- id: pretty-format-json
|
||||||
|
- id: check-symlinks
|
||||||
|
- id: detect-aws-credentials
|
||||||
|
- id: detect-private-key
|
||||||
|
- id: flake8
|
||||||
|
- id: requirements-txt-fixer
|
||||||
|
- id: sort-simple-yaml
|
||||||
|
- repo: git://github.com/antonbabenko/pre-commit-terraform
|
||||||
|
rev: v1.25.0 # Get the latest from: https://github.com/antonbabenko/pre-commit-terraform/releases
|
||||||
|
hooks:
|
||||||
|
- id: terraform_fmt
|
||||||
|
- id: terraform_docs
|
||||||
|
- id: terraform_tflint
|
||||||
|
args: ['--deep']
|
||||||
|
- id: terraform_validate
|
||||||
|
- repo: https://github.com/jumanjihouse/pre-commit-hooks
|
||||||
|
sha: 1.11.2
|
||||||
|
hooks:
|
||||||
|
- id: shellcheck
|
||||||
|
- id: shfmt
|
||||||
|
- id: script-must-have-extension
|
||||||
|
- id: git-check
|
||||||
|
# - id: git-dirty
|
||||||
|
- id: forbid-binary
|
||||||
|
- id: bundler-audit
|
||||||
|
#- repo: https://github.com/ansible/ansible-lint.git
|
||||||
|
# rev: v4.1.0
|
||||||
|
# hooks:
|
||||||
|
# - id: ansible-lint
|
||||||
|
# files: \.(yaml|yml)$
|
||||||
|
#- repo: https://github.com/pre-commit/mirrors-autopep8
|
||||||
|
# rev: 'v1.5' # Use the sha / tag you want to point at
|
||||||
|
# hooks:
|
||||||
|
# - id: autopep8
|
44
dot_git-template/hooks/pre-commit
Executable file
44
dot_git-template/hooks/pre-commit
Executable file
@ -0,0 +1,44 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
# File generated by pre-commit: https://pre-commit.com
|
||||||
|
# ID: 138fd403232d2ddd5efb44317e38bf03
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
|
# we try our best, but the shebang of this script is difficult to determine:
|
||||||
|
# - macos doesn't ship with python3
|
||||||
|
# - windows executables are almost always `python.exe`
|
||||||
|
# therefore we continue to support python2 for this small script
|
||||||
|
if sys.version_info < (3, 3):
|
||||||
|
from distutils.spawn import find_executable as which
|
||||||
|
else:
|
||||||
|
from shutil import which
|
||||||
|
|
||||||
|
# work around https://github.com/Homebrew/homebrew-core/issues/30445
|
||||||
|
os.environ.pop('__PYVENV_LAUNCHER__', None)
|
||||||
|
|
||||||
|
# start templated
|
||||||
|
INSTALL_PYTHON = '/usr/local/Cellar/pre-commit/2.0.1/libexec/bin/python3.8'
|
||||||
|
ARGS = ['hook-impl', '--config=.pre-commit-config.yaml', '--hook-type=pre-commit', '--skip-on-missing-config']
|
||||||
|
# end templated
|
||||||
|
ARGS.extend(('--hook-dir', os.path.realpath(os.path.dirname(__file__))))
|
||||||
|
ARGS.append('--')
|
||||||
|
ARGS.extend(sys.argv[1:])
|
||||||
|
|
||||||
|
DNE = '`pre-commit` not found. Did you forget to activate your virtualenv?'
|
||||||
|
if os.access(INSTALL_PYTHON, os.X_OK):
|
||||||
|
CMD = [INSTALL_PYTHON, '-mpre_commit']
|
||||||
|
elif which('pre-commit'):
|
||||||
|
CMD = ['pre-commit']
|
||||||
|
else:
|
||||||
|
raise SystemExit(DNE)
|
||||||
|
|
||||||
|
CMD.extend(ARGS)
|
||||||
|
if sys.platform == 'win32': # https://bugs.python.org/issue19124
|
||||||
|
import subprocess
|
||||||
|
|
||||||
|
if sys.version_info < (3, 7): # https://bugs.python.org/issue25942
|
||||||
|
raise SystemExit(subprocess.Popen(CMD).wait())
|
||||||
|
else:
|
||||||
|
raise SystemExit(subprocess.call(CMD))
|
||||||
|
else:
|
||||||
|
os.execvp(CMD[0], CMD)
|
@ -31,4 +31,4 @@
|
|||||||
[diff]
|
[diff]
|
||||||
noprefix = true
|
noprefix = true
|
||||||
[init]
|
[init]
|
||||||
templatedir = ~/.git-templates
|
templateDir = /Users/morganwattiez/.git-template
|
||||||
|
10
dot_profile
Normal file
10
dot_profile
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
|
||||||
|
# Add RVM to PATH for scripting. Make sure this is the last PATH variable change.
|
||||||
|
export PATH="$PATH:$HOME/.rvm/bin"
|
||||||
|
|
||||||
|
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
|
||||||
|
|
||||||
|
|
||||||
|
export JETBRAINS_LICENSE_SERVER=https://licenseserver.collibra.com
|
||||||
|
|
||||||
|
export PATH="$HOME/.cargo/bin:$PATH"
|
@ -10,27 +10,28 @@ chmod +x ~/.scripts/*.sh
|
|||||||
|
|
||||||
# Install missing package (Linux)
|
# Install missing package (Linux)
|
||||||
case "$(uname -s)" in
|
case "$(uname -s)" in
|
||||||
Linux)
|
Linux)
|
||||||
echo "(Linux) Installing Development Tools"
|
echo "(Linux) Installing Development Tools"
|
||||||
yum install sudo -y
|
yum install sudo -y
|
||||||
sudo yum groupinstall 'Development Tools' -y
|
sudo yum groupinstall 'Development Tools' -y
|
||||||
sudo yum install git which zip unzip ruby curl file docker gcc make libxcrypt-compat vim-enhanced -y
|
sudo yum install git which zip unzip ruby curl file docker gcc make libxcrypt-compat vim-enhanced -y
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Install HomeBrew
|
# Install HomeBrew
|
||||||
case "$(uname -s)" in
|
case "$(uname -s)" in
|
||||||
Darwin)
|
Darwin)
|
||||||
echo "(Mac OS X) installing homebrew"
|
echo "(Mac OS X) installing homebrew"
|
||||||
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
|
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
|
||||||
# Prevent `Error: Your Homebrew is outdated. Please run `brew update`.`
|
# Prevent `Error: Your Homebrew is outdated. Please run `brew update`.`
|
||||||
echo "Updating Homebrew"
|
echo "Updating Homebrew"
|
||||||
brew update
|
brew update
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Create symbolic links
|
# Create symbolic links
|
||||||
echo "Creating symbolic links"
|
echo "Creating symbolic links"
|
||||||
|
ln -snf ~/Code/dotfiles/dot_profile ~/.profile
|
||||||
ln -snf ~/.local/share/chezmoi/ ~/dotfiles
|
ln -snf ~/.local/share/chezmoi/ ~/dotfiles
|
||||||
ln -snf ~/Code/dotfiles/Gemfile ~/Gemfile
|
ln -snf ~/Code/dotfiles/Gemfile ~/Gemfile
|
||||||
ln -snf ~/Code/dotfiles/README.md ~/README.md
|
ln -snf ~/Code/dotfiles/README.md ~/README.md
|
||||||
@ -49,40 +50,41 @@ ln -snf ~/Code/dotfiles/dot_surfraw.conf ~/.surfraw.conf
|
|||||||
ln -snf ~/Code/dotfiles/private_dot_3llo/config.sh ~/.3llo_config
|
ln -snf ~/Code/dotfiles/private_dot_3llo/config.sh ~/.3llo_config
|
||||||
ln -snf ~/Code/dotfiles/dot_ansiweatherrc ~/.ansiweatherrc
|
ln -snf ~/Code/dotfiles/dot_ansiweatherrc ~/.ansiweatherrc
|
||||||
ln -snf ~/Code/dotfiles/dot_p10k_dot_zsh ~/.p10k.zsh
|
ln -snf ~/Code/dotfiles/dot_p10k_dot_zsh ~/.p10k.zsh
|
||||||
|
ln -snf ~/Code/dotfiles/dot_git-template ~/.git-template
|
||||||
|
|
||||||
# Other symblinks + Install Docker Desktop for Mac
|
# Other symblinks + Install Docker Desktop for Mac
|
||||||
case "$(uname -s)" in
|
case "$(uname -s)" in
|
||||||
Darwin)
|
Darwin)
|
||||||
echo "(Mac OS X) Adding symbolic links"
|
echo "(Mac OS X) Adding symbolic links"
|
||||||
ln -snf "$HOME/.config/Code/User/settings.json" "$HOME/Library/Application Support/Code/User/settings.json"
|
ln -snf "$HOME/.config/Code/User/settings.json" "$HOME/Library/Application Support/Code/User/settings.json"
|
||||||
ln -snf "$HOME/Library/Mobile Documents/com~apple~CloudDocs/Mackup/Library/Application Support/Code/User/snippets" "$HOME/Library/Application Support/Code/User/snippets"
|
ln -snf "$HOME/Library/Mobile Documents/com~apple~CloudDocs/Mackup/Library/Application Support/Code/User/snippets" "$HOME/Library/Application Support/Code/User/snippets"
|
||||||
ln -snf "$HOME/Library/Mobile Documents/com~apple~CloudDocs/Mackup/.mackup.cfg" "$HOME/.mackup.cfg"
|
ln -snf "$HOME/Library/Mobile Documents/com~apple~CloudDocs/Mackup/.mackup.cfg" "$HOME/.mackup.cfg"
|
||||||
echo "(Mac OS X) Installing Docker"
|
echo "(Mac OS X) Installing Docker"
|
||||||
~/.scripts/install_docker_for_mac.sh
|
~/.scripts/install_docker_for_mac.sh
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Install dependencies (apps, fonts, ...) with Brew
|
# Install dependencies (apps, fonts, ...) with Brew
|
||||||
case "$(uname -s)" in
|
case "$(uname -s)" in
|
||||||
Darwin)
|
Darwin)
|
||||||
echo "(Mac OS X) Brew installing stuff (apps, fonts, ...)"
|
echo "(Mac OS X) Brew installing stuff (apps, fonts, ...)"
|
||||||
ln -snf ~/Code/dotfiles/Brewfile ~/Brewfile
|
ln -snf ~/Code/dotfiles/Brewfile ~/Brewfile
|
||||||
brew bundle
|
brew bundle
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Install dependencies (apps, fonts, ...) for CentOS
|
# Install dependencies (apps, fonts, ...) for CentOS
|
||||||
case "$(uname -s)" in
|
case "$(uname -s)" in
|
||||||
Linux)
|
Linux)
|
||||||
echo "(CentOS) Installing stuff (apps, ...)"
|
echo "(CentOS) Installing stuff (apps, ...)"
|
||||||
chmod +x ~/Code/dotfiles/centos.sh
|
chmod +x ~/Code/dotfiles/centos.sh
|
||||||
~/Code/dotfiles/centos.sh
|
~/Code/dotfiles/centos.sh
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Switch to ZSH
|
# Switch to ZSH
|
||||||
echo "switching to ZSH"
|
echo "switching to ZSH"
|
||||||
command -v zsh >> /etc/shells
|
command -v zsh >>/etc/shells
|
||||||
chsh -s "$(command -v zsh)"
|
chsh -s "$(command -v zsh)"
|
||||||
|
|
||||||
# Use SDKMan to install development tools
|
# Use SDKMan to install development tools
|
||||||
@ -98,16 +100,16 @@ echo "SDKMan updating"
|
|||||||
sdk selfupdate
|
sdk selfupdate
|
||||||
|
|
||||||
case "$(uname -s)" in
|
case "$(uname -s)" in
|
||||||
Linux)
|
Linux)
|
||||||
echo '(Linux) Installing ruby'
|
echo '(Linux) Installing ruby'
|
||||||
curl -sSL https://rvm.io/mpapis.asc | gpg2 --import -
|
curl -sSL https://rvm.io/mpapis.asc | gpg2 --import -
|
||||||
curl -sSL https://rvm.io/pkuczynski.asc | gpg2 --import -
|
curl -sSL https://rvm.io/pkuczynski.asc | gpg2 --import -
|
||||||
curl -L get.rvm.io | bash -s stable
|
curl -L get.rvm.io | bash -s stable
|
||||||
source /etc/profile.d/rvm.sh
|
source /etc/profile.d/rvm.sh
|
||||||
rvm reload
|
rvm reload
|
||||||
rvm requirements run
|
rvm requirements run
|
||||||
rvm install 2.3.7
|
rvm install 2.3.7
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Install bundler for managing ruby dependencies and Gemfile
|
# Install bundler for managing ruby dependencies and Gemfile
|
||||||
@ -127,7 +129,7 @@ ln -snf ~/Code/dotfiles/dot_zshrc.pre-oh-my-zsh ~/.zshrc.pre-oh-my-zsh
|
|||||||
|
|
||||||
echo "Installing Vundle + VIM Plugins"
|
echo "Installing Vundle + VIM Plugins"
|
||||||
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
|
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
|
||||||
vim +PluginInstall +qall > /dev/null
|
vim +PluginInstall +qall >/dev/null
|
||||||
#https://github.com/ycm-core/YouCompleteMe/blob/master/README.md#installation
|
#https://github.com/ycm-core/YouCompleteMe/blob/master/README.md#installation
|
||||||
cd "$HOME/.vim/bundle/YouCompleteMe" || exit
|
cd "$HOME/.vim/bundle/YouCompleteMe" || exit
|
||||||
./install.py --all
|
./install.py --all
|
||||||
@ -144,10 +146,10 @@ cd "$HOME" || exit
|
|||||||
|
|
||||||
# OSX Defaults
|
# OSX Defaults
|
||||||
case "$(uname -s)" in
|
case "$(uname -s)" in
|
||||||
Darwin)
|
Darwin)
|
||||||
echo "(Mac OS X) Loading preferences"
|
echo "(Mac OS X) Loading preferences"
|
||||||
sudo sh .macos
|
sudo sh .macos
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Customize /etc/hosts
|
# Customize /etc/hosts
|
||||||
@ -161,11 +163,11 @@ sudo pip install --upgrade pip
|
|||||||
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
|
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
|
||||||
sudo python3 get-pip.py
|
sudo python3 get-pip.py
|
||||||
case "$(uname -s)" in
|
case "$(uname -s)" in
|
||||||
Darwin)
|
Darwin)
|
||||||
echo "(Mac OS X) Updating PATH for loading pip user installed packages"
|
echo "(Mac OS X) Updating PATH for loading pip user installed packages"
|
||||||
ln -snf /usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/bin/pip pip3
|
ln -snf /usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/bin/pip pip3
|
||||||
export PATH="$PATH:/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/bin/:/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/bin:/usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/bin"
|
export PATH="$PATH:/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/bin/:/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/bin:/usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/bin"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
echo "Upgrading pip"
|
echo "Upgrading pip"
|
||||||
sudo pip install --upgrade pip
|
sudo pip install --upgrade pip
|
||||||
@ -178,19 +180,19 @@ pip install -r requirements.txt
|
|||||||
|
|
||||||
# Install baton (CLI to manage Spotify playback) https://github.com/joshuathompson/baton
|
# Install baton (CLI to manage Spotify playback) https://github.com/joshuathompson/baton
|
||||||
case "$(uname -s)" in
|
case "$(uname -s)" in
|
||||||
Darwin)
|
Darwin)
|
||||||
echo '(Mac OS X) Installing baton (spotify CLI)'
|
echo '(Mac OS X) Installing baton (spotify CLI)'
|
||||||
curl -sSL https://github.com/joshuathompson/baton/releases/download/0.1.7/baton-0.1.7-darwin-amd64 -o /usr/local/bin/baton && chmod +x /usr/local/bin/baton
|
curl -sSL https://github.com/joshuathompson/baton/releases/download/0.1.7/baton-0.1.7-darwin-amd64 -o /usr/local/bin/baton && chmod +x /usr/local/bin/baton
|
||||||
;;
|
;;
|
||||||
|
|
||||||
Linux)
|
Linux)
|
||||||
echo '(Linux) Installing baton (spotify CLI)'
|
echo '(Linux) Installing baton (spotify CLI)'
|
||||||
curl -sSL https://github.com/joshuathompson/baton/releases/download/0.1.7/baton-0.1.7-linux-amd64 -o /usr/local/bin/baton && chmod +x /usr/local/bin/baton
|
curl -sSL https://github.com/joshuathompson/baton/releases/download/0.1.7/baton-0.1.7-linux-amd64 -o /usr/local/bin/baton && chmod +x /usr/local/bin/baton
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo 'Non supported OS : Installation aborted for baton (spotify CLI)'
|
echo 'Non supported OS : Installation aborted for baton (spotify CLI)'
|
||||||
exit
|
exit
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Use rustup to install the Rust compiler (rustc) and the Rust package manager (cargo).
|
# Use rustup to install the Rust compiler (rustc) and the Rust package manager (cargo).
|
||||||
@ -205,6 +207,12 @@ git clone https://github.com/sherlock-project/sherlock.git ~/Code/sherlock
|
|||||||
cd sherlock || exit
|
cd sherlock || exit
|
||||||
python3 -m pip install -r requirements.txt
|
python3 -m pip install -r requirements.txt
|
||||||
|
|
||||||
|
git config --global init.templateDir ~/.git-template
|
||||||
|
pre-commit init-templatedir ~/.git-template
|
||||||
|
|
||||||
|
terraform-docs completion zsh >/usr/local/share/zsh/site-functions/_terraform-docs
|
||||||
|
autoload -U compinit && compinit
|
||||||
|
|
||||||
# Upgrade
|
# Upgrade
|
||||||
echo "Upgrading apps"
|
echo "Upgrading apps"
|
||||||
~/.scripts/upgrade.sh
|
~/.scripts/upgrade.sh
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
docker_app=$(find /Applications/ \
|
docker_app=$(find /Applications/ \
|
||||||
-name "Docker.app" -maxdepth 1 -mindepth 1 -type d)
|
-name "Docker.app" -maxdepth 1 -mindepth 1 -type d)
|
||||||
if [ -z "$docker_app" ]; then
|
if [ -z "$docker_app" ]; then
|
||||||
echo 'Install Docker Desktop for Mac OS X'
|
echo 'Install Docker Desktop for Mac OS X'
|
||||||
curl -o ~/Downloads/Docker.dmg -sL https://download.docker.com/mac/stable/Docker.dmg
|
curl -o ~/Downloads/Docker.dmg -sL https://download.docker.com/mac/stable/Docker.dmg
|
||||||
hdiutil verify ~/Downloads/Docker.dmg
|
hdiutil verify ~/Downloads/Docker.dmg
|
||||||
hdiutil attach ~/Downloads/Docker.dmg -nobrowse
|
hdiutil attach ~/Downloads/Docker.dmg -nobrowse
|
||||||
cp -R /Volumes/Docker/Docker.app /Applications/
|
cp -R /Volumes/Docker/Docker.app /Applications/
|
||||||
hdiutil detach /Volumes/Docker
|
hdiutil detach /Volumes/Docker
|
||||||
rm ~/Downloads/Docker.dmg
|
rm ~/Downloads/Docker.dmg
|
||||||
sudo /Applications/Docker.app/Contents/MacOS/Docker --quit-after-install --unattended
|
sudo /Applications/Docker.app/Contents/MacOS/Docker --quit-after-install --unattended
|
||||||
fi
|
fi
|
||||||
|
@ -7,17 +7,17 @@ sdk use java 8.0.222-zulu
|
|||||||
|
|
||||||
# Homebrew reloading stuff
|
# Homebrew reloading stuff
|
||||||
case "$(uname -s)" in
|
case "$(uname -s)" in
|
||||||
Darwin)
|
Darwin)
|
||||||
echo "(Mac OS X) Homebrew reloading stuff"
|
echo "(Mac OS X) Homebrew reloading stuff"
|
||||||
brew bundle
|
brew bundle
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# OSX Defaults
|
# OSX Defaults
|
||||||
case "$(uname -s)" in
|
case "$(uname -s)" in
|
||||||
Darwin)
|
Darwin)
|
||||||
sudo sh .macos
|
sudo sh .macos
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
pip freeze > /Users/morganwattiez/Code/dotfiles/requirements.txt
|
pip freeze >/Users/morganwattiez/Code/dotfiles/requirements.txt
|
||||||
bundle check
|
bundle check
|
||||||
|
@ -5,12 +5,12 @@ sdk selfupdate
|
|||||||
|
|
||||||
# Upgrading HomeBrew stuff
|
# Upgrading HomeBrew stuff
|
||||||
case "$(uname -s)" in
|
case "$(uname -s)" in
|
||||||
Darwin)
|
Darwin)
|
||||||
echo "(Mac OS X) Homebrew upgrading stuff"
|
echo "(Mac OS X) Homebrew upgrading stuff"
|
||||||
brew update
|
brew update
|
||||||
#brew upgrade
|
#brew upgrade
|
||||||
brew outdated | xargs brew upgrade
|
brew outdated | xargs brew upgrade
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
bundle update --all
|
bundle update --all
|
||||||
@ -19,8 +19,8 @@ bundle update --all
|
|||||||
zsh ~/.oh-my-zsh/tools/upgrade.sh
|
zsh ~/.oh-my-zsh/tools/upgrade.sh
|
||||||
sudo pip install --upgrade pip 2>/dev/null
|
sudo pip install --upgrade pip 2>/dev/null
|
||||||
sudo pip3 install --upgrade pip 2>/dev/null
|
sudo pip3 install --upgrade pip 2>/dev/null
|
||||||
pip list --outdated --format=freeze | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip install -U
|
pip list --outdated --format=freeze | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip install -U
|
||||||
pip freeze > ~/requirements.txt
|
pip freeze >~/requirements.txt
|
||||||
# Update VIM plugins installed via Vundle https://github.com/VundleVim/Vundle.vim
|
# Update VIM plugins installed via Vundle https://github.com/VundleVim/Vundle.vim
|
||||||
vim +PluginUpdate +qall > /dev/null
|
vim +PluginUpdate +qall >/dev/null
|
||||||
rustup-update
|
rustup-update
|
||||||
|
@ -31,3 +31,6 @@ aws-iam-authenticator version
|
|||||||
stern --version
|
stern --version
|
||||||
helm version
|
helm version
|
||||||
terragrunt --version
|
terragrunt --version
|
||||||
|
pre-commit --version
|
||||||
|
terraform-docs --version
|
||||||
|
tflint --version
|
||||||
|
@ -71,6 +71,7 @@ alias ipinfo='curl "ipinfo.io/"$(ip)'
|
|||||||
|
|
||||||
# Misc
|
# Misc
|
||||||
alias h='cd $HOME'
|
alias h='cd $HOME'
|
||||||
|
alias bash="/usr/local/bin/bash"
|
||||||
alias diff='colordiff'
|
alias diff='colordiff'
|
||||||
alias cp='cp -i' # confirmation before overwrite #
|
alias cp='cp -i' # confirmation before overwrite #
|
||||||
alias mv='mv -i' # confirmation before overwrite
|
alias mv='mv -i' # confirmation before overwrite
|
||||||
|
@ -226,3 +226,8 @@ function gcrb {
|
|||||||
}
|
}
|
||||||
function terraform-compliance { docker run --rm -v "$(pwd):/target" -i -t eerkunt/terraform-compliance "$@"; }
|
function terraform-compliance { docker run --rm -v "$(pwd):/target" -i -t eerkunt/terraform-compliance "$@"; }
|
||||||
function checkov { docker run -i --rm -v "$(pwd):/tf" bridgecrew/checkov -d /tf "$@" ; }
|
function checkov { docker run -i --rm -v "$(pwd):/tf" bridgecrew/checkov -d /tf "$@" ; }
|
||||||
|
function copyhooks {
|
||||||
|
cp -f ~/.git-template/.pre-commit-config.yaml ./
|
||||||
|
pre-commit install --install-hooks --overwrite
|
||||||
|
pre-commit run -a
|
||||||
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Needed for https://stackoverflow.com/questions/27566999/git-with-intellij-idea-could-not-read-from-remote-repository
|
# Needed for https://stackoverflow.com/questions/27566999/git-with-intellij-idea-could-not-read-from-remote-repository
|
||||||
Host *
|
Host *
|
||||||
AddKeysToAgent yes
|
AddKeysToAgent yes
|
||||||
UseKeychain yes
|
UseKeychain yes
|
||||||
|
@ -1 +1 @@
|
|||||||
/Users/morganwattiez/Library/Mobile Documents/com~apple~CloudDocs/Mackup/.mackup.cfg
|
/Users/morganwattiez/Library/Mobile Documents/com~apple~CloudDocs/Mackup/.mackup.cfg
|
||||||
|
Loading…
Reference in New Issue
Block a user