{"id":18445626,"url":"https://github.com/voronenko/dotfiles","last_synced_at":"2025-04-08T00:31:40.620Z","repository":{"id":12857421,"uuid":"15533460","full_name":"Voronenko/dotfiles","owner":"Voronenko","description":"portable configuration files for unix environment","archived":false,"fork":false,"pushed_at":"2025-03-20T16:14:50.000Z","size":1435,"stargazers_count":17,"open_issues_count":8,"forks_count":9,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-20T17:26:10.167Z","etag":null,"topics":["dotfiles","zsh"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Voronenko.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-12-30T18:13:11.000Z","updated_at":"2025-03-20T16:14:55.000Z","dependencies_parsed_at":"2023-09-29T12:39:54.729Z","dependency_job_id":"b54ac46c-6290-4cd6-98cf-6bcff7c605bc","html_url":"https://github.com/Voronenko/dotfiles","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Voronenko%2Fdotfiles","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Voronenko%2Fdotfiles/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Voronenko%2Fdotfiles/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Voronenko%2Fdotfiles/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Voronenko","download_url":"https://codeload.github.com/Voronenko/dotfiles/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247755338,"owners_count":20990616,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dotfiles","zsh"],"created_at":"2024-11-06T07:06:36.233Z","updated_at":"2025-04-08T00:31:38.358Z","avatar_url":"https://github.com/Voronenko.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"dotfiles\n========\n\nMy unix environment\n\nSo, to recap, the install script will:\n\n* Back up any existing dotfiles in your home directory to ~/dotfiles_old/\n* Create symlinks to the dotfiles in ~/dotfiles/ in your home directory\n* Clone the oh-my-zsh repository from my GitHub (for use with zsh)\n* Check to see if zsh is installed, if it isn't, try to install it.\n* If zsh is installed, run a chsh -s to set it as the default shell.\n\nTLDR;\n\nGet basic zshrc + bashrc right now and optional bootstrap.sh for the future\n\n```\n\ncurl -sSL https://bit.ly/getmyshell \u003e getmyshell.sh \u0026\u0026 chmod +x getmyshell.sh \u0026\u0026 ./getmyshell.sh\n```\n\nOR https://bit.ly/slavkodotfiles for bootstrap.sh only\n\n```\ncurl -sSL https://bit.ly/slavkodotfiles \u003e bootstrap.sh \u0026\u0026 chmod +x bootstrap.sh\n./bootstrap.sh  \u003coptional: simple | full | docker\u003e\n\n```\n\n# Some console perks (but not all)\n\n#fzf\n\n`COMMAND [DIRECTORY/][FUZZY_PATTERN]**\u003cTAB\u003e`  - lookup file/folder\n\n`kill -9 \u003cTAB\u003e`  - lookup process\n\n`ssh **\u003cTAB\u003e` - lookup host from ~/.ssh/confog\n\noperate with envvars\n```\nunset **\u003cTAB\u003e\nexport **\u003cTAB\u003e\nunalias **\u003cTAB\u003e\n```\n\nas a part of helper for docker https://github.com/MartinRamm/fzf-docker.git\n\n| command | description                                               | fzf mode | command arguments (optional)                                                                                 |\n| ------- | --------------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------ |\n| dr      | docker restart \u0026\u0026 open logs (in follow mode)              | multiple |                                                                                                              |\n| dl      | docker logs (in follow mode)                              | multiple | time interval - e.g.: `1m` for 1 minute - (defaults to all available logs)                                   |\n| dla     | docker logs (in follow mode) all containers               |          | time interval - e.g.: `1m` for 1 minute - (defaults to all available logs)                                   |\n| de      | docker exec in interactive mode                           | single   | command to exec (default - see below)                                                                        |\n| drm     | docker remove container (with force)                      | multiple |                                                                                                              |\n| drma    | docker remove all containers (with force)                 |          |                                                                                                              |\n| ds      | docker stop                                               | multiple |                                                                                                              |\n| dsa     | docker stop all running containers                        |          |                                                                                                              |\n| dsrm    | docker stop and remove container                          | multiple |                                                                                                              |\n| dsrma   | docker stop and remove all container                      |          |\n\n| dk      | docker kill                                               | multiple |                                                                                                              |\n| dka     | docker kill all containers                                |          |                                                                                                              |\n| dkrm    | docker kill and remove container                          | multiple |                                                                                                              |\n| dkrma   | docker kill and remove all container                      |          |                                                                                                              |\n| drmi    | docker remove image (with force)                          | multiple |                                                                                                              |\n| drmia   | docker remove all images (with force)                     |          |                                                                                                              |\n| dclean  | `dsrma` and `drmia`                                       |          |                                                                                                              |\n\n\n#/fzf\n\n`z \u003ctab\u003e`  - quickly change to most often used dir with cd\n\n`ga` Interactive git add selector\n\n`glo` Interactive git log viewer\n\n`gi` Interactive .gitignore generator\n\n`gd` Interactive git diff viewer\n\n`grh` Interactive git reset HEAD \u003cfile\u003e selector\n\n`gcf` Interactive git checkout \u003cfile\u003e selector\n\n`gss` Interactive git stash viewer\n\n`gclean` Interactive git clean selector\n\n`ec2ssh` - lookup and template ssh connection to machines you want to connect\n\n`ec2ssm` - lookup instances to connect using aws ssm\n\n\n# Folder specific SSH identity for git\n\nsee ssh-ident conf file for examples\n\n# Docker helpers\n\n```sh\ndck sh | bash | list |stopall |cleanimages |cleancontainers | ui | registry | inspect \u003ccontainer name\u003e \u003cjq filter\u003e\n```\n\n# Need to use Ruby?  Multiple ruby version support via chruby, if detected.\n\n```sh\n# DETECT CHRUBY support\n\nif [[ -d /usr/local/share/chruby/ ]]; then\n        # Linux installation of chruby\n        chruby_path=/usr/local/share/chruby/\nelif [[ -d /usr/local/opt/chruby/share/chruby/ ]]; then\n        # Homebrew installation of chruby\n        chruby_path=/usr/local/opt/chruby/share/chruby/\nfi\n\nif [[ -d $chruby_path ]]; then\n        source $chruby_path/chruby.sh\n        source $chruby_path/auto.sh\nfi\n```\n\n\n# Working in multi-window tmux environment ?\n\nIf detected, `onproject \u003cname\u003e` , `offproject` shortcuts to launch project specific setup\n\n```sh\nif [[ -f /usr/bin/tmux || -f /usr/local/bin/tmux ]]; then\n\nif [[ -d /mnt/c/Windows/ ]]; then\n# Holy shit, I am on windows linux subsystem\n\nfunction onproject() {\n  TMUXMODE=$2 tmuxinator ${1}_env\n}\n\nelse\n\nfunction onproject() {\n  TMUXMODE=$2 gnome-terminal -x tmuxinator ${1}_env \u0026\n}\n\nfi\n\nfunction offproject() {\n  tmux kill-session -t ${1} \u0026\n}\n\nautoload -Uz onproject\nautoload -Uz offproject\n\nalias killproject='tmux kill-server'\n\nfi\n```\n\n\n# Folder specific environment\n\nIf you have direnv tool installed, `.envrc` start to get supported.\n\n```\nif [[ -f /usr/bin/direnv ]]; then\n# direnv\neval \"$(direnv hook zsh)\"\nfi\n```\n\nQuick note on getting \"merged\" environments: placing `source_env` directive into `.envrc`\nallows that effect. In other case, other environment variables will be uploaded.\n\n\n```\nsource_env ..\n```\n\nIf you also make use of hashicorp vault for secrets storage,\nyou can use following workaround with direnv:\n\n```\nPROJECT=SOMEPROJECT\nexport AWS_ACCESS_KEY_ID=$(vault read -field \"value\" secret/$PROJECT/aws/AWS_ACCESS_KEY_ID)\nexport AWS_SECRET_ACCESS_KEY=$(vault read -field \"value\" secret/$PROJECT/aws/AWS_SECRET_ACCESS_KEY)\nexport AWS_DEFAULT_REGION=us-east-1\n```\n\n\n# Gitflow fun?\n\nFor simple pet projects handy shortcuts for easy process enforcing.\n\n```sh\nif [[ -f ~/dotfiles/gitflow/release_start.sh ]]; then\n\n# gitflow\nalias gitflow-init='git flow init -f -d'\nalias gitflow-release-start='~/dotfiles/gitflow/release_start.sh'\nalias gitflow-release-finish='~/dotfiles/gitflow/release_finish.sh'\nalias gitflow-hotfix-start='~/dotfiles/gitflow/hotfix_start.sh'\nalias gitflow-hotfix-finish='~/dotfiles/gitflow/hotfix_finish.sh'\n\nfi\n```\n\n# NodeJS development?\n\nIf detected, nvm is loaded and per project `.nvmrc` is supported to switch node version in console.\n\n```sh\nif [[ -f ~/.nvm/nvm.sh ]]; then\n\nsource ~/.nvm/nvm.sh\n\n# place this after nvm initialization!\nautoload -U add-zsh-hook\nload-nvmrc() {\n  local node_version=\"$(nvm version)\"\n  local nvmrc_path=\"$(nvm_find_nvmrc)\"\n\n  if [ -n \"$nvmrc_path\" ]; then\n    local nvmrc_node_version=$(nvm version \"$(cat \"${nvmrc_path}\")\")\n\n    if [ \"$nvmrc_node_version\" = \"N/A\" ]; then\n      nvm install\n    elif [ \"$nvmrc_node_version\" != \"$node_version\" ]; then\n      nvm use\n    fi\n  elif [ \"$node_version\" != \"$(nvm version default)\" ]; then\n    echo \"Reverting to nvm default version\"\n    nvm use default\n  fi\n}\nadd-zsh-hook chpwd load-nvmrc\nload-nvmrc\n\nfi\n```\n\n\n\n# Python development ?\n\nIf detected, your virtual envs are carefully stored in ~/.virtualenvs\n\n```sh\nif [[ -f /usr/local/bin/virtualenvwrapper.sh ]]; then\n\nmkdir -p ~/.virtualenvs\nexport WORKON_HOME=$HOME/.virtualenvs\nsource /usr/local/bin/virtualenvwrapper.sh\n\nfi\n```\n\nAdditional shell prompt hint/coloring for virtualenv:\n\n~/.virtualenvs/postactivate\n\n```sh\n#!/usr/bin/zsh\n# This hook is sourced after every virtualenv is activated.\n\nPS1=\"$_OLD_VIRTUAL_PS1\"\n_OLD_RPROMPT=\"$RPROMPT\"\nRPROMPT=\"%{${fg_bold[white]}%}(pyenv: %{${fg[green]}%}`basename \\\"$VIRTUAL_ENV\\\"`%{${fg_bold[white]}%})%{${reset_color}%} $RPROMPT\"\n\n```\n\n~/.virtualenvs/postdeactivate\n```sh\n\n#!/usr/bin/zsh\n# This hook is sourced after every virtualenv is deactivated.\n\nRPROMPT=\"$_OLD_RPROMPT\"\n\n```\n\n# Jupyter notebook git diff integration?\n\nhttps://nbdime.readthedocs.io/en/latest/vcs.html\n\n```sh\nnbdime config-git (--enable | --disable) [--global | --system]\n```\n\n\n\n# Project notes\n\nAre you using  notebook for taking notes? If detected - `znotes` shortcut added.\n\n```sh\nif [[ -d ~/.virtualenvs/project_notes ]]; then\n\nalias znotes='workon project_notes \u0026\u0026 cd ${ZNOTES_PATH-~/z_personal_notes} \u0026\u0026 jupyter lab'\n\nfi\n```\n\n\n\n# Windows syntethic sugar\n\nalias 'startdot'='xdg-open .'\n\n\n# Windows WSL pervertions\n\nIf you want ssh service to be auto started on windows boot, you can create Windows Task Scheduler/Action -\n\n```\nRun when system startup\n\nRun whether user is logged on or not. Save Password !!\n\n%windir%\\System32\\bash.exe\n\n-c \"sudo service ssh start\"\n```\n\nIf for some reason you do not know sudo password for your wsl user (sic!), use\n\n```\nwsl --user root\n```\n\nto get root session for wsl, and than\n\n```\npasswd user\n```\n\nwhere `user` is your wsl user\n\n\n## Connect Nitrokey / Yubikey device inside WSL\n\nUse brilliant https://github.com/dorssel/usbipd-win/releases\n\n1. List all of the USB devices connected to Windows by opening PowerShell in _administrator_ mode and entering the following command.\nOnce the devices are listed, select and copy the bus ID of the device you’d like to attach to WSL.\n\n```shell\nusbipd list\n```\n\n2. Before attaching the USB device, the command `usbipd bind` must be used to share the device, allowing it to be attached to WSL.\nThis requires administrator privileges. Select the bus ID of the device you would like to use in WSL and run the following command.\n After running the command, verify that the device is shared using the command `usbipd list` again.\n\n```shell\nusbipd bind --busid 4-4\n```\n\n3. To attach the USB device, run the following command. (You no longer need to use an elevated administrator prompt.) Ensure that a WSL command prompt is open in order to keep the WSL 2 lightweight VM active.\n\nNote that as long as the USB device is attached to WSL, it cannot be used by Windows. Once attached to WSL, the USB device can be used by any distribution running as WSL 2.\nVerify that the device is attached using `usbipd list`. From the WSL prompt, run `lsusb` to verify that the USB device is listed and can be interacted with using Linux tools.\n\n```\nusbipd attach --wsl --busid \u003cbusid\u003e\n```\n\n4. Open Ubuntu (or your preferred WSL command line) and list the attached USB devices using the command:\n\n\n```\nlsusb\n```\n\nYou should see the device you just attached and be able to interact with it using normal Linux tools. Depending on your application, you may need to configure udev rules to allow non-root users to access the device.\n\n5. Once you are done using the device in WSL, you can either physically disconnect the USB device or run this command from PowerShell:\n\n```shell\nusbipd detach --busid \u003cbusid\u003e\n```\n\n## Upgrade nitrokey version, dirty\n\n```sh\nnitropy nk3 reboot --bootloader\nnitropy nk3 list\n# output should include Nitrokey 3 Bootloader followed by the UUID\nnitropy nk3 update\n```\n\n\n# Anything locally specific?\n\nAdd .zshrc.local - it gets parsed.\n\n```sh\nif [[ -f ${HOME}/.zshrc.local ]]; then source ${HOME}/.zshrc.local; fi\n```\n\n# Additional tools installable via make \u003caction\u003e\n\nKubernetes: ksonnet, stern\n\nMultipurpose deployment generators:  kapitan\n\nAWS EKS  heptio-authenticator-aws , eksctl\n\ndocker:  dry console tool\n\nand few more:\n\n`install-cdci-gitlab-runner`, `install-cdci-gitlab-runner-service` - helpers to debug gitlab pipelines locally\n\n`install-cdci-circleci-runner` - helper to debug circleci pipeline locally\n\n`install-console-bat` - `bat` is a `cat` on steroids with built in syntax colouring and git integration, https://github.com/sharkdp/bat\n\n`install-console-prettytyping` - a bit visualization with ping, like `pping bbc.com`\n\n`install-console-fzf` - A command-line fuzzy finder  https://github.com/junegunn/fzf , which extremely cool integrates into the shell ctrl-R, giving a nicier preview. I mostly use it in ctrl-R fashion, but interactive file finder is also used from time to time, followed by ctrl+O - open in vscode\n\nIn order to configure zsh integration - `zsh-fzh` action of the makefile.\n\n`install-console-diffsofancy` - for me, better diff-er for git   https://github.com/so-fancy/diff-so-fancy\n\n`install-console-fd` - quickier file finder (kind of fzf), syntax: fd PATTERN instead of find -iname '*PATTERN*'.  https://github.com/sharkdp/fd\n\n\n`install-console-ripgrep` - ripgrep is a line-oriented search tool that recursively searches your current directory for a regex pattern while respecting your gitignore rules  https://github.com/BurntSushi/ripgrep\n\n`install-console-glances` -   Glances is a cross-platform monitoring tool which aims to present a large amount of monitoring information through a curses or Web based interface. The information dynamically adapts depending on the size of the user interface.  https://github.com/nicolargo/glances\n\n`install-console-tldr` - community driven help on commands, usually provides more examples. Cool when you are not on your native linux distribution\n\n`install-console-ncdu` - simply answers, where space goes, per directory.  https://dev.yorhel.nl/ncdu\n\n```makefile\nswiss-knife: swiss-fzf swiss-console swiss-ops swiss-zsh fonts-swiss-knife\n\t@echo OK\n\nswiss-fzf: zsh-fzf-repo install-console-fzf zsh-fzf\n\t@echo FZF OK\n\nswiss-docker: install-docker-dry install-docker-machine\n\t@echo docker ok\n\nswiss-console: install-console-bat install-console-prettytyping install-console-diffsofancy install-console-fd install-console-ripgrep install-console-ncdu install-console-yq install-ngrok install-direnv\n\t@echo console ok\n\nswiss-console-python: install-console-glances\n\t@echo python based console tools ok\n\nswiss-ops: install-hashicorp-terraform install-terraform-docs install-hashicorp-vault install-hashicorp-packer\n\t@echo ops tools ok\n\t@echo if you need reverse engineering consider make install-terraformer\n\nswiss-k8s: install-k8s-ksonnet install-k8s-stern install-k8s-helm3-fixed install-k8s-deepmind-kapitan install-k8s-kubectl-ubuntu install-k8s-kubefwd install-k8s-kubeval install-k8s-kubeval install-k8s-rakkess install-k8s-popeye install-k8s-polaris install-k8s-kubespy install-k8s-vmware-octant\n\t@echo k8s tools ok\n\nswiss-zsh: zsh-alias-tips fonts-awesome-terminal-fonts fonts-source-code-pro fonts-source-code-pro-patched\n\t@echo zsh extras ok\n\nswiss-aws:  install-aws-key-importer install-aws-myaws\n\t@echo aws tools added\n\n\n\n# ZSH\nzsh-fzf-repo:\n\trm -rf ~/.fzf\n\tgit clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf\n# /ZSH\n\n\n# CD CI local runners\n\ninstall-cdci-gitlab-runner:\n\tsudo curl -sLo /usr/local/bin/gitlab-runner https://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-linux-amd64\n\tsudo chmod +x /usr/local/bin/gitlab-runner\n\ninstall-cdci-gitlab-runner-service:\n\tsudo curl -sLo /usr/local/bin/gitlab-runner https://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-linux-amd64\n\tsudo chmod +x /usr/local/bin/gitlab-runner\n\tsudo useradd --comment 'GitLab Runner' --create-home gitlab-runner --shell /bin/bash\n\tsudo gitlab-runner start\n\ninstall-cdci-circleci-runner:\n#\tcurl -sLo /tmp/circleci.tar.gz https://github.com/CircleCI-Public/circleci-cli/releases/download/v0.1.10993/circleci-cli_0.1.10993_linux_amd64.tar.gz\n\tcurl -sLo /tmp/circleci.tar.gz https://github.com/CircleCI-Public/circleci-cli/releases/download/v$(shell curl -s https://api.github.com/repos/CircleCI-Public/circleci-cli/releases/latest | grep tag_name | cut -d '\"' -f 4 | cut -c 2-)/circleci-cli_$(shell curl -s https://api.github.com/repos/CircleCI-Public/circleci-cli/releases/latest | grep tag_name | cut -d '\"' -f 4 | cut -c 2-)_linux_amd64.tar.gz\n\ttar -xvzf /tmp/circleci.tar.gz -C /tmp\n\trm -rf /tmp/circleci-cli || true\n\tcd /tmp \u0026\u0026 mv circleci-cli_* circleci-cli\n\tmv /tmp/circleci-cli/circleci ~/dotfiles/bin/circleci\n\tchmod +x ~/dotfiles/bin/circleci\n\n\n# /CD CI local runners\n\n\n# CONSOLE TOOLS\n\ninstall-tmuxinator:\n\tgem install tmuxinator\n\n# jsonnet processing tool\ninstall-console-jsonnet: install-console-yq\n\tcurl -sLo /tmp/jsonnet.tar.gz https://github.com/google/jsonnet/releases/download/v0.14.0/jsonnet-bin-v0.14.0-linux.tar.gz\n\ttar -xvzf /tmp/jsonnet.tar.gz -C /tmp\n\tcp /tmp/jsonnet ~/dotfiles/bin\n\tcp /tmp/jsonnetfmt ~/dotfiles/bin\n\tchmod +x ~/dotfiles/bin/jsonnet ~/dotfiles/bin/jsonnetfmt\n\ninstall-mysql-skeema:\n\tcurl -sLo /tmp/skeema.tar.gz https://github.com/skeema/skeema/releases/download/v1.4.2/skeema_1.4.2_linux_amd64.tar.gz\n\ttar -xvzf /tmp/skeema.tar.gz -C /tmp\n\tcp /tmp/skeema ~/dotfiles/bin\n\tchmod +x ~/dotfiles/bin/skeema\n\ninstall-mysql-dbmate:\n\tcurl -sLo ~/dotfiles/bin/dbmate https://github.com/amacneil/dbmate/releases/download/v1.7.0/dbmate-linux-amd64\n\tchmod +x ~/dotfiles/bin/dbmate\n\n# cat with syntax highlight https://github.com/sharkdp/bat\ninstall-console-bat:\n\tcurl -sLo /tmp/bat_0.6.0_amd64.deb https://github.com/sharkdp/bat/releases/download/v0.6.0/bat_0.6.0_amd64.deb\n\tsudo dpkg -i /tmp/bat_0.6.0_amd64.deb\n\n# https://github.com/jesseduffield/lazygit\ninstall-console-lazygit:\n\tcurl -sLo /tmp/lazygit.tar.gz https://github.com/jesseduffield/lazygit/releases/download/v0.20.4/lazygit_0.20.4_Linux_x86_64.tar.gz\n\ttar -xvzf /tmp/lazygit.tar.gz -C /tmp\n\tmv /tmp/lazygit ~/dotfiles/bin\n\n# http://lnav.org/\ninstall-console-logreader-lnav:\n\tcurl -sLo /tmp/lnav.zip https://github.com/tstack/lnav/releases/download/v0.8.5/lnav-0.8.5-linux-64bit.zip\n\tcd /tmp \u0026\u0026 unzip lnav.zip\n\tmv /tmp/lnav-0.8.5/lnav ~/dotfiles/bin\n\tlnav -i extra\n\n# https://github.com/rcoh/angle-grinder#query-syntax\ninstall-console-logreader-agrind:\n\tcurl -sLo /tmp/agrind.tar.gz https://github.com/rcoh/angle-grinder/releases/download/v0.13.0/angle_grinder-v0.13.0-x86_64-unknown-linux-musl.tar.gz\n\ttar -xvzf /tmp/agrind.tar.gz -C /tmp\n\tcp /tmp/agrind ~/dotfiles/bin/ag\n\tchmod +x ~/dotfiles/bin/ag\n\n# https://github.com/denilsonsa/prettyping\n# prettyping 8.8.8.8\ninstall-console-prettytyping:\n\tcurl -sLo ~/dotfiles/bin/prettyping https://raw.githubusercontent.com/denilsonsa/prettyping/master/prettyping\n\tchmod +x ~/dotfiles/bin/prettyping\n\n# https://github.com/junegunn/fzf\ninstall-console-fzf:\n\tcurl -sLo /tmp/fzf.tar.gz https://github.com/junegunn/fzf/releases/download/0.24.3/fzf-0.24.3-linux_amd64.tar.gz\n\ttar -xvzf /tmp/fzf.tar.gz -C /tmp\n\tcp /tmp/fzf ~/dotfiles/bin\n\techo \"Consider running make zsh-fzf to install zsh shell integration\"\n\n# WTF is a personal information dashboard for your terminal, developed for those who spend most of their day in the command line.\ninstall-console-wtfutil:\n\tcurl -sLo /tmp/wtf.tar.gz https://github.com/wtfutil/wtf/releases/download/v0.30.0/wtf_0.30.0_linux_amd64.tar.gz\n\ttar -xvzf /tmp/wtf.tar.gz -C /tmp\n\tcp /tmp/wtf_0.30.0_linux_amd64/wtfutil ~/dotfiles/bin/wtfutil\n\tchmod +x ~/dotfiles/bin/wtfutil\n\n# https://github.com/so-fancy/diff-so-fancy\ninstall-console-diffsofancy:\n\tcurl -sLo ~/dotfiles/bin/diff-so-fancy https://raw.githubusercontent.com/so-fancy/diff-so-fancy/master/third_party/build_fatpack/diff-so-fancy\n\tchmod +x ~/dotfiles/bin/diff-so-fancy\n\n# fd is a simple, fast and user-friendly alternative to find. https://github.com/sharkdp/fd\n# fd service\ninstall-console-fd:\n#\tcurl -sLo /tmp/fd.deb https://github.com/sharkdp/fd/releases/download/v7.1.0/fd_7.1.0_amd64.deb\n#\tsudo dpkg -i /tmp/fd.deb\n\tcurl -sLo /tmp/fd.tar.gz https://github.com/sharkdp/fd/releases/download/v8.1.1/fd-v8.1.1-x86_64-unknown-linux-gnu.tar.gz\n\ttar -xvzf /tmp/fd.tar.gz -C /tmp\n\tcp /tmp/fd-v8.1.1-x86_64-unknown-linux-gnu/fd* ~/dotfiles/bin\n\tchmod +x ~/dotfiles/bin/fd\n\n# ripgrep recursively searches directories for a regex pattern https://github.com/BurntSushi/ripgrep\n# rg -n -w '[A-Z]+_SUSPEND'\ninstall-console-ripgrep:\n\tcurl -sLo /tmp/ripgrep.deb https://github.com/BurntSushi/ripgrep/releases/download/0.9.0/ripgrep_0.9.0_amd64.deb\n\tsudo dpkg -i /tmp/ripgrep.deb\n\n# Glances is a cross-platform monitoring tool which aims\n# to present a large amount of monitoring information\ninstall-console-glances:\n\tsudo pip install -U glances\n\n# https://tldr.sh/\ninstall-console-tldr:\n\tnpm install -g tldr\n\n# disk usage analyzer with an ncurses interface\ninstall-console-ncdu:\n\tsudo apt-get install ncdu\n\n# jql for yml\ninstall-console-yq:\n\tcurl -sLo ~/dotfiles/bin/yq https://github.com/mikefarah/yq/releases/download/2.2.1/yq_linux_amd64\n\tchmod +x ~/dotfiles/bin/yq\n\ninstall-ngrok:\n\tcurl -sLo ~/dotfiles/bin/ngrok.zip https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip\n\tcd ~/dotfiles/bin/ \u0026\u0026 unzip ngrok.zip\n\trm ~/dotfiles/bin/ngrok.zip\n\n# /CONSOLE TOOLS\n\n# WORKSPACE TOOLS\n\ninstall-workspace-github-release:\n\tmkdir -p /tmp/gh-release\n\tcurl -sLo /tmp/gh-release/linux-amd64-github-release.tar.bz2 \"https://github.com/aktau/github-release/releases/download/v0.7.2/linux-amd64-github-release.tar.bz2\"\n\tcd /tmp/gh-release \u0026\u0026 tar jxf linux-amd64-github-release.tar.bz2 \u0026\u0026 mv /tmp/gh-release/bin/linux/amd64/github-release ~/dotfiles/bin\n\trm -rf /tmp/gh-release\n\ninstall-workspace-toggle-cli:\n\tsudo pip install togglCli\n\ninstall-slack-term:\n\tcurl -sLo ~/dotfiles/bin/slack-term https://github.com/erroneousboat/slack-term/releases/download/v0.4.1/slack-term-linux-amd64\n\tchmod +x ~/dotfiles/bin/slack-term\n\ninstall-direnv:\n\tcurl -sLo ~/dotfiles/bin/direnv https://github.com/direnv/direnv/releases/download/v2.19.1/direnv.linux-amd64\n\tchmod +x ~/dotfiles/bin/direnv\n\n# https://github.com/VirtusLab/git-machete\n# https://plugins.jetbrains.com/plugin/14221-git-machete\ninstall-git-machete:\n\tcurl -L https://raw.githubusercontent.com/VirtusLab/git-machete/master/completion/git-machete.completion.zsh -o ~/dotfiles/completions/git-machete.completion.zsh\n\tsudo snap install --classic git-machete\n\n# https://pre-commit.com/\ninstall-git-precommit:\n\tpip3 install pre-commit\n\t#conda install -c conda-forge pre-commit\n\tgit config --global init.templateDir ~/.git-template\n\tpre-commit init-templatedir ~/.git-template\n\n# /WORKSPACE TOOLS\n\n\n# DOCKER TOOLS\n\n\ninstall-docker-machine:\n\tcurl -sLo ~/dotfiles/bin/docker-machine https://github.com/docker/machine/releases/download/v0.16.0/docker-machine-Linux-x86_64\n\tchmod +x ~/dotfiles/bin/docker-machine\n\n# docker console manager\ninstall-docker-dry:\n\tcurl -sLo ~/dotfiles/bin/dry https://github.com/moncho/dry/releases/download/v0.9-beta.4/dry-linux-amd64\n\tchmod +x ~/dotfiles/bin/dry\n\n# inspection of the docker containers\ninstall-docker-dive:\n\tcurl -sLo /tmp/dive.deb https://github.com/wagoodman/dive/releases/download/v0.9.2/dive_0.9.2_linux_amd64.deb\n\tsudo apt install /tmp/dive.deb\n\n# https://dockersl.im\ninstall-docker-slim:\n\tcurl -sLo /tmp/docker-slim.tar.gz https://downloads.dockerslim.com/releases/1.29.0/dist_linux.tar.gz\n\ttar -xvzf /tmp/docker-slim.tar.gz -C /tmp\n\tmv /tmp/dist_linux/* ~/dotfiles/bin\n\n# templating utility for easy config patching using bash variables syntax\ninstall-docker-envplate:\n\tcurl -sLo ~/dotfiles/bin/ep https://github.com/kreuzwerker/envplate/releases/download/v0.0.8/ep-linux \u0026\u0026 chmod +x ~/dotfiles/bin/ep\n\n# /DOCKER TOOLS\n\n\n# KUBERNETES\n# includes upgrade, disables k3s by default as you don't need it up on dev notebook\ninstall-k3s-local:\n\tcurl -sfL https://get.k3s.io | sh -\n\tsudo systemctl disable k3s\n# https://github.com/alexellis/k3sup/\ninstall-k3s-up:\n\tcurl -sLo ~/dotfiles/bin/k3sup https://github.com/alexellis/k3sup/releases/download/0.9.2/k3sup\n\tchmod +x ~/dotfiles/bin/k3sup\n\ninstall-k8s-ksonnet:\n\tcurl -sLo /tmp/ks_linux_amd64.tar.gz https://github.com/ksonnet/ksonnet/releases/download/v0.10.1/ks_0.10.1_linux_amd64.tar.gz\n\ttar -xvzf /tmp/ks_linux_amd64.tar.gz -C /tmp\n\tcp /tmp/ks_0.10.1_linux_amd64/ks ~/dotfiles/bin\n\n# tail utility for kubernetes\ninstall-k8s-stern:\n\tcurl -sLo ~/dotfiles/bin/stern \"https://github.com/wercker/stern/releases/download/1.11.0/stern_linux_amd64\"\n\tchmod +x ~/dotfiles/bin/stern\n\n# helm version considered stable\ninstall-k8s-helm3-fixed:\n\tmkdir -p /tmp/helm\n\tcurl -sLo /tmp/helm/helm.tar.gz \"https://get.helm.sh/helm-v3.1.0-linux-amd64.tar.gz\"\n\tcd /tmp/helm \u0026\u0026 tar -xzf helm.tar.gz \u0026\u0026 mv /tmp/helm/linux-amd64/helm ~/dotfiles/bin/helm\n\trm -rf /tmp/helm\n\n# latest released helm\ninstall-k8s-helm-latest:\n\tmkdir -p /tmp/helm\n\tcurl -sLo /tmp/helm/helm.tar.gz \"https://get.helm.sh/helm-$(shell curl -s https://api.github.com/repos/helm/helm/releases/latest | grep tag_name | cut -d '\"' -f 4)-linux-amd64.tar.gz\"\n\tcd /tmp/helm \u0026\u0026 tar -xzf helm.tar.gz \u0026\u0026 mv /tmp/helm/linux-amd64/helm ~/dotfiles/bin/helm\n\trm -rf /tmp/helm\n\ninstall-k8s-deepmind-kapitan:\n\tpip3 install --user --upgrade git+https://github.com/deepmind/kapitan.git  --process-dependency-links\n\ninstall-k8s-heptio-authenticator-aws:\n\tcurl -o ~/dotfiles/bin/heptio-authenticator-aws https://amazon-eks.s3-us-west-2.amazonaws.com/1.10.3/2018-06-05/bin/linux/amd64/heptio-authenticator-aws\n\tcurl -o ~/dotfiles/bin/heptio-authenticator-aws.md5 https://amazon-eks.s3-us-west-2.amazonaws.com/1.10.3/2018-06-05/bin/linux/amd64/heptio-authenticator-aws.md5\n\tchmod +x ~/dotfiles/bin/heptio-authenticator-aws\n\ninstall-k8s-aws-iam-authenticator:\n\tcurl -o ~/dotfiles/bin/aws-iam-authenticator https://amazon-eks.s3.us-west-2.amazonaws.com/1.18.8/2020-09-18/bin/linux/amd64/aws-iam-authenticator\n\tchmod +x ~/dotfiles/bin/aws-iam-authenticator\n\ninstall-k8s-weaveworks-eksctl:\n\tcurl --silent --location \"https://github.com/weaveworks/eksctl/releases/download/latest_release/eksctl_Linux_amd64.tar.gz\" | tar xz -C /tmp\n\tmv /tmp/eksctl ~/dotfiles/bin\n\ninstall-k8s-kubectl-ubuntu:\n\tsudo apt-get update \u0026\u0026 sudo apt-get install -y apt-transport-https\n\tcurl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -\n\tsudo touch /etc/apt/sources.list.d/kubernetes.list\n\techo \"deb http://apt.kubernetes.io/ kubernetes-xenial main\" | sudo tee -a /etc/apt/sources.list.d/kubernetes.list\n\tsudo apt-get update\n\tsudo apt-get install -y kubectl\n# terminal UI to interact with your Kubernetes\ninstall-k8s-k9s:\n\tmkdir -p /tmp/k9s\n\tcurl -sLo /tmp/k9s/k9s.tar.gz https://github.com/derailed/k9s/releases/download/v0.22.1/k9s_Linux_x86_64.tar.gz\n\tcd /tmp/k9s \u0026\u0026 tar -xzf k9s.tar.gz \u0026\u0026 mv /tmp/k9s/k9s ~/dotfiles/bin/\n\tchmod +x ~/dotfiles/bin/k9s\n\trm -rf /tmp/k9s\n\n# kubie is an alternative to kubectx, kubens and the k on prompt modification script. It offers context switching, namespace switching and prompt modification\n# in a way that makes each shell independent from others. It also has support for split configuration files, meaning it can load Kubernetes contexts from\n# multiple files. You can configure the paths where kubie will look for context\ninstall-k8s-kubie:\n\tcurl -J -L -o ~/dotfiles/bin/kubie https://github.com/sbstp/kubie/releases/download/v0.9.1/kubie-linux-amd64\n\tchmod +x ~/dotfiles/bin/kubie\n\n# https://github.com/txn2/kubefwd/\n# Bulk port forwarding Kubernetes services for local development.\n# https://imti.co/kubernetes-port-forwarding/\ninstall-k8s-kubefwd:\n\tcurl -sLo /tmp/kubefwd.deb https://github.com/txn2/kubefwd/releases/download/1.12.0/kubefwd_amd64.deb\n\tsudo apt install /tmp/kubefwd.deb\n\n# https://github.com/instrumenta/kubeval/\ninstall-k8s-kubeval:\n\tcurl -sLo /tmp/kubeval.tar.gz https://github.com/instrumenta/kubeval/releases/download/0.14.0/kubeval-linux-amd64.tar.gz\n\ttar -xvzf /tmp/kubeval.tar.gz -C /tmp\n\tcp /tmp/kubeval ~/dotfiles/bin\n\tchmod +x ~/dotfiles/bin/kubeval\n\n# https://github.com/vmware-tanzu/octant/\n# Kubernetes dashboard by VMWare\ninstall-k8s-vmware-octant:\n\tcurl -sLo /tmp/octant.deb https://github.com/vmware-tanzu/octant/releases/download/v0.10.2/octant_0.10.2_Linux-64bit.deb\n\tsudo apt install /tmp/octant.deb\n\techo use octant --listener-addr 0.0.0.0:7777 to listen remotely\n\n# https://github.com/corneliusweig/rakkess\n# Review Access - kubectl plugin to show an access matrix for k8s server resources\ninstall-k8s-rakkess:\n\tcurl -Lo /tmp/rakkess.tar.gz https://github.com/corneliusweig/rakkess/releases/download/v0.4.5/rakkess-amd64-linux.tar.gz \u0026\u0026 \\\n\ttar -xvzf /tmp/rakkess.tar.gz -C /tmp\n\tcd /tmp \u0026\u0026 mv rakkess-amd64-linux ~/dotfiles/bin/rakkess\n\tchmod +x ~/dotfiles/bin/rakkess\n\n# https://github.com/derailed/popeye\n# A Kubernetes cluster resource sanitizer\ninstall-k8s-popeye:\n\tcurl -sLo /tmp/popeye.tar.gz https://github.com/derailed/popeye/releases/download/$(shell curl -s https://api.github.com/repos/derailed/popeye/releases/latest | grep tag_name | cut -d '\"' -f 4)/popeye_Linux_x86_64.tar.gz\n\ttar -xvzf /tmp/popeye.tar.gz -C /tmp\n\tcp /tmp/popeye ~/dotfiles/bin\n\tchmod +x ~/dotfiles/bin/popeye\n\n#  https://github.com/FairwindsOps/polaris\n#  Validation of best practices in your Kubernetes clusters https://www.fairwinds.com/polaris\ninstall-k8s-polaris:\n\tcurl -sLo /tmp/polaris.tar.gz https://github.com/FairwindsOps/polaris/releases/download/0.6.0/polaris_0.6.0_Linux_x86_64.tar.gz\n\ttar -xvzf /tmp/polaris.tar.gz -C /tmp\n\tcp /tmp/polaris ~/dotfiles/bin\n\tchmod +x ~/dotfiles/bin/polaris\n\techo with KUBECONFIG set, polaris --dashboard --dashboard-port 8080\n\techo you can also install inside cluster:\n\techo kubectl apply -f https://github.com/fairwindsops/polaris/releases/latest/download/dashboard.yaml\n\techo kubectl port-forward --namespace polaris svc/polaris-dashboard 8080:80\n\n# https://github.com/pulumi/kubespy\n# Tools for observing Kubernetes resources in real time, powered by Pulumi\ninstall-k8s-kubespy:\n#\tcurl -sLo /tmp/kubespy.tar.gz https://github.com/pulumi/kubespy/releases/download/v0.5.0/kubespy-linux-amd64.tar.gz\n\tcurl -sLo /tmp/kubespy.tar.gz https://github.com/pulumi/kubespy/releases/download/$(shell curl -s https://api.github.com/repos/pulumi/kubespy/releases/latest | grep tag_name | cut -d '\"' -f 4)/kubespy-$(shell curl -s https://api.github.com/repos/pulumi/kubespy/releases/latest | grep tag_name | cut -d '\"' -f 4)-linux-amd64.tar.gz\n\ttar -xvzf /tmp/kubespy.tar.gz -C /tmp\n\trm ~/dotfiles/bin/kubectl-spy || true\n\tcp /tmp/kubespy ~/dotfiles/bin\n\tln -s ~/dotfiles/bin/kubespy  ~/dotfiles/bin/kubectl-spy\n\n# https://skaffold.dev/\ninstall-k8s-skaffold:\n\tcurl -Lo ~/dotfiles/bin/skaffold https://storage.googleapis.com/skaffold/releases/latest/skaffold-linux-amd64\n\tchmod +x ~/dotfiles/bin/skaffold\n\ninstall-k8s-kubebox:\n\tcurl -Lo ~/dotfiles/bin/kubebox https://github.com/astefanutti/kubebox/releases/download/v0.8.0/kubebox-linux\n\tchmod +x ~/dotfiles/bin/kubebox\n\techo Do not forget to install cadvisor, for example kubectl apply -f https://raw.github.com/astefanutti/kubebox/master/cadvisor.yaml\n\n# https://github.com/ksync/ksync/\n# It transparently updates containers running on the cluster from your local checkout.\n# docker run -v /foo:/bar =\u003e  ksync create --pod=my-pod local_directory remote_directory\n# ksync watch\ninstall-k8s-ksync:\n\tcurl -Lo ~/dotfiles/bin/ksync https://github.com/ksync/ksync/releases/download/0.4.5/ksync_linux_amd64\n\tchmod +x ~/dotfiles/bin/ksync\n\nkube-dashboard-normal-install:\n\tkubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard.yaml\n\nkube-dashboard-insecure-install:\n\tkubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/alternative/kubernetes-dashboard.yaml\n\techo possible to grant admin via  kubectl create -f ~/dotfiles/bin/k8s/dashboard-admin.yaml\n\techo run kubectl proxy followed with http://localhost:8001/api/v1/namespaces/kube-system/services/http:kubernetes-dashboard:/proxy/#!/overview?namespace=default\n\ninstall-openshift-oc:\n\tcurl -sLo /tmp/openshift.tar.gz https://github.com/openshift/origin/releases/download/v3.11.0/openshift-origin-client-tools-v3.11.0-0cbc58b-linux-64bit.tar.gz\n\ttar -xvzf /tmp/openshift.tar.gz -C /tmp\n\tmv /tmp/openshift-origin-client-tools-*  /tmp/openshift-origin-client-tools\n\tcp /tmp/openshift-origin-client-tools/oc ~/dotfiles/bin\n\ttype kubectl \u003e/dev/null || /tmp/openshift-origin-client-tools/oc ~/dotfiles/bin\n\techo \"If there were no kubectl in path, one was installed from oc distro.\"\n\techo \"In other case global is used. Please check carefully\"\n\ninstall-helm-common-repos:\n\thelm repo add incubator http://storage.googleapis.com/kubernetes-charts-incubator || true\n\thelm repo add gitlab https://charts.gitlab.io || true\n\thelm repo add eks https://aws.github.io/eks-charts\n\thelm repo add bitnami https://charts.bitnami.com/bitnami\n\nzsh-kubetail:\n\trm -rf ~/.oh-my-zsh/custom/plugins/kubetail || true\n\tgit clone https://github.com/johanhaleby/kubetail.git ~/.oh-my-zsh/custom/plugins/kubetail\n\n# /KUBERNETES\n\n# IGNITE\ninstall-weaveworks-ignite:\n\tcurl -fLo ~/dotfiles/bin/ignite https://github.com/weaveworks/ignite/releases/download/v0.4.1/ignite\n\tchmod +x ~/dotfiles/bin/ignite\n\t# eliminate when ignite adds support for sudoer\n\tsudo cp /home/slavko/dotfiles/bin/ignite /usr/local/bin\nremove-weaveworks-ignite:\n\t# Force-remove all running VMs\n\tsudo ignite ps -q | xargs sudo ignite rm -f\n\t# Remove the data directory\n\tsudo rm -r /var/lib/firecracker\n\t# Remove the Ignite binary\n\trm ~/dotfiles/bin/ignite\n# /IGNITE\n\nworkplace-init:\n\t./workplace_init.sh\n\nworkplace-init-mongo:\n\t./workplace_mongo_init.sh\n\nworkplace-sourcecodepro:\n\t./workplace_source_code_pro.sh\n\ninit:\n\t./init.sh\n\ninit_simple:\n\t./init_simple.sh\n\n\n# GNOME specific extensions\n\ngnome-dropdown-terminal:\n\trm -rf /tmp/gnome-dropdown-terminal\n\tgit clone https://github.com/zzrough/gs-extensions-drop-down-terminal /tmp/gnome-dropdown-terminal\n\tmv /tmp/gnome-dropdown-terminal/drop-down-terminal@gs-extensions.zzrough.org ~/.local/share/gnome-shell/extensions/drop-down-terminal@gs-extensions.zzrough.org\n\ngnome-dash-to-dock:\n\trm -rf /tmp/dash-to-dock\n\tgit clone https://github.com/micheleg/dash-to-dock.git /tmp/dash-to-dock\n\tcd /tmp/dash-to-dock \u0026\u0026 make \u0026\u0026 make install\n\ngnome-unite-shell:\n\trm -rf /tmp/gnome-unite-shell\n\tgit clone https://github.com/hardpixel/unite-shell.git /tmp/gnome-unite-shell\n\tmv /tmp/gnome-unite-shell/unite@hardpixel.eu ~/.local/share/gnome-shell/extensions/unite@hardpixel.eu\n\ngnome-shell-system-monitor:\n\tsudo apt-get install gir1.2-gtop-2.0 gir1.2-networkmanager-1.0  gir1.2-clutter-1.0\n\trm -rf /tmp/gnome-shell-system-monitor-applet\n\tgit clone https://github.com/paradoxxxzero/gnome-shell-system-monitor-applet.git /tmp/gnome-shell-system-monitor-applet\n\tmv /tmp/gnome-shell-system-monitor-applet/system-monitor@paradoxxx.zero.gmail.com ~/.local/share/gnome-shell/extensions/system-monitor@paradoxxx.zero.gmail.com\n\n# Check issue  https://github.com/jwendell/gnome-shell-extension-timezone/issues/41\ngnome-shell-extension-timezone:\n\tgit clone https://github.com/jwendell/gnome-shell-extension-timezone.git ~/.local/share/gnome-shell/extensions/timezone@jwendell\n\tgnome-shell-extension-tool -e timezone@jwendell\n\ngnome-shell-window-corner-preview:\n\trm -rf /tmp/window-corner-preview\n\tgit clone https://github.com/medenagan/window-corner-preview.git /tmp/window-corner-preview\n\tmv /tmp/window-corner-preview/window-corner-preview@fabiomereu.it ~/.local/share/gnome-shell/extensions/window-corner-preview@fabiomereu.it\n\ngnome-shell-gnome-extension-quicktoggler:\n\trm -rf /tmp/gnome-extension-quicktoggler\n\tgit clone https://github.com/Shihira/gnome-extension-quicktoggler.git /tmp/gnome-extension-quicktoggler\n\tmv /tmp/gnome-extension-quicktoggler ~/.local/share/gnome-shell/extensions/quicktoggler@shihira.github.com\n# /GNOME specific extensions\n\nzsh-fzf:\n\trm -rf ~/.oh-my-zsh/custom/plugins/fzf || true\n\tgit clone https://github.com/junegunn/fzf.git ~/.oh-my-zsh/custom/plugins/fzf\n\t~/.oh-my-zsh/custom/plugins/fzf/install --bin\n\tmkdir -p ~/.oh-my-zsh/custom/plugins/fzf-zsh\n\tcp ~/dotfiles/helpers/fzf-zsh.plugin.zsh ~/.oh-my-zsh/custom/plugins/fzf-zsh\n\n# +plugins=(... alias-tips)\nzsh-alias-tips:\n\tgit clone https://github.com/djui/alias-tips.git ~/.oh-my-zsh/custom/plugins/alias-tips\n\n\n# TERRAFORM\n\ninstall-terraform-ing:\n\tgem install terraforming\n\ninstall-terraform-terraspace:\n\tgem install terraspace\n\n#https://github.com/GoogleCloudPlatform/terraformer\ninstall-terraformer:\n\tcurl -LO https://github.com/GoogleCloudPlatform/terraformer/releases/download/$(shell curl -s https://api.github.com/repos/GoogleCloudPlatform/terraformer/releases/latest | grep tag_name | cut -d '\"' -f 4)/terraformer-all-linux-amd64\n\tchmod +x terraformer-all-linux-amd64\n\tmv terraformer-all-linux-amd64 ~/dotfiles/bin/terraformer\n\tchmod +x ~/dotfiles/bin/terraformer\n\n\tcurl -LO https://github.com/GoogleCloudPlatform/terraformer/releases/download/$(shell curl -s https://api.github.com/repos/GoogleCloudPlatform/terraformer/releases/latest | grep tag_name | cut -d '\"' -f 4)/terraformer-google-linux-amd64\n\tchmod +x terraformer-google-linux-amd64\n\tmv terraformer-google-linux-amd64 ~/dotfiles/bin/terraformer_google\n\tchmod +x ~/dotfiles/bin/terraformer_google\n\n\tcurl -LO https://github.com/GoogleCloudPlatform/terraformer/releases/download/$(shell curl -s https://api.github.com/repos/GoogleCloudPlatform/terraformer/releases/latest | grep tag_name | cut -d '\"' -f 4)/terraformer-aws-linux-amd64\n\tchmod +x terraformer-aws-linux-amd64\n\tmv terraformer-aws-linux-amd64 ~/dotfiles/bin/terraformer_aws\n\tchmod +x ~/dotfiles/bin/terraformer_aws\n\n\tcurl -LO https://github.com/GoogleCloudPlatform/terraformer/releases/download/$(shell curl -s https://api.github.com/repos/GoogleCloudPlatform/terraformer/releases/latest | grep tag_name | cut -d '\"' -f 4)/terraformer-kubernetes-linux-amd64\n\tchmod +x terraformer-kubernetes-linux-amd64\n\tmv terraformer-kubernetes-linux-amd64 ~/dotfiles/bin/terraformer_kubernetes\n\tchmod +x ~/dotfiles/bin/terraformer_kubernetes\n\ninstall-terraform-docs:\n\tcurl -sLo ~/dotfiles/bin/terraform-docs https://github.com/terraform-docs/terraform-docs/releases/download/$(shell curl -s https://api.github.com/repos/terraform-docs/terraform-docs/releases/latest | grep tag_name | cut -d '\"' -f 4)/terraform-docs-$(shell curl -s https://api.github.com/repos/terraform-docs/terraform-docs/releases/latest | grep tag_name | cut -d '\"' -f 4)-linux-amd64\n\tchmod +x ~/dotfiles/bin/terraform-docs\n\ninstall-terraform-virtualbox-bridge:\n\tgo get github.com/terra-farm/terraform-provider-virtualbox\n\tmkdir -p ~/.terraform.d/plugins\n\tcp $(GOPATH)/bin/terraform-provider-virtualbox ~/.terraform.d/plugins\n\ninstall-terraform-tfschema:\n\tcurl -sLo /tmp/tfschema.tar.gz https://github.com/minamijoyo/tfschema/releases/download/v0.3.0/tfschema_0.3.0_linux_amd64.tar.gz\n\ttar -xvzf /tmp/tfschema.tar.gz -C /tmp\n\tcp /tmp/tfschema ~/dotfiles/bin\n\tchmod +x ~/dotfiles/bin/tfschema\n\n# interactive d3js-graphviz visualization for terraform graph (beta)\ninstall-terraform-blast:\n\tpip install blastradius\n\ninstall-tflint:\n\tcurl -sLo /tmp/tflint.zip https://github.com/terraform-linters/tflint/releases/download/$(shell curl -s https://api.github.com/repos/terraform-linters/tflint/releases/latest | grep tag_name | cut -d '\"' -f 4)/tflint_linux_amd64.zip\n\tcd /tmp \u0026\u0026 unzip tflint.zip\n\tmv /tmp/tflint ~/dotfiles/bin\n\tchmod +x ~/dotfiles/bin/tflint\n# /TERRAFORM\n\n\n# HASHICORP\ninstall-hashicorp-vault:\n\tcurl -sLo ~/dotfiles/bin/vault.zip \"https://releases.hashicorp.com/vault/1.0.1/vault_1.0.1_linux_amd64.zip\"\n\tcd ~/dotfiles/bin/ \u0026\u0026 unzip vault.zip \u0026\u0026 chmod +x vault \u0026\u0026 rm vault.zip\n\ninstall-hashicorp-terraform011:\n\tcurl -sLo ~/tmp/terraform.zip \"https://releases.hashicorp.com/terraform/0.11.14/terraform_0.11.14_linux_amd64.zip\"\n\tcd ~/tmp/ \u0026\u0026 unzip terraform.zip \u0026\u0026 mv terraform terraform011 \u0026\u0026 chmod +x terraform011 \u0026\u0026 rm terraform.zip \u0026\u0026 mv terraform011 ~/dotfiles/bin/\n\n\ninstall-hashicorp-terraform012:\n\tcurl -sLo ~/dotfiles/bin/terraform.zip \"https://releases.hashicorp.com/terraform/0.12.29/terraform_0.12.29_linux_amd64.zip\"\n\tcd ~/dotfiles/bin/ \u0026\u0026 unzip terraform.zip \u0026\u0026 chmod +x terraform \u0026\u0026 rm terraform.zip\n\ninstall-hashicorp-terraform:\n\tcurl -sLo ~/dotfiles/bin/terraform.zip \"https://releases.hashicorp.com/terraform/0.13.5/terraform_0.13.5_linux_amd64.zip\"\n\tcd ~/dotfiles/bin/ \u0026\u0026 unzip terraform.zip \u0026\u0026 chmod +x terraform \u0026\u0026 rm terraform.zip\n\ninstall-hashicorp-packer:\n\tcurl -sLo ~/dotfiles/bin/packer.zip \"https://releases.hashicorp.com/packer/1.6.0/packer_1.6.0_linux_amd64.zip\"\n\tcd ~/dotfiles/bin/ \u0026\u0026 unzip packer.zip \u0026\u0026 chmod +x packer \u0026\u0026 rm packer.zip\n\n\n#/HASHICORP\n\n# GO\n\ninstall-go-gimme:\n\tcurl -sL -o ~/dotfiles/bin/gimme https://raw.githubusercontent.com/travis-ci/gimme/master/gimme\n\tchmod +x ~/dotfiles/bin/gimme\n\ngo-rename:\n\tgo get golang.org/x/tools/cmd/gorename\n\ngo-eg:\n\tgo get golang.org/x/tools/cmd/eg\n\n# /GO\n\n# JAVA\n\ninstall-jenv:\n\tgit clone https://github.com/gcuisinier/jenv.git ~/.jenv\n\techo \"=================================================\"\n\techo \"Restart session, than once you have jenv\"\n\techo \"jenv enable-plugins maven\"\n\techo \"jenv enable-plugins export\"\n\techo \"======== then discover java versions:\"\n\techo \"update-alternatives --config java\"\n\techo \"======== Add java versions as\"\n\techo \"/usr/lib/jvm/java-11-openjdk-amd64/\"\n\techo \"Validate install and checking both java -version and javac -version\"\n\techo \"That should match\"\n\techo \"run 'jenv doctor' in case of issues\"\n\n# /JAVA\n\n# CLOUDS\n\ninstall-aws-key-importer:\n\tcurl -sLo ~/dotfiles/bin/aws-key-importer https://github.com/Voronenko/aws-key-importer/releases/download/0.2.0/aws-key-importer-linux-amd64\n\tchmod +x ~/dotfiles/bin/aws-key-importer\n\ninstall-aws-myaws:\n\tcurl -sLo /tmp/myaws.tar.gz https://github.com/minamijoyo/myaws/releases/download/v0.3.10/myaws_v0.3.10_linux_amd64.tar.gz\n\ttar -xvzf /tmp/myaws.tar.gz -C ~/dotfiles/bin\n\n# https://github.com/peak/s5cmd/\ninstall-aws-s5cmd:\n\tcurl -sLo /tmp/s5cmd.tar.gz https://github.com/peak/s5cmd/releases/download/v1.1.0/s5cmd_1.1.0_Linux-64bit.tar.gz\n\ttar -xvzf /tmp/s5cmd.tar.gz -C /tmp\n\tcp /tmp/s5cmd ~/dotfiles/bin\n\tchmod +x ~/dotfiles/bin/s5cmd\n\ninstall-aws-awless:\n\tcurl -sLo /tmp/awless.tar.gz https://github.com/wallix/awless/releases/download/v0.1.11/awless-linux-amd64.tar.gz\n\ttar -xvzf /tmp/awless.tar.gz -C ~/dotfiles/bin\n\tchmod +x ~/dotfiles/bin/awless\n\n# https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html\ninstall-aws-cli2:\n\tcurl \"https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip\" -o \"/tmp/awscliv2.zip\"\n\tcd /tmp \u0026\u0026 unzip awscliv2.zip\n\tcd /tmp \u0026\u0026 sudo ./aws/install\n\ninstall-ovh-nova:\n\tsudo pip install python-openstackclient\n\n# https://console.aws.amazon.com/cloudformation/designer\n# https://github.com/awslabs/aws-cfn-template-flip\ninstall-aws-cfn-template-flip:\n\tsudo pip3 install cfn-flip\n\n# / CLOUDS\n\n# ESXI\n# https://github.com/softasap/esxi-vm\ninstall-esxi-tools:\n\tcurl -sLo ~/dotfiles/bin/esxi-vm-create https://raw.githubusercontent.com/softasap/esxi-vm/master/esxi-vm-create\n\tchmod +x ~/dotfiles/bin/esxi-vm-create\n\tcurl -sLo ~/dotfiles/bin/esxi-vm-destroy https://github.com/softasap/esxi-vm/blob/master/esxi-vm-destroy\n\tchmod +x ~/dotfiles/bin/esxi-vm-destroy\n\tcurl -sLo ~/dotfiles/bin/esxi_vm_functions.py https://raw.githubusercontent.com/softasap/esxi-vm/master/esxi_vm_functions.py\n\ninstall-esxi-govc:\n\tcurl -L https://github.com/vmware/govmomi/releases/download/v0.21.0/govc_linux_amd64.gz | gunzip \u003e ~/dotfiles/bin/govc\n# /ESXI\n\nfonts-swiss-knife: fonts-init fonts-awesome-terminal-fonts fonts-source-code-pro-patched\n\tmkdir -p ~/.fonts\n\nfonts-init:\n\tsudo apt install fontconfig\n\nfonts-awesome-terminal-fonts:\n\tmkdir -p ~/.fonts\n\tcurl -sLo ~/.fonts/devicons-regular.sh \"https://raw.githubusercontent.com/gabrielelana/awesome-terminal-fonts/master/build/devicons-regular.sh\"\n\tcurl -sLo ~/.fonts/devicons-regular.ttf \"https://raw.githubusercontent.com/gabrielelana/awesome-terminal-fonts/master/build/devicons-regular.ttf\"\n\tcurl -sLo ~/.fonts/fontawesome-regular.sh \"https://raw.githubusercontent.com/gabrielelana/awesome-terminal-fonts/master/build/fontawesome-regular.sh\"\n\tcurl -sLo ~/.fonts/fontawesome-regular.ttf \"https://raw.githubusercontent.com/gabrielelana/awesome-terminal-fonts/master/build/fontawesome-regular.ttf\"\n\tcurl -sLo ~/.fonts/octicons-regular.sh \"https://raw.githubusercontent.com/gabrielelana/awesome-terminal-fonts/master/build/octicons-regular.sh\"\n\tcurl -sLo ~/.fonts/octicons-regular.ttf \"https://raw.githubusercontent.com/gabrielelana/awesome-terminal-fonts/master/build/octicons-regular.ttf\"\n\tcurl -sLo ~/.fonts/pomicons-regular.sh \"https://raw.githubusercontent.com/gabrielelana/awesome-terminal-fonts/master/build/pomicons-regular.sh\"\n\tcurl -sLo ~/.fonts/pomicons-regular.ttf \"https://raw.githubusercontent.com/gabrielelana/awesome-terminal-fonts/master/build/pomicons-regular.ttf\"\n\tfc-cache -fv ~/.fonts\n\tfc-list | grep \"FontAwesome\"\n\nfonts-source-code-pro:\n\tmkdir -p ~/.fonts\n\tcurl -sLo ~/.fonts/SourceCodeVariable-Italic.otf \"https://github.com/adobe-fonts/source-code-pro/releases/download/variable-fonts/SourceCodeVariable-Italic.otf\"\n\tcurl -sLo ~/.fonts/SourceCodeVariable-Italic.ttf \"https://github.com/adobe-fonts/source-code-pro/releases/download/variable-fonts/SourceCodeVariable-Italic.ttf\"\n\tcurl -sLo ~/.fonts/SourceCodeVariable-Roman.otf \"https://github.com/adobe-fonts/source-code-pro/releases/download/variable-fonts/SourceCodeVariable-Roman.otf\"\n\tcurl -sLo ~/.fonts/SourceCodeVariable-Roman.ttf \"https://github.com/adobe-fonts/source-code-pro/releases/download/variable-fonts/SourceCodeVariable-Roman.ttf\"\n\tfc-cache -fv ~/.fonts\n\tfc-list | grep \"Source Code Pro\"\nfonts-source-code-pro-patched:\n\tmkdir -p ~/.fonts\n\tcurl -sLo ~/.fonts/Sauce_Code_Pro_Nerd_Font_Complete_Mono_Windows_Compatible.ttf \"https://github.com/ryanoasis/nerd-fonts/blob/master/patched-fonts/SourceCodePro/Regular/complete/Sauce%20Code%20Pro%20Nerd%20Font%20Complete%20Mono%20Windows%20Compatible.ttf\"\n\tcurl -sLo ~/.fonts/Sauce_Code_Pro_Nerd_Font_Complete_Mono.ttf \"https://github.com/ryanoasis/nerd-fonts/blob/master/patched-fonts/SourceCodePro/Regular/complete/Sauce%20Code%20Pro%20Nerd%20Font%20Complete%20Mono.ttf\"\n\tcurl -sLo ~/.fonts/Sauce_Code_Pro_Nerd_Font_Complete_Windows_Compatible.ttf \"https://github.com/ryanoasis/nerd-fonts/blob/master/patched-fonts/SourceCodePro/Regular/complete/Sauce%20Code%20Pro%20Nerd%20Font%20Complete%20Windows%20Compatible.ttf\"\n\tcurl -sLo ~/.fonts/Sauce_Code_Pro_Nerd_Font_Complete.ttf \"https://github.com/ryanoasis/nerd-fonts/blob/master/patched-fonts/SourceCodePro/Regular/complete/Sauce%20Code%20Pro%20Nerd%20Font%20Complete.ttf\"\n\tfc-cache -fv ~/.fonts\n\tfc-list | grep \"Source Code\"\n\nz-clean-downloads:\n\trm ~/Downloads/*.rdp\n\n\n# LAPTOP\n# Free terminal based CPU monitoring tool for Linux\nthrottling-stui:\n\tsudo pip install s-tui\n\ninstall-vmware-ovftool:\n\tcurl -sLo /tmp/ovftool.bundle https://raw.githubusercontent.com/smarunich/avitoolbox/master/files/VMware-ovftool-4.3.0-7948156-lin.x86_64.bundle\n\tmd5sum /tmp/ovftool.bundle\n\t@echo d0dd9006d720a26278b94591a4111457   ovftool.bundle\n\tchmod +x /tmp/ovftool.bundle\n\techo sudo /tmp/ovftool.bundle --eulas-agreed --required --console\n\n# interactive https proxy https://mitmproxy.org/\ninstall-mitmproxy-org:\n\tcurl -sLo /tmp/mitmproxy.tar.gz https://snapshots.mitmproxy.org/4.0.4/mitmproxy-4.0.4-linux.tar.gz\n\ttar -xvzf /tmp/mitmproxy.tar.gz -C ~/dotfiles/bin\n\n\n# /LAPTOP\n\n\n# AWS\n\n#https://aws.amazon.com/serverless/sam/\ninstall-aws-sam-cli:\n\tpip install --user aws-sam-cli\n\n#https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-working-with-install-plugin.html#install-plugin-linux\ninstall-aws-session-manager-plugin:\n\tcurl \"https://s3.amazonaws.com/session-manager-downloads/plugin/latest/ubuntu_64bit/session-manager-plugin.deb\" -o \"/tmp/session-manager-plugin.deb\"\n\tsudo dpkg -i session-manager-plugin.deb\n\n# /AWS\n\n# SECURITY\n\nsec-nmap-sandmap:\n\tsudo apt-get install proxychains\n\trm -rf /tmp/sandmap \u0026\u0026 cd /tmp \u0026\u0026 git clone --recursive https://github.com/trimstray/sandmap\n\tcd /tmp/sandmap \u0026\u0026 sudo ./setup.sh install\n\techo use sandmap\n# /SECURITY\n\n\n# DOCUMENTATION\n\n# https://www.mkdocs.org/\ninstall-mkdocs:\n\tpip install mkdocs\n\n# Small markdown to confluence\ninstall-confluence-mark:\n\tcurl -sLo /tmp/confluencemark.tar.gz https://github.com/kovetskiy/mark/releases/download/3.1/mark_3.1_Linux_x86_64.tar.gz\n\ttar -xvzf /tmp/confluencemark.tar.gz -C /tmp\n\tcp /tmp/mark ~/dotfiles/bin\n\tchmod +x ~/dotfiles/bin/mark\n\n#/ DOCUMENTATION\n\n# GARBAGE\n\ninstall-traefik1:\n\tcurl -sLo ~/dotfiles/bin/traefik1 https://github.com/containous/traefik/releases/download/v1.7.19/traefik_linux-amd64\n\tchmod +x ~/dotfiles/bin/traefik1\n\ninstall-traefik:\n\tcurl -sLo /tmp/traefik2.tar.gz https://github.com/containous/traefik/releases/download/v2.1.1/traefik_v2.1.1_linux_amd64.tar.gz\n\ttar -xvzf /tmp/traefik2.tar.gz -C /tmp\n\tmv /tmp/traefik ~/dotfiles/bin/traefik\n\tchmod +x ~/dotfiles/bin/traefik\n\n# / GARBAGE\n\n# PHP\n\ninstall-phpmd:\n\tcurl -sLo ~/dotfiles/bin/phpmd https://phpmd.org/static/latest/phpmd.phar\n\tchmod +x ~/dotfiles/bin/phpmd\n\ninstall-php-symphony-cli:\n\tcurl -sLo /tmp/symfony.gz https://github.com/symfony/cli/releases/download/v4.18.4/symfony_linux_amd64.gz\n\tgunzip /tmp/symfony.gz\n\tmv /tmp/symfony ~/dotfiles/bin\n\tchmod +x ~/dotfiles/bin/symfony\n# /PHP\n\n\n# RUNS\n\nrun-octant-remote:\n\toctant --listener-addr 0.0.0.0:7777\n\n# Database modelling tools\n\ninstall-dbtools-terra-er:\n\tcurl -sLo ~/dotfiles/bin/terra.jar https://github.com/rterrabh/TerraER/releases/download/TerraER3.11/TerraER3.11.jar\n\ninstall-dbtools-schemaspy:\n\tcurl -sLo ~/dotfiles/bin/schemaspy.jar https://github.com/schemaspy/schemaspy/releases/download/v6.1.0/schemaspy-6.1.0.jar\n\ninstall-dbtools-dbml-cli-npm:\n\twhich npm\n\tnpm install -g @dbml/cli\n\techo dbml2sql schema.dbml\n\techo dbml2sql schema.dbml --mysql\n\techo \"dbml2sql \u003cpath-to-dbml-file\u003e [--mysql|--postgres] [-o|--out-file \u003coutput-filepath\u003e]\"\n\techo sql2dbml dump.sql --postgres\n\techo sql2dbml --mysql dump.sql -o mydatabase.dbml\n\techo sql2dbml \u003cpath-to-sql-file\u003e [--mysql|--postgres] [-o|--out-file \u003coutput-filepath\u003e]\n\n\n```\n\n# Terraform versions\n\nAs your projects are based on different terraform versions, makes sense to isolate your terraform\nversion exactly as you isolate python, nodejs, go versions.\n\nThus if .terraform-version is detected in $HOME, it is assumed that this host has preference of using\nterraform versions via tfenv, rather than using binary from ~/dotfiles/bin.\n\nTerraform version is detected using following logic: if no parameter is passed, the version to use is\nresolved automatically via .terraform-version files or TFENV_TERRAFORM_VERSION environment variable\n(TFENV_TERRAFORM_VERSION takes precedence), defaulting to 'latest' if none are found.\n\nThus good idea is to set default version of the terraform.\n\n# Time to sleep\n\nDone with work? Handy shortcut.\n\n```sh\nalias 'nah'='echo \"shutdown (ctrl-c to abort)?\" \u0026\u0026 read \u0026\u0026 sudo shutdown 0'\n```\n\n\n#  Fonts for prompt snippets\n\n\nAdobe Source Code Pro: https://github.com/adobe-fonts/source-code-pro\nSource Code Pro + Powerline: https://github.com/powerline/fonts/tree/master/SourceCodePro\nNerd Fonts Sauce Code Pro (might be derived from #2?): https://github.com/ryanoasis/nerd-fonts/tree/master/patched-fonts/SourceCodePro/Regular\nAwesome Fonts Sauce Code Powerline: https://github.com/gabrielelana/awesome-terminal-fonts/tree/patching-strategy/fonts\nThis random file that floats around. No idea where it came from, but it's referenced in many blog posts: https://github.com/bhilburn/dotfiles/blob/master/fonts/SourceCodePro%2BPowerline%2BAwesome%2BRegular.ttf\n\n\n# Development box with vagrant\n\nIf your workplace is rather development box, like if you use vagrant often ,\nconsider modifiing sudoers exclusions, like `/etc/sudoers.d/YOURUSER` replacing slavko with your username\n\nNote that by doing so you are doing your pc potentially less secure\n\n```\n#slavko ALL=(ALL) NOPASSWD: ALL\n\n# vagrant-hostsupdater\nCmnd_Alias VAGRANT_HOSTS_ADD = /bin/sh -c echo \"*\" \u003e\u003e /etc/hosts\nCmnd_Alias VAGRANT_HOSTS_REMOVE = /usr/bin/sed -i -e /*/ d /etc/hosts\nCmnd_Alias VAGRANT_HOSTS_REMOVE2 = /bin/sed -i -e /*/ d /etc/hosts\nslavko ALL=(root) NOPASSWD: VAGRANT_HOSTS_ADD, VAGRANT_HOSTS_REMOVE, VAGRANT_HOSTS_REMOVE2\n\n# vagrant-nfs\nCmnd_Alias VAGRANT_EXPORTS_ADD = /usr/bin/tee -a /etc/exports\nCmnd_Alias VAGRANT_NFSD = /sbin/nfsd restart\nCmnd_Alias VAGRANT_EXPORTS_REMOVE = /usr/bin/sed -E -e /*/ d -ibak /etc/exports\nslavko ALL=(root) NOPASSWD: VAGRANT_EXPORTS_ADD, VAGRANT_NFSD, VAGRANT_EXPORTS_REMOVE, VAGRANT_TEMP_PREPARE\n\nCmnd_Alias VAGRANT_EXPORTS_CHOWN = /bin/chown 0\\:0 /tmp/*\nCmnd_Alias VAGRANT_EXPORTS_MV = /bin/mv -f /tmp/* /etc/exports\nCmnd_Alias VAGRANT_NFSD_CHECK = /etc/init.d/nfs-kernel-server status\nCmnd_Alias VAGRANT_NFSD_START = /etc/init.d/nfs-kernel-server start\nCmnd_Alias VAGRANT_NFSD_APPLY = /usr/sbin/exportfs -ar\nslavko ALL=(root) NOPASSWD: VAGRANT_EXPORTS_CHOWN, VAGRANT_EXPORTS_MV, VAGRANT_NFSD_CHECK, VAGRANT_NFSD_START, VAGRANT_NFSD_APPLY\n\n# /vagrant-nfs\n\nslavko ALL=(ALL) NOPASSWD: /usr/bin/truecrypt\nslavko ALL=(ALL) NOPASSWD: /bin/systemctl\nslavko ALL=(ALL) NOPASSWD: /sbin/poweroff, /sbin/reboot, /sbin/shutdown\nslavko ALL=(ALL) NOPASSWD: /etc/init.d/nginx, /etc/init.d/mysql, /etc/init.d/mongod, /etc/init.d/redis, /etc/init.d/php-fpm, /usr/bin/pritunl-client-pk-start\nslavko ALL=(ALL) NOPASSWD:SETENV: /usr/bin/docker, /usr/sbin/docker-gc, /usr/bin/vagrant\n\n\n```\n\nDO NOT PROCEED with similar setup on internet facing production servers\n\n\n# Deep Perversions\n\nMac look for ubuntu boxes\n\n1. Dependencies\n```\nsudo apt-get install gtk2-engines-murrine gtk2-engines-pixbuf\nsudo apt install gnome-shell-extensions\n```\n\nlater enable user themes extensions\n\n2. Download theme itself\n\nhttps://www.gnome-look.org/p/1275087/\n\n```\nmkdir -p ~/.themes\n```\n\n3. Install icons set, saying\n\nhttps://github.com/keeferrourke/la-capitaine-icon-theme\n\n```\nmkdir -p ~/.icons\ncd ~/.icons\ngit clone https://github.com/keeferrourke/la-capitaine-icon-theme.git\n./configure\n```\n\n4. Using gnome tweaking tool change current theme and icon pack\n\n\n# Working with workplaces\n\nIf you appear to be working with multiple independent tasks, you can ask alt-tab to switch only through windows in current workplace only\n\n```sh\ngsettings set org.gnome.shell.app-switcher current-workspace-only true\n```\n\nset to false if it does not suite your work habits\n\n# Fingerprints\n\n```\nsudo apt remove fprintd\n#Add the python-validity PPA\nsudo add-apt-repository ppa:uunicorn/open-fprintd\nsudo apt-get update\n#Install python-validity and dependencies\nsudo apt install open-fprintd fprintd-clients python3-validity\n#Enroll a fingerprint\nfprintd-enroll -f fprintd-enroll -f right-index-finger\n#Enable fingerprint login\nsudo pam-auth-update\n```\n\n\n# Notifications\n\n## slack\n\nUsing slacktee\n\nConfiguration\nBefore start using slacktee, please set following variables in the script configuration file.\nslacktee reads the global configuration (/etc/slacktee.conf) first, then reads your local configuration (~/.slacktee).\nYou can set up your local configuration file using interactive setup mode (--setup option).\n\nYou would need an authentication token for slacktee. It could be generated in 2 ways:\n\nCrate a Slack App (Preffered by Slack, but a bit complicated to setup)\nFollow steps listed in creating a Slack App.\n\nNext, create a bot user for your app, give the following 3 permissions to the Bot Token Scopes of your app: chat:write, chat:write:public, files:write.\nMore information about the permission scopes can be found at permission scopes. [Note] Even with files:write permission, Slack App can upload files only to the channels\nwhere the Slack App is in. So, please add your Slack App to the channels where you want to upload files. At last, install the app to your workplace and get the Bot User\nOAuth token in the \"OAuth \u0026 Permissions\" section of the app management page.\n\nAdd a bot (Easy to setup, but Slack may remove it in future)\n\nAdd a bot into your workspace through Slack App Directory. You can now find 'API Token' in the configuration page of the bot.\n\ntoken=\"\"            # The authentication token of the bot user. Used for accessing Slack APIs.\nchannel=\"\"          # Default channel to post messages. '#' is prepended, if it doesn't start with '#' or '@'.\ntmp_dir=\"/tmp\"      # Temporary file is created in this directory.\nusername=\"slacktee\" # Default username to post messages.\nicon=\"ghost\"        # Default emoji or a direct url to an image to post messages. You don't have to wrap emoji with ':'. See http://www.emoji-cheat-sheet.com.\nattachment=\"\"       # Default color of the attachments. If an empty string is specified, the attachments are not used.\n\n\n## Precommit hooks\n\n```sh\npip3 install pre-commit\n```\n\n```sh\nDIR=~/.git-template\ngit config --global init.templateDir ${DIR}\npre-commit init-templatedir -t pre-commit ${DIR}\n````\n\n Add configs and hooks\n\nStep into the repository you want to have the pre-commit hooks installed and run, for example\n\n```sh\ncat \u003c\u003cEOF \u003e .pre-commit-config.yaml\nrepos:\n- repo: git://github.com/antonbabenko/pre-commit-terraform\n  rev: \u003cVERSION\u003e # Get the latest from: https://github.com/antonbabenko/pre-commit-terraform/releases\n  hooks:\n    - id: terraform_fmt\n    - id: terraform_docs\nEOF\n```\n\nAutomatic hooks can be installed with\n\n```sh\npre-commit install\n```\n\nwhile manual hooks run can be applied using\n\n```sh\npre-commit run -a\n```\n\n## Running emails from the system using gmail smtp\n\nOn ubuntu system is possible using s-mail utility.\n\nDirty way\n\n```sh\ns-mail -v -s \"$EMAIL_SUBJECT\" \\\n-S smtp-use-starttls \\\n-S ssl-verify=ignore \\\n-S smtp-auth=login \\\n-S smtp=smtp://smtp.gmail.com:587 \\\n-S from=\"$FROM_EMAIL_ADDRESS($FRIENDLY_NAME)\" \\\n-S smtp-auth-user=$FROM_EMAIL_ADDRESS \\\n-S smtp-auth-password=$EMAIL_ACCOUNT_PASSWORD \\\n-S ssl-verify=ignore \\\n$TO_EMAIL_ADDRESS\n```\n\ni.e.   `echo \"The mail content\" | s-mail -v -s ...`\n\nYou would need to use app password  https://myaccount.google.com/apppasswords, rather than real gmail account password.\n\nMore compact way is to  use s-mail configuration file '~/.mailrc'\n\n```\nset smtp-use-starttls\nset ssl-verify=ignore\nset smtp=smtp://smtp.gmail.com:587\nset smtp-auth=login\nset smtp-auth-user=$FROM_EMAIL_ADDRESS\nset smtp-auth-password=$EMAIL_ACCOUNT_PASSWORD\nset from=\"$FROM_EMAIL_ADDRESS($FRIENDLY_NAME)\"\n```\n\n`chmod 600 ~/.mailrc.`\n\nThe variables set are the same as those used in the \"all in one command\".\n\nWhen sending mails, use this command:\n\n$ s-mail -v -s \"$EMAIL_SUBJECT\" $TO_EMAIL_ADDRESS\nOr\n\n$ echo \"The mail content\" | s-mail -v -s \"$EMAIL_SUBJECT\" $TO_EMAIL_ADDRESS\n\n\n#### To test your anonymity:\n\u003cdetails\u003e\u003csummary\u003eExpand for anonymity test\u003c/summary\u003e\n\u003cbr\u003e\n\n* [Check My IPx](https://ipx.ac/)\n* [Check Tor Project](https://check.torproject.org)\n* [Do I leak](http://www.doileak.com/)\n* [DNS leak test](http://dnsleaktest.com)\n* [Test IPv6](http://ipv6-test.com/)\n* [What is my proxy](http://whatismyproxy.com)\n* [What every Browser knows about you](http://webkay.robinlinus.com/)\n* [Proxy check on proxydb](http://proxydb.net/anon)\n\n\u003c/details\u003e\n\n\n## pdf perks\n\n```sh\nls -1 ./*jpg | xargs -L1 -I {} img2pdf {} -o {}_raw.pdf\n\nls -1 ./*_raw.pdf | xargs -L1 -I {} ocrmypdf {} {}_ocr.pdf\n\n```\n\n## Remapping win key\n\nYou can re-map everything to Win key with xcape by re-assigning any other key combination\n\n```\nxcape -e 'Super_L=Shift_L|Escape'\n```\n\n## Pinning kubectl, helm, kustomize versions, etc\n\nInstall asdf in your environment via Makefile ;\n\nEnsure you've initialized integration with global direnv and you have direnv installed globally\n\n```sh\nasdf plugin add direnv\n```\n\nConsider installing supported plugins\n\n```sh\nasdf plugin add kustomize\nasdf plugin add helmfile\nasdf plugin add kubectl\nasdf plugin add helm\n```\n\nIF you have disabled tfenv integration, you could also add terraform as plugin\n\n```sh\nasdf plugin add terraform\n```\n\nCreate two files in your \"project\" root:\n\non top of your envrc:\n\n```\nuse asdf\n```\n\nand after that you can use .tools-versions file, kind of\n\n```\nterraform 1.0.7\nkustomize 3.5.3\nkubectl 1.20.2\n```\nEOF\n\n## Current set of gnome extensions in use\n\n```\ngnome-extensions list --enabled\n\nddterm@amezin.github.com\ndynamic-panel-transparency@rockon999.github.io\nputWindow@clemens.lab21.org\nworkspace-switch-wraparound@theychx.org\ndash-to-dock@micxgx.gmail.com\nsystem-monitor@paradoxxx.zero.gmail.com\ngnome-fuzzy-app-search@gnome-shell-extensions.Czarlie.gitlab.com\nstatus-area-horizontal-spacing@mathematical.coffee.gmail.com\nubuntu-appindicators@ubuntu.com\napps-menu@gnome-shell-extensions.gcampax.github.com\nauto-move-windows@gnome-shell-extensions.gcampax.github.com\nuser-theme@gnome-shell-extensions.gcampax.github.com\nworkspace-indicator@gnome-shell-extensions.gcampax.github.com\n\n\n```\n\n## Disallow ubuntu to switch audio sources\n\nFile: /etc/pulse/default.pa\n\n```\n### Should be after module-*-restore but before module-*-detect\n#[VS] 1 below\n# load-module module-switch-on-port-available\n\n### Use hot-plugged devices like Bluetooth or USB automatically (LP: #1702794)\n#[VS] 3 below\n#.ifexists module-switch-on-connect.so\n#load-module module-switch-on-connect\n#.endif\n```\n\n\n\n## 3rd party work\n\nContains portions of bash library modules released under\n\nThis code is released under the Apache 2.0 License. Please see\n[LICENSE](https://github.com/gruntwork-io/bash-commons/tree/master/LICENSE) and\n[NOTICE](https://github.com/gruntwork-io/bash-commons/tree/master/NOTICE) for more details.\n\n\nContains portions of the zsh prompt framework\nhttps://github.com/Powerlevel9k/powerlevel9k\n\nThis code is released under MIT license , as can be found on\nhttps://github.com/Powerlevel9k/powerlevel9k/blob/master/LICENSE\n\nBash completions\n\nhttps://github.com/scop/bash-completion\n\n## Changing colors for ls command\n\nCredits to http://www.bigsoft.co.uk/blog/2008/04/11/configuring-ls_colors\n\n```sh\nfor i in 00{2..8} {0{3,4,9},10}{0..7}\ndo echo -e \"$i \\e[0;${i}mSubdermatoglyphic text\\e[00m  \\e[1;${i}mSubdermatoglyphic text\\e[00m\"\ndone\n\nfor i in 00{2..8} {0{3,4,9},10}{0..7}\ndo for j in 0 1\n   do echo -e \"$j;$i \\e[$j;${i}mSubdermatoglyphic text\\e[00m\"\n   done\ndone\n```\n\nLS_COLORS=$LS_COLORS:'di=0;35:' ; export LS_COLORS\nSome nice color choices (in this case 0;35 it is purple) are:\n\n```\nBlue = 34\nGreen = 32\nLight Green = 1;32\nCyan = 36\nRed = 31\nPurple = 35\nBrown = 33\nYellow = 1;33\nBold White = 1;37\nLight Grey = 0;37\nBlack = 30\nDark Grey= 1;30\n```\n\nThe first number is the style (1=bold), followed by a semicolon, and then the actual number of the color, possible styles (effects) are:\n\n```\n0   = default colour\n1   = bold\n4   = underlined\n5   = flashing text (disabled on some terminals)\n7   = reverse field (exchange foreground and background color)\n8   = concealed (invisible)\n```\n\nThe possible backgrounds:\n\n```\n40  = black background\n41  = red background\n42  = green background\n43  = orange background\n44  = blue background\n45  = purple background\n46  = cyan background\n47  = grey background\n100 = dark grey background\n101 = light red background\n102 = light green background\n103 = yellow background\n104 = light blue background\n105 = light purple background\n106 = turquoise background\n107 = white background\n```\n\nAll possible colors:\n\n```\n30  = black\n31  = red\n32  = green\n33  = orange\n34  = blue\n35  = purple\n36  = cyan\n37  = grey\n90  = dark grey\n91  = light red\n92  = light green\n93  = yellow\n94  = light blue\n95  = light purple\n96  = turquoise\n97  = white\n```\nThese can even be combined, so that a parameter like:\n\n```\ndi=1;4;31;42\n```\nin your LS_COLORS variable would make directories appear in bold underlined red text with a green background!\n\n```\nYou can also change other kinds of files when using the ls command by defining each kind with:\n\nbd = (BLOCK, BLK)   Block device (buffered) special file\ncd = (CHAR, CHR)    Character device (unbuffered) special file\ndi = (DIR)  Directory\ndo = (DOOR) [Door][1]\nex = (EXEC) Executable file (ie. has 'x' set in permissions)\nfi = (FILE) Normal file\nln = (SYMLINK, LINK, LNK)   Symbolic link. If you set this to ‘target’ instead of a numerical value, the color is as for the file pointed to.\nmi = (MISSING)  Non-existent file pointed to by a symbolic link (visible when you type ls -l)\nno = (NORMAL, NORM) Normal (non-filename) text. Global default, although everything should be something\nor = (ORPHAN)   Symbolic link pointing to an orphaned non-existent file\now = (OTHER_WRITABLE)   Directory that is other-writable (o+w) and not sticky\npi = (FIFO, PIPE)   Named pipe (fifo file)\nsg = (SETGID)   File that is setgid (g+s)\nso = (SOCK) Socket file\nst = (STICKY)   Directory with the sticky bit set (+t) and not other-writable\nsu = (SETUID)   File that is setuid (u+s)\ntw = (STICKY_OTHER_WRITABLE)    Directory that is sticky and other-writable (+t,o+w)\n*.extension =   Every file using this extension e.g. *.rpm = files with the ending .rpm\n```\n\n\n## Hardware case thingy\n\nAlways have active pair of keys registered on services, and perhaps 3rd in unpacked form for quickly replacement\nTry not forget your PINs, consider applying same pins on both pairs.\n\nPerhaps have registry of portals where you have registered your keys, to speedup future key rotation\n\n### Necessary packets and hacks\n\nYou might need:\n```sh\nsudo apt-get -y install swig\nsudo apt install libpcsclite-dev\nsudo apt install pcscd\n```\n\n### Resetting openpgp fault pin count\n\n```sh\n# you might be forced to change config mode for ykman\nykman config mode ccid\nykman openpgp access set-retries 3 3 3\n```\n\nAs a result of operation both pins will be reset to defaults, so do not forget to change back\n\n\n### Generating ssh keys requiring smart card physical presence\n\n#### Undiscoverable key\n\nSuch key would require presence of the device and physical authorising, but if you would lost private key of file (saying, moved to new PC)\nyou would need to copy it separately or generate new\n\n```sh\nssh-keygen -t ed25519-sk -C \"hardware_smart_card_black2_verify_required\" -O verify-required\n```\n\n#### Discoverable key\n\n```sh\nssh-keygen -t ed25519-sk -O resident -O verify-required -O application=ssh:hardware_resident_key\n```\n\nThis works the same as before, except a resident key is easier to import to a new computer because it can be loaded directly from the security key.\nTo use the SSH key on a new computer, make sure you have ssh-agent running and simply run:\n\n```sh\nssh-add -K\n```\n\nThis will load a “key handle” into the SSH agent and make the key available for use on the new computer. This works great for short visits, but it won’t last forever – you’ll\nneed to run ssh-add again if you reboot the computer, for example. To import the key permanently, instead run:\n\n```sh\nssh-keygen -K\n```\n\nThis will write two files into the current directory: id_ed25519_sk_rk_hardware_resident_key   id_ed25519_sk_rk_hardware_resident_key.pub. Naming comes from -O application=ssh:KEYNAME,\nso good idea to provide short clear name when you generate the key.\n\nNow you just need to it into your SSH directory.\n\n\nAdditional bonuses:\n\nBoth options guarantee that even if that private file (reference to smartcard) is stolen from your PC, intruder still won't be able to use ssh key to login to external machine\nwithout physical smart card.  Non-discoverable option would ensure, that if your smart card is stolen, intruder also won't be able to generate original private key reference to smartcard, even if he would guess your pin before lock on 8th try. (edited)\n\nadditional pro - you can add same key as a MFA device on aws login (so not a phone, some app on your laptop - but physical thingy you need to have)\n\nand final pro - as most of the people have aws credentials in ~/.aws/credentials|config files  - it is also possible to ensure, that when one tries to use aws credentials\n(which are supposed to be rotated +- regular anyway) - that person has access to physical smart card - thus mitigate risk of stolen aws credentials too.\n\n\nCONS: this is hardware device - capacity sensor might stop working, your could have some static electricity inserting into port, and so on.\nThus you always need to have two pre-configured in a similar manner keys , and perhaps third for easy replacement.\n\n## UI Albert launcher\n\n### Remap windows key hack\n\ninstall xcape, and add remapper to auto startup programs.\nYou can find auto startup programs dialog by launching\n`gnome-session-properties`\n\n```sh\nxcape -e 'Super_L=Control_L|F1'\n```\n\n\n\n###\n\n## dot-version thingies\n### .python-version\n\nThat's the file handled by pyenv.\nFirst step - you can choose specific python version\n```sh\npyenv install --list | grep \" 3\\.[678]\"\npyenv install -v 3.7.2\n```\n\nIf you are lucky enough, and can share environment between projects - you can just put v3.7.2 into this file.\n```\nv3.7.2\n```\n\nOtherwise you are about to proceed with virtualenv\n\n```sh\npyenv virtualenv \u003cpython_version\u003e \u003cenvironment_name\u003e\n```\n\nand put the name of virtual environment into same file\n```\nmy-project-virtualenv\n```\n\n### .nvmrc\n\nThat's file handled by nvm. Just put node version in it\n```\nv18.15.0\n```\n\nYou might want to install node version first\n```sh\nnvm install v18.15.0\n```\n\n### .terraform-version\n\nThats file is handled by tfenv and specifies version of the terraform that is in use in the current project\n\n```\n1.0.2\n```\n\n### .java-version\n\nThat is file handled by jenv\n\n```\n17.0.8.1\n```\n\nYou might want to install javasdk, and register it with jenv first.\n\n```sh\njenv add /usr/lib/jvm/java-17-amazon-corretto/\n```\n\n\n# Additional information\n\nFor information out of scope of the readme, but useful for new workplace configuration, \nrefer to [WIKI](https://github.com/Voronenko/dotfiles/wiki)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoronenko%2Fdotfiles","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvoronenko%2Fdotfiles","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoronenko%2Fdotfiles/lists"}