add linters and refactor bootstraping scripts
- giant refactoring - add aliases and functions to ease work - apply linters / fixers / fmt to most files
This commit is contained in:
parent
e48c7e700a
commit
228982a0a8
21
.conform.yaml
Normal file
21
.conform.yaml
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
policies:
|
||||||
|
- type: commit
|
||||||
|
spec:
|
||||||
|
header:
|
||||||
|
length: 89
|
||||||
|
imperative: true
|
||||||
|
case: lower
|
||||||
|
invalidLastCharacters: .
|
||||||
|
body:
|
||||||
|
required: false
|
||||||
|
dco: true
|
||||||
|
gpg: false
|
||||||
|
spellcheck:
|
||||||
|
locale: US
|
||||||
|
maximumOfOneCommit: true
|
||||||
|
conventional:
|
||||||
|
types:
|
||||||
|
- "type"
|
||||||
|
scopes:
|
||||||
|
- "scope"
|
||||||
|
descriptionLength: 72
|
10
.pre-commit-search-and-replace.yaml
Normal file
10
.pre-commit-search-and-replace.yaml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
#- search: /Something [bB]ad/
|
||||||
|
# replacement: Something Good
|
||||||
|
#- search: foobar
|
||||||
|
# insensitive: true
|
||||||
|
# replacement: FOOBAR
|
||||||
|
- search: collibra
|
||||||
|
insensitive: true
|
||||||
|
- search: ~/Code
|
||||||
|
- search: TODO
|
||||||
|
- search: FIXME
|
4
.relint.yml
Normal file
4
.relint.yml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
- name: No FIXME
|
||||||
|
pattern: 'FIXME'
|
||||||
|
- name: No TODO
|
||||||
|
pattern: 'TODO'
|
34
README.md
34
README.md
@ -1,38 +1,56 @@
|
|||||||
## Prerequisites
|
## Prerequisites
|
||||||
|
|
||||||
### Centos
|
### Centos
|
||||||
|
|
||||||
`yum install git -y`
|
`yum install git -y`
|
||||||
|
|
||||||
## Setup
|
## Setup
|
||||||
|
|
||||||
```
|
```
|
||||||
git clone https://github.com/MorganGeek/dotfiles.git $HOME/Code/dotfiles
|
git clone https://github.com/MorganGeek/dotfiles.git $HOME/Code/dotfiles
|
||||||
$HOME/Code/dotfiles/dot_scripts/bootstrap.sh
|
$HOME/Code/dotfiles/dot_scripts/bootstrap.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
### Run
|
### Run
|
||||||
|
|
||||||
run `.scripts/bootstrap.sh`
|
run `.scripts/bootstrap.sh`
|
||||||
|
|
||||||
### Reload
|
### Reload
|
||||||
|
|
||||||
run `zsh .scripts/reload.sh`
|
run `zsh .scripts/reload.sh`
|
||||||
|
|
||||||
### Upgrade
|
### Upgrade
|
||||||
|
|
||||||
run `zsh .scripts/upgrade.sh`
|
run `zsh .scripts/upgrade.sh`
|
||||||
|
|
||||||
### Scope
|
### Scope
|
||||||
* Use SDKMan to install development tools
|
|
||||||
* Install Docker Desktop for Mac
|
- Use SDKMan to install development tools
|
||||||
* Install asciidoctor-pdf
|
- Install Docker Desktop for Mac
|
||||||
* Install Oh My Zsh and some cool dependencies
|
- Install asciidoctor-pdf
|
||||||
* OSX Defaults
|
- Install Oh My Zsh and some cool dependencies
|
||||||
* Install NPM dependencies
|
- OSX Defaults
|
||||||
* Install pip and pipenv
|
- Install NPM dependencies
|
||||||
* Install AWS-CLI
|
- Install pip and pipenv
|
||||||
|
- Install AWS-CLI
|
||||||
|
|
||||||
### If Yubico is installed, run this :
|
### If Yubico is installed, run this :
|
||||||
|
|
||||||
`sudo ansible-playbook ~/.scripts/ansible/macsecure_playbook.yaml`
|
`sudo ansible-playbook ~/.scripts/ansible/macsecure_playbook.yaml`
|
||||||
|
|
||||||
#### In cases of `\n` errors with zsh
|
#### In cases of `\n` errors with zsh
|
||||||
|
|
||||||
https://github.com/robbyrussell/oh-my-zsh/issues/6764#issuecomment-384045008
|
https://github.com/robbyrussell/oh-my-zsh/issues/6764#issuecomment-384045008
|
||||||
|
|
||||||
|
```
|
||||||
|
cd $ZSH
|
||||||
|
git config core.autocrlf false
|
||||||
|
git rm --cached -r .
|
||||||
|
git reset --hard
|
||||||
|
```
|
||||||
|
|
||||||
|
https://github.com/robbyrussell/oh-my-zsh/issues/6764#issuecomment-384045008
|
||||||
|
|
||||||
```
|
```
|
||||||
cd $ZSH
|
cd $ZSH
|
||||||
git config core.autocrlf false
|
git config core.autocrlf false
|
||||||
|
@ -68,12 +68,9 @@ yum -y install telnet ftp rsh traceroute
|
|||||||
# FTP UI
|
# FTP UI
|
||||||
yum -y install filezilla
|
yum -y install filezilla
|
||||||
|
|
||||||
# Install SDK Man
|
~/.scripts/sdkmandeps.sh
|
||||||
curl -s "https://get.sdkman.io" | bash
|
|
||||||
source "/root/.sdkman/bin/sdkman-init.sh"
|
|
||||||
|
|
||||||
# Install Plantuml
|
# Install Plantuml
|
||||||
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
|
||||||
|
@ -5,7 +5,6 @@ repos:
|
|||||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
rev: v3.1.0
|
rev: v3.1.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: check-yaml
|
|
||||||
- id: check-added-large-files
|
- id: check-added-large-files
|
||||||
- id: check-case-conflict
|
- id: check-case-conflict
|
||||||
- id: check-executables-have-shebangs
|
- id: check-executables-have-shebangs
|
||||||
@ -95,6 +94,13 @@ repos:
|
|||||||
- id: relint
|
- id: relint
|
||||||
|
|
||||||
- repo: git@github.com:Vimjas/vint.git
|
- repo: git@github.com:Vimjas/vint.git
|
||||||
rev: v0.4a1
|
rev: master
|
||||||
hooks:
|
hooks:
|
||||||
- id: vint
|
- id: vint
|
||||||
|
# install with `pre-commit install -t commit-msg`
|
||||||
|
- repo: https://github.com/talos-systems/conform
|
||||||
|
rev: master
|
||||||
|
hooks:
|
||||||
|
- id: conform
|
||||||
|
stages:
|
||||||
|
- commit-msg
|
||||||
|
@ -7,15 +7,15 @@
|
|||||||
tasks:
|
tasks:
|
||||||
- name: Check yubikey binaries are installed
|
- name: Check yubikey binaries are installed
|
||||||
stat:
|
stat:
|
||||||
path: "{{ item }}"
|
path: '{{ item }}'
|
||||||
with_items:
|
with_items:
|
||||||
- /usr/local/bin/ykpamcfg
|
- /usr/local/bin/ykpamcfg
|
||||||
- "/Applications/YubiKey\ Manager.app/Contents/MacOS/ykman"
|
- /Applications/YubiKey Manager.app/Contents/MacOS/ykman
|
||||||
|
|
||||||
- name: Check Yubico is recognized
|
- name: Check Yubico is recognized
|
||||||
shell: "'/Applications/YubiKey Manager.app/Contents/MacOS/ykman' list | awk '{print $6}'"
|
shell: "'/Applications/YubiKey Manager.app/Contents/MacOS/ykman' list | awk '{print $6}'"
|
||||||
register: yubicoChallenge
|
register: yubicoChallenge
|
||||||
failed_when: "yubicoChallenge.rc != 0 or yubicoChallenge.stdout == ''"
|
failed_when: yubicoChallenge.rc != 0 or yubicoChallenge.stdout == ''
|
||||||
|
|
||||||
- name: Get current user
|
- name: Get current user
|
||||||
become: false
|
become: false
|
||||||
@ -24,14 +24,14 @@
|
|||||||
|
|
||||||
- name: Check yubico challenge exists
|
- name: Check yubico challenge exists
|
||||||
stat:
|
stat:
|
||||||
path: "/Users/{{ username_on_host.stdout }}/.yubico/challenge-{{ yubicoChallenge.stdout }}"
|
path: /Users/{{ username_on_host.stdout }}/.yubico/challenge-{{ yubicoChallenge.stdout }}
|
||||||
|
|
||||||
- name: Ensure yubikey is needed for authentication at login screen
|
- name: Ensure yubikey is needed for authentication at login screen
|
||||||
lineinfile:
|
lineinfile:
|
||||||
path: "{{ item }}"
|
path: '{{ item }}'
|
||||||
regexp: '^auth.*pam_yubico.so.*'
|
regexp: ^auth.*pam_yubico.so.*
|
||||||
line: "auth required /usr/local/lib/security/pam_yubico.so mode=challenge-response"
|
line: auth required /usr/local/lib/security/pam_yubico.so mode=challenge-response
|
||||||
insertbefore: "^account required pam_opendirectory.so"
|
insertbefore: ^account required pam_opendirectory.so
|
||||||
state: absent
|
state: absent
|
||||||
with_items:
|
with_items:
|
||||||
- /etc/pam.d/screensaver
|
- /etc/pam.d/screensaver
|
||||||
|
@ -7,15 +7,15 @@
|
|||||||
tasks:
|
tasks:
|
||||||
- name: Check yubikey binaries are installed
|
- name: Check yubikey binaries are installed
|
||||||
stat:
|
stat:
|
||||||
path: "{{ item }}"
|
path: '{{ item }}'
|
||||||
with_items:
|
with_items:
|
||||||
- /usr/local/bin/ykpamcfg
|
- /usr/local/bin/ykpamcfg
|
||||||
- "/Applications/YubiKey\ Manager.app/Contents/MacOS/ykman"
|
- /Applications/YubiKey Manager.app/Contents/MacOS/ykman
|
||||||
|
|
||||||
- name: Check Yubico is recognized
|
- name: Check Yubico is recognized
|
||||||
shell: "'/Applications/YubiKey Manager.app/Contents/MacOS/ykman' list | awk '{print $6}'"
|
shell: "'/Applications/YubiKey Manager.app/Contents/MacOS/ykman' list | awk '{print $6}'"
|
||||||
register: yubicoChallenge
|
register: yubicoChallenge
|
||||||
failed_when: "yubicoChallenge.rc != 0 or yubicoChallenge.stdout == ''"
|
failed_when: yubicoChallenge.rc != 0 or yubicoChallenge.stdout == ''
|
||||||
|
|
||||||
- name: Get current user
|
- name: Get current user
|
||||||
become: false
|
become: false
|
||||||
@ -24,23 +24,23 @@
|
|||||||
|
|
||||||
- name: Check yubico challenge exists
|
- name: Check yubico challenge exists
|
||||||
stat:
|
stat:
|
||||||
path: "/Users/{{ username_on_host.stdout }}/.yubico/challenge-{{ yubicoChallenge.stdout }}"
|
path: /Users/{{ username_on_host.stdout }}/.yubico/challenge-{{ yubicoChallenge.stdout }}
|
||||||
|
|
||||||
- name: Ensure yubikey is needed for authentication at login screen
|
- name: Ensure yubikey is needed for authentication at login screen
|
||||||
lineinfile:
|
lineinfile:
|
||||||
path: "{{ item }}"
|
path: '{{ item }}'
|
||||||
regexp: '^auth.*pam_yubico.so.*'
|
regexp: ^auth.*pam_yubico.so.*
|
||||||
line: "auth required /usr/local/lib/security/pam_yubico.so mode=challenge-response"
|
line: auth required /usr/local/lib/security/pam_yubico.so mode=challenge-response
|
||||||
insertbefore: "^account required pam_opendirectory.so"
|
insertbefore: ^account required pam_opendirectory.so
|
||||||
with_items:
|
with_items:
|
||||||
- /etc/pam.d/screensaver
|
- /etc/pam.d/screensaver
|
||||||
- /etc/pam.d/authorization
|
- /etc/pam.d/authorization
|
||||||
|
|
||||||
- name: Ensure touch id is enough to authenticate with sudo
|
- name: Ensure touch id is enough to authenticate with sudo
|
||||||
lineinfile:
|
lineinfile:
|
||||||
path: "{{ item }}"
|
path: '{{ item }}'
|
||||||
regexp: '^auth.*sufficient.*pam_tid.so.*'
|
regexp: ^auth.*sufficient.*pam_tid.so.*
|
||||||
line: "auth sufficient pam_tid.so"
|
line: auth sufficient pam_tid.so
|
||||||
insertafter: "^#.*"
|
insertafter: ^#.*
|
||||||
with_items:
|
with_items:
|
||||||
- /etc/pam.d/sudo
|
- /etc/pam.d/sudo
|
||||||
|
@ -1,260 +1,51 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# Make sure Code directory exists
|
|
||||||
|
|
||||||
echo "Hello $(whoami)! Let's get you set up."
|
echo "Hello $(whoami)! Let's get you set up."
|
||||||
|
|
||||||
|
# Make sure Code directory exists
|
||||||
echo "mkdir -p $HOME/Code"
|
echo "mkdir -p $HOME/Code"
|
||||||
mkdir -p ~/Code
|
mkdir -p ~/Code
|
||||||
ln -snf ~/Code/dotfiles/dot_scripts ~/.scripts
|
ln -snf ~/Code/dotfiles/dot_scripts ~/.scripts
|
||||||
chmod +x ~/.scripts/*.sh
|
chmod +x ~/.scripts/*.sh
|
||||||
|
|
||||||
# Install missing package (Linux)
|
~/.scripts/install_linux_packages.sh
|
||||||
case "$(uname -s)" in
|
~/.scripts/install_homebrew.sh
|
||||||
Linux)
|
|
||||||
echo "(Linux) Installing Development Tools"
|
|
||||||
yum install sudo -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
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# Install HomeBrew
|
|
||||||
case "$(uname -s)" in
|
|
||||||
Darwin)
|
|
||||||
echo "(Mac OS X) installing homebrew"
|
|
||||||
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
|
|
||||||
# Prevent `Error: Your Homebrew is outdated. Please run `brew update`.`
|
|
||||||
echo "Updating Homebrew"
|
|
||||||
brew update
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# Path to ruby
|
# Path to ruby
|
||||||
export PATH="/usr/local/opt/ruby/bin:$PATH"
|
export PATH="/usr/local/opt/ruby/bin:$PATH"
|
||||||
|
|
||||||
# Create symbolic links
|
# Create symbolic links
|
||||||
echo "Creating symbolic links"
|
~/.scripts/symbolic_links.sh
|
||||||
ln -snf ~/Code/dotfiles/dot_profile ~/.profile
|
|
||||||
ln -snf ~/.local/share/chezmoi/ ~/dotfiles
|
|
||||||
ln -snf ~/Code/dotfiles/Gemfile ~/Gemfile
|
|
||||||
ln -snf ~/Code/dotfiles/README.md ~/README.md
|
|
||||||
ln -snf ~/Code/dotfiles/dot_bash_profile ~/.bash_profile
|
|
||||||
ln -snf ~/Code/dotfiles/dot_gitconfig ~/.gitconfig
|
|
||||||
ln -snf ~/Code/dotfiles/dot_macos ~/.macos
|
|
||||||
ln -snf ~/Code/dotfiles/dot_scripts ~/.scripts
|
|
||||||
ln -snf ~/Code/dotfiles/dot_scripts/checkci.sh /usr/local/bin/checkci
|
|
||||||
ln -snf ~/Code/dotfiles/dot_vimrc ~/.vimrc
|
|
||||||
# custom linters
|
|
||||||
ln -snf ~/Code/dotfiles/dot_vim/ale_linters ~/.vim/ale_linters
|
|
||||||
|
|
||||||
ln -snf ~/Code/dotfiles/dot_aliases ~/.aliases
|
# Install user applications
|
||||||
ln -snf ~/Code/dotfiles/dot_zsh_aliases ~/.zsh_aliases
|
~/.scripts/install_macpackages.sh
|
||||||
ln -snf ~/Code/dotfiles/dot_zsh_functions ~/.zsh_functions
|
~/.scripts/install_linux_user_apps.sh
|
||||||
ln -snf ~/Code/dotfiles/dot_zshrc ~/.zshrc
|
|
||||||
ln -snf ~/Code/dotfiles/dot_zshrc.pre-oh-my-zsh ~/.zshrc.pre-oh-my-zsh
|
|
||||||
ln -snf ~/Code/dotfiles/private_dot_ssh/config ~/.ssh/config
|
|
||||||
ln -snf ~/Code/dotfiles/requirements.txt ~/requirements.txt
|
|
||||||
ln -snf ~/Code/dotfiles/dot_surfraw.conf ~/.surfraw.conf
|
|
||||||
ln -snf ~/Code/dotfiles/private_dot_3llo/config.sh ~/.3llo_config
|
|
||||||
ln -snf ~/Code/dotfiles/dot_ansiweatherrc ~/.ansiweatherrc
|
|
||||||
ln -snf ~/Code/dotfiles/dot_p10k.zsh ~/.p10k.zsh
|
|
||||||
ln -snf ~/Code/dotfiles/dot_git-template ~/.git-template
|
|
||||||
ln -snf ~/Code/dotfiles/private_dot_newsboat ~/.newsboat
|
|
||||||
ln -snf ~/Code/dotfiles/private_dot_config/Code ~/.config/Code
|
|
||||||
ln -snf ~/Code/dotfiles/private_dot_config/neofetch ~/.config/neofetch
|
|
||||||
ln -snf ~/Code/dotfiles/private_dot_config/gh ~/.config/gh
|
|
||||||
ln -snf ~/Code/dotfiles/private_dot_config/htop ~/.config/htop
|
|
||||||
ln -snf ~/Code/dotfiles/private_dot_config/bashtop ~/.config/bashtop
|
|
||||||
ln -snf ~/Code/dotfiles/private_dot_config/wtf ~/.config/wtf
|
|
||||||
|
|
||||||
# Other symblinks + Install Docker Desktop for Mac
|
|
||||||
case "$(uname -s)" in
|
|
||||||
Darwin)
|
|
||||||
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/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"
|
|
||||||
echo "(Mac OS X) Installing Docker"
|
|
||||||
~/.scripts/install_docker_for_mac.sh
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# Install dependencies (apps, fonts, ...) with Brew
|
|
||||||
case "$(uname -s)" in
|
|
||||||
Darwin)
|
|
||||||
echo "(Mac OS X) Brew installing stuff (apps, fonts, ...)"
|
|
||||||
ln -snf ~/Code/dotfiles/Brewfile ~/Brewfile
|
|
||||||
brew bundle
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# Install dependencies (apps, fonts, ...) for CentOS
|
|
||||||
case "$(uname -s)" in
|
|
||||||
Linux)
|
|
||||||
echo "(CentOS) Installing stuff (apps, ...)"
|
|
||||||
chmod +x ~/Code/dotfiles/centos.sh
|
|
||||||
~/Code/dotfiles/centos.sh
|
|
||||||
;;
|
|
||||||
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
|
~/.scripts/sdkmandeps.sh
|
||||||
echo "Installing SDKMan as development tools manager"
|
~/.scripts/rubydeps.sh
|
||||||
curl -s "https://get.sdkman.io" | bash
|
~/.scripts/bundlerdeps.sh
|
||||||
|
~/.scripts/ohmyzshdeps.sh
|
||||||
echo "SDKMan installing development tools"
|
~/.scripts/vimdeps.sh
|
||||||
sdk install java
|
~/.scripts/install_no-more-secrets.sh
|
||||||
sdk install gradle
|
~/.scripts/load_macos_defaults.sh
|
||||||
sdk install java 8.0.222-zulu
|
~/.scripts/configure_etc_hosts.sh
|
||||||
sdk install kotlin
|
~/.scripts/pythondeps.sh
|
||||||
echo "SDKMan updating"
|
~/.scripts/install_baton.sh
|
||||||
sdk selfupdate
|
~/.scripts/rustdeps.sh
|
||||||
|
~/.scripts/npmdeps.sh
|
||||||
case "$(uname -s)" in
|
|
||||||
Linux)
|
|
||||||
echo '(Linux) Installing ruby'
|
|
||||||
curl -sSL https://rvm.io/mpapis.asc | gpg2 --import -
|
|
||||||
curl -sSL https://rvm.io/pkuczynski.asc | gpg2 --import -
|
|
||||||
curl -L get.rvm.io | bash -s stable
|
|
||||||
source /etc/profile.d/rvm.sh
|
|
||||||
rvm reload
|
|
||||||
rvm requirements run
|
|
||||||
rvm install 2.3.7
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# Install bundler for managing ruby dependencies and Gemfile
|
|
||||||
echo "Installing bundler for managing ruby dependencies and Gemfile"
|
|
||||||
sudo gem install bundler
|
|
||||||
bundle install
|
|
||||||
|
|
||||||
# Install Oh My Zsh and some cool dependencies
|
|
||||||
echo "Installing Oh My Zsh + customizing themes and plugins"
|
|
||||||
echo 'source /usr/local/opt/powerlevel10k/powerlevel10k.zsh-theme' ~/.zshrc >>!
|
|
||||||
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
|
|
||||||
git clone https://github.com/AlexisBRENON/oh-my-zsh-reminder "$ZSH_CUSTOM/plugins/reminder"
|
|
||||||
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git "$ZSH_CUSTOM/plugins/zsh-syntax-highlighting"
|
|
||||||
git clone https://github.com/zsh-users/zsh-autosuggestions "$ZSH_CUSTOM/plugins/zsh-autosuggestions"
|
|
||||||
ln -snf ~/Code/dotfiles/dot_zshrc ~/.zshrc
|
|
||||||
ln -snf ~/Code/dotfiles/dot_zshrc.pre-oh-my-zsh ~/.zshrc.pre-oh-my-zsh
|
|
||||||
|
|
||||||
echo "Installing Vundle + VIM Plugins"
|
|
||||||
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
|
|
||||||
vim +PluginInstall +qall >/dev/null
|
|
||||||
#https://github.com/ycm-core/YouCompleteMe/blob/master/README.md#installation
|
|
||||||
cd "$HOME/.vim/bundle/YouCompleteMe" || exit
|
|
||||||
./install.py --all
|
|
||||||
cd "$HOME" || exit
|
|
||||||
git clone https://github.com/dbeniamine/cheat.sh-vim.git ~/.vim/cheat.sh-vim
|
|
||||||
|
|
||||||
# Install no-more-secrets
|
|
||||||
echo "Installing no-more-secrets (for fun)"
|
|
||||||
git clone https://github.com/bartobri/no-more-secrets.git ~/Code/no-more-secrets
|
|
||||||
cd "$HOME/Code/no-more-secrets" || exit
|
|
||||||
make nms sneakers
|
|
||||||
sudo make install
|
|
||||||
cd "$HOME" || exit
|
|
||||||
|
|
||||||
# OSX Defaults
|
|
||||||
case "$(uname -s)" in
|
|
||||||
Darwin)
|
|
||||||
echo "(Mac OS X) Loading preferences"
|
|
||||||
sudo sh .macos
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# Customize /etc/hosts
|
|
||||||
echo "Overriding /etc/hosts"
|
|
||||||
curl https://someonewhocares.org/hosts/hosts -o /etc/hosts
|
|
||||||
|
|
||||||
# Install pip and pipenv
|
|
||||||
echo "Installing pip and pipenv"
|
|
||||||
sudo easy_install pip
|
|
||||||
sudo pip install --upgrade pip
|
|
||||||
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
|
|
||||||
sudo python3 get-pip.py
|
|
||||||
case "$(uname -s)" in
|
|
||||||
Darwin)
|
|
||||||
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
|
|
||||||
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
|
|
||||||
echo "Upgrading pip"
|
|
||||||
sudo pip install --upgrade pip
|
|
||||||
echo "Pip installing stuff"
|
|
||||||
pip install -r requirements.txt
|
|
||||||
|
|
||||||
# was used for some slack cli in python... https://pypi.org/project/slack-cli/
|
|
||||||
# pip3 install pipenv
|
|
||||||
# pyenv install 3.6.0
|
|
||||||
|
|
||||||
# Install baton (CLI to manage Spotify playback) https://github.com/joshuathompson/baton
|
|
||||||
case "$(uname -s)" in
|
|
||||||
Darwin)
|
|
||||||
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
|
|
||||||
;;
|
|
||||||
|
|
||||||
Linux)
|
|
||||||
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
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo 'Non supported OS : Installation aborted for baton (spotify CLI)'
|
|
||||||
exit
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# Use rustup to install the Rust compiler (rustc) and the Rust package manager (cargo).
|
|
||||||
echo "Installing Rust compiler and package manager"
|
|
||||||
rustup-init -y
|
|
||||||
rustup component add rustfmt
|
|
||||||
# Install pa11y tool for local webpage accessibility analysis
|
|
||||||
echo "Installing pa11y tool for local webpage accessibility analysis"
|
|
||||||
npm install -g pa11y
|
|
||||||
echo "Installing moro, a productivity CLI tool"
|
|
||||||
npm install -g moro
|
|
||||||
echo "Install wiki cli tool"
|
|
||||||
npm install -g wikit
|
|
||||||
|
|
||||||
git clone https://github.com/sherlock-project/sherlock.git ~/Code/sherlock
|
|
||||||
cd sherlock || exit
|
|
||||||
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
|
terraform-docs completion zsh >/usr/local/share/zsh/site-functions/_terraform-docs
|
||||||
autoload -U compinit && compinit
|
autoload -U compinit && compinit
|
||||||
|
|
||||||
go get -u -v github.com/jessfraz/dockfmt
|
~/.scripts/godeps.sh
|
||||||
go get -u -v github.com/dmlittle/scenery
|
~/.scripts/install_weavescope.sh
|
||||||
go get -u -v github.com/camptocamp/terraboard
|
~/.scripts/install_bashtop.sh
|
||||||
go get -u -v github.com/juliensalinas/torrengo
|
~/.scripts/install_awsls.sh
|
||||||
go get -u -v github.com/asciimoo/wuzz # Interactive cli tool for HTTP inspection
|
~/.scripts/configure_git_hooks.sh
|
||||||
go get -u -v github.com/keilerkonzept/terraform-module-versions # detect new terraform modules versions
|
|
||||||
|
|
||||||
sudo curl -L git.io/scope -o /usr/local/bin/scope
|
|
||||||
sudo chmod a+x /usr/local/bin/scope
|
|
||||||
#scope launch
|
|
||||||
|
|
||||||
# Install bashtop (until brew manages it)
|
|
||||||
git clone https://github.com/aristocratos/bashtop.git ~/Code/bashtop
|
|
||||||
cd ~/Code/bashtop || exit
|
|
||||||
sudo make install
|
|
||||||
|
|
||||||
# Install awsls
|
|
||||||
BINDIR="/usr/local/bin" curl -sSfL https://raw.githubusercontent.com/jckuester/awsls/master/install.sh | sh -s v0.1.2
|
|
||||||
|
|
||||||
# Upgrade
|
|
||||||
echo "Upgrading apps"
|
|
||||||
~/.scripts/upgrade.sh
|
~/.scripts/upgrade.sh
|
||||||
|
|
||||||
# Reload
|
|
||||||
echo "Reloading config"
|
|
||||||
~/.scripts/reload.sh
|
~/.scripts/reload.sh
|
||||||
|
5
dot_scripts/bundlerdeps.sh
Normal file
5
dot_scripts/bundlerdeps.sh
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Install bundler for managing ruby dependencies and Gemfile
|
||||||
|
echo "Installing bundler for managing ruby dependencies and Gemfile"
|
||||||
|
sudo gem install bundler
|
||||||
|
bundle install
|
4
dot_scripts/configure_etc_hosts.sh
Normal file
4
dot_scripts/configure_etc_hosts.sh
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Customize /etc/hosts
|
||||||
|
echo "Overriding /etc/hosts"
|
||||||
|
curl https://someonewhocares.org/hosts/hosts -o /etc/hosts
|
6
dot_scripts/configure_git_hooks.sh
Normal file
6
dot_scripts/configure_git_hooks.sh
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Copy pre-commit hooks
|
||||||
|
cd ~/Code/dotfiles || exit
|
||||||
|
git config --global init.templateDir ~/.git-template
|
||||||
|
pre-commit init-templatedir ~/.git-template
|
||||||
|
copyhooks
|
8
dot_scripts/godeps.sh
Normal file
8
dot_scripts/godeps.sh
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
go get -u -v github.com/jessfraz/dockfmt
|
||||||
|
go get -u -v github.com/dmlittle/scenery
|
||||||
|
go get -u -v github.com/camptocamp/terraboard
|
||||||
|
go get -u -v github.com/juliensalinas/torrengo
|
||||||
|
go get -u -v github.com/asciimoo/wuzz # Interactive CLI tool for HTTP inspection
|
||||||
|
go get -u -v github.com/keilerkonzept/terraform-module-versions # detect new terraform modules versions
|
||||||
|
go get -u -v github.com/talos-systems/conform
|
3
dot_scripts/install_awsls.sh
Normal file
3
dot_scripts/install_awsls.sh
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Install awsls
|
||||||
|
BINDIR="/usr/local/bin" curl -sSfL https://raw.githubusercontent.com/jckuester/awsls/master/install.sh | sh -s v0.1.2
|
6
dot_scripts/install_bashtop.sh
Normal file
6
dot_scripts/install_bashtop.sh
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Install bashtop (until brew manages it)
|
||||||
|
git clone https://github.com/aristocratos/bashtop.git ~/Code/bashtop
|
||||||
|
cd ~/Code/bashtop || exit
|
||||||
|
sudo make install
|
||||||
|
cd "$HOME" || exit
|
17
dot_scripts/install_baton.sh
Normal file
17
dot_scripts/install_baton.sh
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Install baton (CLI to manage Spotify playback) https://github.com/joshuathompson/baton
|
||||||
|
case "$(uname -s)" in
|
||||||
|
Darwin)
|
||||||
|
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
|
||||||
|
;;
|
||||||
|
|
||||||
|
Linux)
|
||||||
|
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
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo 'Non supported OS : Installation aborted for baton (Spotify CLI)'
|
||||||
|
exit
|
||||||
|
;;
|
||||||
|
esac
|
12
dot_scripts/install_homebrew.sh
Normal file
12
dot_scripts/install_homebrew.sh
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Install HomeBrew
|
||||||
|
case "$(uname -s)" in
|
||||||
|
Darwin)
|
||||||
|
echo "(Mac OS X) installing homebrew"
|
||||||
|
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
|
||||||
|
# Prevent `Error: Your Homebrew is outdated. Please run `brew update`.`
|
||||||
|
echo "Updating Homebrew"
|
||||||
|
brew update
|
||||||
|
;;
|
||||||
|
esac
|
11
dot_scripts/install_linux_packages.sh
Normal file
11
dot_scripts/install_linux_packages.sh
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Install missing package (Linux)
|
||||||
|
case "$(uname -s)" in
|
||||||
|
Linux)
|
||||||
|
echo "(Linux) Installing Development Tools"
|
||||||
|
yum install sudo -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
|
||||||
|
;;
|
||||||
|
esac
|
9
dot_scripts/install_linux_user_apps.sh
Normal file
9
dot_scripts/install_linux_user_apps.sh
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Install dependencies (apps, fonts, ...) for CentOS
|
||||||
|
case "$(uname -s)" in
|
||||||
|
Linux)
|
||||||
|
echo "(CentOS) Installing stuff (apps, ...)"
|
||||||
|
chmod +x ~/Code/dotfiles/centos.sh
|
||||||
|
~/Code/dotfiles/centos.sh
|
||||||
|
;;
|
||||||
|
esac
|
10
dot_scripts/install_macpackages.sh
Normal file
10
dot_scripts/install_macpackages.sh
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Install dependencies (apps, fonts, ...) with Brew
|
||||||
|
case "$(uname -s)" in
|
||||||
|
Darwin)
|
||||||
|
echo "(Mac OS X) Brew installing stuff (apps, fonts, ...)"
|
||||||
|
ln -snf ~/Code/dotfiles/Brewfile ~/Brewfile
|
||||||
|
brew bundle
|
||||||
|
;;
|
||||||
|
esac
|
5
dot_scripts/install_weavescope.sh
Normal file
5
dot_scripts/install_weavescope.sh
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Weave Scope is a visualization and monitoring tool for Docker and Kubernetes.
|
||||||
|
sudo curl -L git.io/scope -o /usr/local/bin/scope
|
||||||
|
sudo chmod a+x /usr/local/bin/scope
|
||||||
|
#scope launch
|
8
dot_scripts/load_macos_defaults.sh
Normal file
8
dot_scripts/load_macos_defaults.sh
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# OSX Defaults
|
||||||
|
case "$(uname -s)" in
|
||||||
|
Darwin)
|
||||||
|
echo "(Mac OS X) Loading preferences"
|
||||||
|
sudo sh "$HOME/.macos"
|
||||||
|
;;
|
||||||
|
esac
|
11
dot_scripts/npmdeps.sh
Normal file
11
dot_scripts/npmdeps.sh
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Install pa11y tool for local webpage accessibility analysis
|
||||||
|
echo "Installing pa11y tool for local webpage accessibility analysis"
|
||||||
|
npm install -g pa11y
|
||||||
|
echo "Installing moro, a productivity CLI tool"
|
||||||
|
npm install -g moro
|
||||||
|
echo "Install wiki CLI tool"
|
||||||
|
npm install -g wikit
|
||||||
|
|
||||||
|
cd "$HOME" || exit
|
10
dot_scripts/ohmyzshdeps.sh
Normal file
10
dot_scripts/ohmyzshdeps.sh
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Install Oh My Zsh and some cool dependencies
|
||||||
|
echo "Installing Oh My Zsh + customizing themes and plugins"
|
||||||
|
echo 'source /usr/local/opt/powerlevel10k/powerlevel10k.zsh-theme' ~/.zshrc >>!
|
||||||
|
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
|
||||||
|
git clone https://github.com/AlexisBRENON/oh-my-zsh-reminder "$ZSH_CUSTOM/plugins/reminder"
|
||||||
|
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git "$ZSH_CUSTOM/plugins/zsh-syntax-highlighting"
|
||||||
|
git clone https://github.com/zsh-users/zsh-autosuggestions "$ZSH_CUSTOM/plugins/zsh-autosuggestions"
|
||||||
|
ln -snf ~/Code/dotfiles/dot_zshrc ~/.zshrc
|
||||||
|
ln -snf ~/Code/dotfiles/dot_zshrc.pre-oh-my-zsh ~/.zshrc.pre-oh-my-zsh
|
26
dot_scripts/pythondeps.sh
Normal file
26
dot_scripts/pythondeps.sh
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Install pip and pipenv
|
||||||
|
echo "Installing pip and pipenv"
|
||||||
|
sudo easy_install pip
|
||||||
|
sudo pip install --upgrade pip
|
||||||
|
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
|
||||||
|
sudo python3 get-pip.py
|
||||||
|
case "$(uname -s)" in
|
||||||
|
Darwin)
|
||||||
|
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
|
||||||
|
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
|
||||||
|
echo "Upgrading pip"
|
||||||
|
sudo pip install --upgrade pip
|
||||||
|
echo "Pip installing stuff"
|
||||||
|
pip install -r requirements.txt
|
||||||
|
|
||||||
|
# was used for some slack CLI in python... https://pypi.org/project/slack-cli/
|
||||||
|
# pip3 install pipenv
|
||||||
|
# pyenv install 3.6.0
|
||||||
|
|
||||||
|
git clone https://github.com/sherlock-project/sherlock.git ~/Code/sherlock
|
||||||
|
cd sherlock || exit
|
||||||
|
python3 -m pip install -r requirements.txt
|
@ -1,6 +1,11 @@
|
|||||||
#!/usr/bin/env zsh
|
#!/usr/bin/env zsh
|
||||||
export SDKMAN_DIR="$HOME/.sdkman"
|
export SDKMAN_DIR="$HOME/.sdkman"
|
||||||
[[ -s "$SDKMAN_DIR/bin/sdkman-init.sh" ]] && source "$SDKMAN_DIR/bin/sdkman-init.sh"
|
[[ -s "$SDKMAN_DIR/bin/sdkman-init.sh" ]] && source "$SDKMAN_DIR/bin/sdkman-init.sh"
|
||||||
|
|
||||||
|
|
||||||
|
# Reload
|
||||||
|
echo "Reloading config"
|
||||||
|
|
||||||
chmod +x ~/.scripts/*.sh
|
chmod +x ~/.scripts/*.sh
|
||||||
source ~/.zshrc
|
source ~/.zshrc
|
||||||
sdk use java 8.0.222-zulu
|
sdk use java 8.0.222-zulu
|
||||||
|
13
dot_scripts/rubydeps.sh
Normal file
13
dot_scripts/rubydeps.sh
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
case "$(uname -s)" in
|
||||||
|
Linux)
|
||||||
|
echo '(Linux) Installing ruby'
|
||||||
|
curl -sSL https://rvm.io/mpapis.asc | gpg2 --import -
|
||||||
|
curl -sSL https://rvm.io/pkuczynski.asc | gpg2 --import -
|
||||||
|
curl -L get.rvm.io | bash -s stable
|
||||||
|
source /etc/profile.d/rvm.sh
|
||||||
|
rvm reload
|
||||||
|
rvm requirements run
|
||||||
|
rvm install 2.3.7
|
||||||
|
;;
|
||||||
|
esac
|
5
dot_scripts/rustdeps.sh
Normal file
5
dot_scripts/rustdeps.sh
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Use rustup to install the Rust compiler (rustc) and the Rust package manager (cargo).
|
||||||
|
echo "Installing Rust compiler and package manager"
|
||||||
|
rustup-init -y
|
||||||
|
rustup component add rustfmt
|
20
dot_scripts/sdkmandeps.sh
Normal file
20
dot_scripts/sdkmandeps.sh
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Use SDKMan to install development tools
|
||||||
|
echo "Installing SDKMan as development tools manager"
|
||||||
|
curl -s "https://get.sdkman.io" | bash
|
||||||
|
|
||||||
|
# Install missing package (Linux)
|
||||||
|
case "$(uname -s)" in
|
||||||
|
Linux)
|
||||||
|
source "/root/.sdkman/bin/sdkman-init.sh"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
echo "SDKMan installing development tools"
|
||||||
|
sdk install java
|
||||||
|
sdk install gradle
|
||||||
|
sdk install java 8.0.222-zulu
|
||||||
|
sdk install kotlin
|
||||||
|
echo "SDKMan updating"
|
||||||
|
sdk selfupdate
|
48
dot_scripts/symbolic_links.sh
Normal file
48
dot_scripts/symbolic_links.sh
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
echo "Creating symbolic links"
|
||||||
|
|
||||||
|
ln -snf ~/Code/dotfiles/dot_profile ~/.profile
|
||||||
|
ln -snf ~/.local/share/chezmoi/ ~/dotfiles
|
||||||
|
ln -snf ~/Code/dotfiles/Gemfile ~/Gemfile
|
||||||
|
ln -snf ~/Code/dotfiles/README.md ~/README.md
|
||||||
|
ln -snf ~/Code/dotfiles/dot_bash_profile ~/.bash_profile
|
||||||
|
ln -snf ~/Code/dotfiles/dot_gitconfig ~/.gitconfig
|
||||||
|
ln -snf ~/Code/dotfiles/dot_macos ~/.macos
|
||||||
|
ln -snf ~/Code/dotfiles/dot_scripts ~/.scripts
|
||||||
|
ln -snf ~/Code/dotfiles/dot_scripts/checkci.sh /usr/local/bin/checkci
|
||||||
|
ln -snf ~/Code/dotfiles/dot_vimrc ~/.vimrc
|
||||||
|
# custom linters
|
||||||
|
ln -snf ~/Code/dotfiles/dot_vim/ale_linters ~/.vim/ale_linters
|
||||||
|
ln -snf ~/Code/dotfiles/dot_aliases ~/.aliases
|
||||||
|
ln -snf ~/Code/dotfiles/dot_zsh_aliases ~/.zsh_aliases
|
||||||
|
ln -snf ~/Code/dotfiles/dot_zsh_functions ~/.zsh_functions
|
||||||
|
ln -snf ~/Code/dotfiles/dot_zshrc ~/.zshrc
|
||||||
|
ln -snf ~/Code/dotfiles/dot_zshrc.pre-oh-my-zsh ~/.zshrc.pre-oh-my-zsh
|
||||||
|
ln -snf ~/Code/dotfiles/private_dot_ssh/config ~/.ssh/config
|
||||||
|
ln -snf ~/Code/dotfiles/requirements.txt ~/requirements.txt
|
||||||
|
ln -snf ~/Code/dotfiles/dot_surfraw.conf ~/.surfraw.conf
|
||||||
|
ln -snf ~/Code/dotfiles/private_dot_3llo/config.sh ~/.3llo_config
|
||||||
|
ln -snf ~/Code/dotfiles/dot_ansiweatherrc ~/.ansiweatherrc
|
||||||
|
ln -snf ~/Code/dotfiles/dot_p10k.zsh ~/.p10k.zsh
|
||||||
|
ln -snf ~/Code/dotfiles/dot_git-template ~/.git-template
|
||||||
|
ln -snf ~/Code/dotfiles/private_dot_newsboat ~/.newsboat
|
||||||
|
ln -snf ~/Code/dotfiles/private_dot_config/Code ~/.config/Code
|
||||||
|
ln -snf ~/Code/dotfiles/private_dot_config/neofetch ~/.config/neofetch
|
||||||
|
ln -snf ~/Code/dotfiles/private_dot_config/gh ~/.config/gh
|
||||||
|
ln -snf ~/Code/dotfiles/private_dot_config/htop ~/.config/htop
|
||||||
|
ln -snf ~/Code/dotfiles/private_dot_config/bashtop ~/.config/bashtop
|
||||||
|
ln -snf ~/Code/dotfiles/private_dot_config/wtf ~/.config/wtf
|
||||||
|
ln -snf ~/Code/dotfiles/private_dot_config/yamllint ~/.config/yamllint
|
||||||
|
ln -snf ~/Code/dotfiles/dot_git-template/.pre-commit-config.yaml ~/Code/dotfiles/.pre-commit-config.yaml
|
||||||
|
|
||||||
|
# Other symbolic links + Install Docker Desktop for Mac
|
||||||
|
case "$(uname -s)" in
|
||||||
|
Darwin)
|
||||||
|
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/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"
|
||||||
|
echo "(Mac OS X) Installing Docker"
|
||||||
|
~/.scripts/install_docker_for_mac.sh
|
||||||
|
;;
|
||||||
|
esac
|
@ -3,6 +3,9 @@ export SDKMAN_DIR="$HOME/.sdkman"
|
|||||||
[[ -s "$SDKMAN_DIR/bin/sdkman-init.sh" ]] && source "$SDKMAN_DIR/bin/sdkman-init.sh"
|
[[ -s "$SDKMAN_DIR/bin/sdkman-init.sh" ]] && source "$SDKMAN_DIR/bin/sdkman-init.sh"
|
||||||
sdk selfupdate
|
sdk selfupdate
|
||||||
|
|
||||||
|
# Upgrade
|
||||||
|
echo "Upgrading apps"
|
||||||
|
|
||||||
# Upgrading HomeBrew stuff
|
# Upgrading HomeBrew stuff
|
||||||
case "$(uname -s)" in
|
case "$(uname -s)" in
|
||||||
Darwin)
|
Darwin)
|
||||||
@ -25,3 +28,4 @@ pip freeze >~/requirements.txt
|
|||||||
vim +PluginUpdate +qall >/dev/null
|
vim +PluginUpdate +qall >/dev/null
|
||||||
rustup-update
|
rustup-update
|
||||||
npm update -g moro
|
npm update -g moro
|
||||||
|
pre-commit autoupdate
|
||||||
|
9
dot_scripts/vimdeps.sh
Normal file
9
dot_scripts/vimdeps.sh
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
echo "Installing Vundle + VIM Plugins"
|
||||||
|
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
|
||||||
|
vim +PluginInstall +qall >/dev/null
|
||||||
|
#https://github.com/ycm-core/YouCompleteMe/blob/master/README.md#installation
|
||||||
|
cd "$HOME/.vim/bundle/YouCompleteMe" || exit
|
||||||
|
./install.py --all
|
||||||
|
cd "$HOME" || exit
|
||||||
|
git clone https://github.com/dbeniamine/cheat.sh-vim.git ~/.vim/cheat.sh-vim
|
15
dot_vimrc
15
dot_vimrc
@ -57,6 +57,8 @@ Plugin 'mbbill/undotree'
|
|||||||
Plugin 'farmergreg/vim-lastplace'
|
Plugin 'farmergreg/vim-lastplace'
|
||||||
" Add icons to your plugins
|
" Add icons to your plugins
|
||||||
Plugin 'ryanoasis/vim-devicons'
|
Plugin 'ryanoasis/vim-devicons'
|
||||||
|
" Prettier to auto format some files
|
||||||
|
Plugin 'mitermayer/vim-prettier'
|
||||||
|
|
||||||
" All of your Plugins must be added before the following line
|
" All of your Plugins must be added before the following line
|
||||||
call vundle#end()
|
call vundle#end()
|
||||||
@ -97,6 +99,7 @@ let g:ale_use_global_executables = 1
|
|||||||
let g:ale_fix_on_save = 1
|
let g:ale_fix_on_save = 1
|
||||||
let g:ale_completion_enabled = 1
|
let g:ale_completion_enabled = 1
|
||||||
let g:ale_open_list = 1
|
let g:ale_open_list = 1
|
||||||
|
"\ 'yaml': ['prettier'],
|
||||||
let g:ale_fixers = {
|
let g:ale_fixers = {
|
||||||
\ '*': ['remove_trailing_lines', 'trim_whitespace'],
|
\ '*': ['remove_trailing_lines', 'trim_whitespace'],
|
||||||
\ 'python': ['black'],
|
\ 'python': ['black'],
|
||||||
@ -104,6 +107,16 @@ let g:ale_fixers = {
|
|||||||
\ 'Jenkinsfile': ['checkci'],
|
\ 'Jenkinsfile': ['checkci'],
|
||||||
\}
|
\}
|
||||||
|
|
||||||
|
" when running at every change you may want to disable quickfix
|
||||||
|
let g:prettier#quickfix_enabled = 1
|
||||||
|
let g:prettier#quickfix_auto_focus = 1
|
||||||
|
let g:prettier#config#print_width = '30'
|
||||||
|
let g:prettier#exec_cmd_path = "/usr/local/bin/prettier"
|
||||||
|
let g:prettier#autoformat = 0
|
||||||
|
let g:prettier#autoformat_require_pragma = 0
|
||||||
|
|
||||||
|
"autocmd TextChanged,InsertLeave *.js,*.jsx,*.mjs,*.ts,*.tsx,*.css,*.less,*.scss,*.json,*.graphql,*.md,*.vue,*.yaml,*.html PrettierAsync
|
||||||
|
|
||||||
" Enable syntax highlighting
|
" Enable syntax highlighting
|
||||||
syntax on
|
syntax on
|
||||||
" Enable line numbers
|
" Enable line numbers
|
||||||
@ -173,6 +186,8 @@ let g:syntastic_javascript_checkers = [ 'jshint' ]
|
|||||||
let g:syntastic_ocaml_checkers = ['merlin']
|
let g:syntastic_ocaml_checkers = ['merlin']
|
||||||
let g:syntastic_python_checkers = ['pylint']
|
let g:syntastic_python_checkers = ['pylint']
|
||||||
let g:syntastic_shell_checkers = ['shellcheck']
|
let g:syntastic_shell_checkers = ['shellcheck']
|
||||||
|
let g:syntastic_yaml_checkers = ['yamllint']
|
||||||
|
let g:syntastic_vim_checkers = ['vint']
|
||||||
|
|
||||||
set statusline+=%#warningmsg#
|
set statusline+=%#warningmsg#
|
||||||
set statusline+=%{SyntasticStatuslineFlag()}
|
set statusline+=%{SyntasticStatuslineFlag()}
|
||||||
|
@ -15,7 +15,7 @@ alias goto='git go'
|
|||||||
alias master='goto master'
|
alias master='goto master'
|
||||||
alias develop='goto develop'
|
alias develop='goto develop'
|
||||||
alias gg='git config -l | grep -i' # search git config for ...
|
alias gg='git config -l | grep -i' # search git config for ...
|
||||||
alias ucommit='PRE_COMMIT_ALLOW_NO_CONFIG=1 git commit'
|
alias ucommit='PRE_COMMIT_ALLOW_NO_CONFIG=1 git commit --no-verify'
|
||||||
|
|
||||||
# Docker
|
# Docker
|
||||||
alias lzd='lazydocker'
|
alias lzd='lazydocker'
|
||||||
@ -105,6 +105,7 @@ alias sshpub='cat ~/.ssh/id_ed25519.pub'
|
|||||||
alias ssla="openssl x509 -alias -noout -in" # Usage : ssla <cert>
|
alias ssla="openssl x509 -alias -noout -in" # Usage : ssla <cert>
|
||||||
alias encrypt='ansible-vault encrypt **/vault.yml --vault-password-file=$VAULT_PASSWORD_FILE'
|
alias encrypt='ansible-vault encrypt **/vault.yml --vault-password-file=$VAULT_PASSWORD_FILE'
|
||||||
alias decrypt='ansible-vault decrypt **/vault.yml --vault-password-file=$VAULT_PASSWORD_FILE'
|
alias decrypt='ansible-vault decrypt **/vault.yml --vault-password-file=$VAULT_PASSWORD_FILE'
|
||||||
|
alias bitwarden-cli='bw'
|
||||||
alias newpass='bw generate --special --uppercase --lowercase --number --length 30'
|
alias newpass='bw generate --special --uppercase --lowercase --number --length 30'
|
||||||
|
|
||||||
# Network
|
# Network
|
||||||
@ -174,6 +175,7 @@ alias latency='curl cheat.sh/latency'
|
|||||||
|
|
||||||
# Misc
|
# Misc
|
||||||
alias bash="/usr/local/bin/bash"
|
alias bash="/usr/local/bin/bash"
|
||||||
|
#alias date="gdate"
|
||||||
alias current_year='`echo date +"%Y"`'
|
alias current_year='`echo date +"%Y"`'
|
||||||
alias headers='curl -I --compress' # Find out if remote server supports gzip / mod_deflate or not #
|
alias headers='curl -I --compress' # Find out if remote server supports gzip / mod_deflate or not #
|
||||||
alias https='http --default-scheme=https' # useful alias stealed from a colleague. http is provided by httpie
|
alias https='http --default-scheme=https' # useful alias stealed from a colleague. http is provided by httpie
|
||||||
@ -183,6 +185,10 @@ alias root='sudo -i'
|
|||||||
alias ':q'='exit'
|
alias ':q'='exit'
|
||||||
alias current_hour='date +"%H:%M"'
|
alias current_hour='date +"%H:%M"'
|
||||||
alias current_time='current_hour'
|
alias current_time='current_hour'
|
||||||
|
alias runhooks='pre-commit run -a'
|
||||||
|
alias whatyear='current_year'
|
||||||
|
alias whathour='current_time'
|
||||||
|
alias whattime='whathour'
|
||||||
|
|
||||||
# Linters
|
# Linters
|
||||||
alias checken="aspell check -d en"
|
alias checken="aspell check -d en"
|
||||||
|
@ -270,10 +270,13 @@ function checkov { docker run -i --rm -v "$(pwd):/tf" bridgecrew/checkov -d /tf
|
|||||||
function vimat {
|
function vimat {
|
||||||
vim +/$1 $2
|
vim +/$1 $2
|
||||||
}
|
}
|
||||||
|
function installhooks {
|
||||||
|
pre-commit install --install-hooks --overwrite --allow-missing-config
|
||||||
|
}
|
||||||
function copyhooks {
|
function copyhooks {
|
||||||
cp -f ~/.git-template/.pre-commit-config.yaml ./
|
cp -f ~/.git-template/.pre-commit-config.yaml ./
|
||||||
pre-commit install --install-hooks --overwrite --allow-missing-config
|
installhooks;
|
||||||
pre-commit run -a
|
runhooks;
|
||||||
}
|
}
|
||||||
function httperr {
|
function httperr {
|
||||||
curl -s "https://http.cat/$1" | imgcat
|
curl -s "https://http.cat/$1" | imgcat
|
||||||
@ -383,6 +386,14 @@ function brewadd {
|
|||||||
brew install "$1"
|
brew install "$1"
|
||||||
ansible 127.0.0.1 -m lineinfile -a "path=~/Brewfile line='brew \"$1\"'"
|
ansible 127.0.0.1 -m lineinfile -a "path=~/Brewfile line='brew \"$1\"'"
|
||||||
}
|
}
|
||||||
|
function pipadd {
|
||||||
|
pip install "$1"
|
||||||
|
pip freeze > "$HOME/requirements.txt"
|
||||||
|
}
|
||||||
|
function goadd {
|
||||||
|
ansible 127.0.0.1 -m lineinfile -a "path=~/.scripts/godeps.sh line='go get -u -v $1'"
|
||||||
|
go get -u -v "$1"
|
||||||
|
}
|
||||||
function rssadd {
|
function rssadd {
|
||||||
ansible 127.0.0.1 -m lineinfile -a "path=~/.newsboat/urls line='"$1"'"
|
ansible 127.0.0.1 -m lineinfile -a "path=~/.newsboat/urls line='"$1"'"
|
||||||
newsboat
|
newsboat
|
||||||
@ -446,3 +457,6 @@ function file_getpairs {
|
|||||||
function file_dups {
|
function file_dups {
|
||||||
\cat "$1" | sort | uniq -c | sort -nr
|
\cat "$1" | sort | uniq -c | sort -nr
|
||||||
}
|
}
|
||||||
|
function foreach_run {
|
||||||
|
find . -name "$1" -exec "$2" {} \;
|
||||||
|
}
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
# What protocol to use when performing git operations. Supported values: ssh, https
|
# What protocol to use when performing git operations. Supported values: ssh, https
|
||||||
git_protocol: https
|
git_protocol: https
|
||||||
# What editor gh should run when creating issues, pull requests, etc. If blank, will refer to environment.
|
# What editor gh should run when creating issues, pull requests, etc. If blank, will refer to environment.
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
wtf:
|
wtf:
|
||||||
colors:
|
colors:
|
||||||
border:
|
border:
|
||||||
@ -12,40 +13,40 @@ wtf:
|
|||||||
clocks_a:
|
clocks_a:
|
||||||
colors:
|
colors:
|
||||||
rows:
|
rows:
|
||||||
even: "lightblue"
|
even: lightblue
|
||||||
odd: "white"
|
odd: white
|
||||||
enabled: true
|
enabled: true
|
||||||
locations:
|
locations:
|
||||||
Vancouver: "America/Vancouver"
|
Vancouver: America/Vancouver
|
||||||
Toronto: "America/Toronto"
|
Toronto: America/Toronto
|
||||||
position:
|
position:
|
||||||
top: 0
|
top: 0
|
||||||
left: 1
|
left: 1
|
||||||
height: 1
|
height: 1
|
||||||
width: 1
|
width: 1
|
||||||
refreshInterval: 15
|
refreshInterval: 15
|
||||||
sort: "alphabetical"
|
sort: alphabetical
|
||||||
title: "Clocks A"
|
title: Clocks A
|
||||||
type: "clocks"
|
type: clocks
|
||||||
clocks_b:
|
clocks_b:
|
||||||
colors:
|
colors:
|
||||||
rows:
|
rows:
|
||||||
even: "lightblue"
|
even: lightblue
|
||||||
odd: "white"
|
odd: white
|
||||||
enabled: true
|
enabled: true
|
||||||
locations:
|
locations:
|
||||||
Avignon: "Europe/Paris"
|
Avignon: Europe/Paris
|
||||||
Barcelona: "Europe/Madrid"
|
Barcelona: Europe/Madrid
|
||||||
Dubai: "Asia/Dubai"
|
Dubai: Asia/Dubai
|
||||||
position:
|
position:
|
||||||
top: 0
|
top: 0
|
||||||
left: 2
|
left: 2
|
||||||
height: 1
|
height: 1
|
||||||
width: 1
|
width: 1
|
||||||
refreshInterval: 15
|
refreshInterval: 15
|
||||||
sort: "alphabetical"
|
sort: alphabetical
|
||||||
title: "Clocks B"
|
title: Clocks B
|
||||||
type: "clocks"
|
type: clocks
|
||||||
feedreader:
|
feedreader:
|
||||||
enabled: true
|
enabled: true
|
||||||
feeds:
|
feeds:
|
||||||
@ -59,8 +60,8 @@ wtf:
|
|||||||
updateInterval: 14400
|
updateInterval: 14400
|
||||||
ipinfo:
|
ipinfo:
|
||||||
colors:
|
colors:
|
||||||
name: "lightblue"
|
name: lightblue
|
||||||
value: "white"
|
value: white
|
||||||
enabled: true
|
enabled: true
|
||||||
position:
|
position:
|
||||||
top: 2
|
top: 2
|
||||||
@ -76,10 +77,10 @@ wtf:
|
|||||||
height: 1
|
height: 1
|
||||||
width: 1
|
width: 1
|
||||||
refreshInterval: 15
|
refreshInterval: 15
|
||||||
title: "⚡️"
|
title: ⚡️
|
||||||
textfile:
|
textfile:
|
||||||
enabled: true
|
enabled: true
|
||||||
filePath: "~/.config/wtf/config.yml"
|
filePath: ~/.config/wtf/config.yml
|
||||||
format: true
|
format: true
|
||||||
position:
|
position:
|
||||||
top: 0
|
top: 0
|
||||||
@ -89,8 +90,8 @@ wtf:
|
|||||||
refreshInterval: 30
|
refreshInterval: 30
|
||||||
wrapText: false
|
wrapText: false
|
||||||
uptime:
|
uptime:
|
||||||
args: [""]
|
args: ['']
|
||||||
cmd: "uptime"
|
cmd: uptime
|
||||||
enabled: true
|
enabled: true
|
||||||
position:
|
position:
|
||||||
top: 3
|
top: 3
|
||||||
|
30
private_dot_config/yamllint/config
Normal file
30
private_dot_config/yamllint/config
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
extends: default
|
||||||
|
|
||||||
|
rules:
|
||||||
|
braces:
|
||||||
|
level: warning
|
||||||
|
max-spaces-inside: 1
|
||||||
|
brackets:
|
||||||
|
level: warning
|
||||||
|
max-spaces-inside: 1
|
||||||
|
colons:
|
||||||
|
level: warning
|
||||||
|
commas:
|
||||||
|
level: warning
|
||||||
|
comments: disable
|
||||||
|
comments-indentation: disable
|
||||||
|
document-start: disable
|
||||||
|
empty-lines:
|
||||||
|
level: warning
|
||||||
|
hyphens:
|
||||||
|
level: warning
|
||||||
|
indentation:
|
||||||
|
level: warning
|
||||||
|
indent-sequences: consistent
|
||||||
|
line-length:
|
||||||
|
level: warning
|
||||||
|
max: 120
|
||||||
|
allow-non-breakable-inline-mappings: true
|
||||||
|
truthy: disable
|
@ -1,7 +1,8 @@
|
|||||||
|
ansicolor==0.2.6
|
||||||
appdirs==1.4.3
|
appdirs==1.4.3
|
||||||
appnope==0.1.0
|
appnope==0.1.0
|
||||||
argcomplete==1.10.0
|
argcomplete==1.10.0
|
||||||
arrow==0.15.7
|
arrow==0.15.5
|
||||||
asn1crypto==1.2.0
|
asn1crypto==1.2.0
|
||||||
astroid==2.3.3
|
astroid==2.3.3
|
||||||
attrs==19.3.0
|
attrs==19.3.0
|
||||||
@ -9,6 +10,7 @@ Automat==0.8.0
|
|||||||
autopep8==1.4.4
|
autopep8==1.4.4
|
||||||
backcall==0.1.0
|
backcall==0.1.0
|
||||||
beautifulsoup4==4.8.1
|
beautifulsoup4==4.8.1
|
||||||
|
beautysh==6.0.1
|
||||||
black==19.10b0
|
black==19.10b0
|
||||||
bleach==3.1.4
|
bleach==3.1.4
|
||||||
bs4==0.0.1
|
bs4==0.0.1
|
||||||
@ -30,6 +32,7 @@ docutils==0.15.2
|
|||||||
entrypoints==0.3
|
entrypoints==0.3
|
||||||
flake8==3.7.9
|
flake8==3.7.9
|
||||||
future==0.18.2
|
future==0.18.2
|
||||||
|
gitlint==0.13.1
|
||||||
google-api-python-client==1.7.11
|
google-api-python-client==1.7.11
|
||||||
google-auth==1.7.0
|
google-auth==1.7.0
|
||||||
google-auth-httplib2==0.0.3
|
google-auth-httplib2==0.0.3
|
||||||
@ -107,6 +110,7 @@ rainbowstream==1.5.2
|
|||||||
readme-renderer==24.0
|
readme-renderer==24.0
|
||||||
rebound-cli==2.0.0
|
rebound-cli==2.0.0
|
||||||
regex==2019.11.1
|
regex==2019.11.1
|
||||||
|
relint==1.2.1
|
||||||
requests==2.22.0
|
requests==2.22.0
|
||||||
requests-futures==1.0.0
|
requests-futures==1.0.0
|
||||||
requests-toolbelt==0.9.1
|
requests-toolbelt==0.9.1
|
||||||
@ -115,6 +119,7 @@ rtv==1.27.0
|
|||||||
Scrapy==1.8.0
|
Scrapy==1.8.0
|
||||||
semver==2.9.0
|
semver==2.9.0
|
||||||
service-identity==18.1.0
|
service-identity==18.1.0
|
||||||
|
sh==1.12.14
|
||||||
six==1.13.0
|
six==1.13.0
|
||||||
slacker==0.13.0
|
slacker==0.13.0
|
||||||
soupsieve==1.9.5
|
soupsieve==1.9.5
|
||||||
@ -132,6 +137,7 @@ typed-ast==1.4.0
|
|||||||
uritemplate==3.0.0
|
uritemplate==3.0.0
|
||||||
urllib3==1.25.6
|
urllib3==1.25.6
|
||||||
urwid==2.0.1
|
urwid==2.0.1
|
||||||
|
vim-vint==0.3.21
|
||||||
virtualenv==16.7.7
|
virtualenv==16.7.7
|
||||||
virtualenv-clone==0.5.3
|
virtualenv-clone==0.5.3
|
||||||
w3lib==1.21.0
|
w3lib==1.21.0
|
||||||
@ -139,4 +145,5 @@ wcwidth==0.1.7
|
|||||||
webencodings==0.5.1
|
webencodings==0.5.1
|
||||||
websocket-client==0.56.0
|
websocket-client==0.56.0
|
||||||
wrapt==1.11.2
|
wrapt==1.11.2
|
||||||
|
yamllint==1.23.0
|
||||||
zope.interface==4.6.0
|
zope.interface==4.6.0
|
||||||
|
Loading…
Reference in New Issue
Block a user