From e743c663acdf4e6943fabfc53ec28311f31f6b09 Mon Sep 17 00:00:00 2001 From: Vasili Svirydau Date: Tue, 16 Nov 2021 20:33:23 +0000 Subject: [PATCH] Some changes from work machine --- bash.d/10-no-elastic-apm.sh | 2 ++ bash.d/10-no-pact-spying.sh | 1 + bash.d/10-paths.sh | 4 ++++ bash.d/20-commands.sh | 12 ++++++++++++ bash.d/20-nvm.sh | 11 +++++++++++ bash.d/20-rbenv.sh | 9 +++++++++ bash.d/30-dotnet-env.sh | 3 +++ dotfiles/.config/starship.toml | 4 ++++ dotfiles/.gitconfig | 5 ++++- 9 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 bash.d/10-no-elastic-apm.sh create mode 100644 bash.d/10-no-pact-spying.sh create mode 100644 bash.d/20-nvm.sh create mode 100644 bash.d/20-rbenv.sh create mode 100644 bash.d/30-dotnet-env.sh diff --git a/bash.d/10-no-elastic-apm.sh b/bash.d/10-no-elastic-apm.sh new file mode 100644 index 0000000..3d3bdd8 --- /dev/null +++ b/bash.d/10-no-elastic-apm.sh @@ -0,0 +1,2 @@ +#!/bin/bash +export ELASTIC_APM_DISABLE_SEND=true diff --git a/bash.d/10-no-pact-spying.sh b/bash.d/10-no-pact-spying.sh new file mode 100644 index 0000000..a39ffc1 --- /dev/null +++ b/bash.d/10-no-pact-spying.sh @@ -0,0 +1 @@ +export PACT_DO_NOT_TRACK=1 diff --git a/bash.d/10-paths.sh b/bash.d/10-paths.sh index a762b44..73354c9 100644 --- a/bash.d/10-paths.sh +++ b/bash.d/10-paths.sh @@ -9,3 +9,7 @@ fi if [ -e "$HOME/.bin" ]; then export PATH="$HOME/.bin:$PATH" fi + +if [ -w "$HOME/go/bin" ]; then + export PATH="$HOME/go/bin:$PATH" +fi diff --git a/bash.d/20-commands.sh b/bash.d/20-commands.sh index 443f81c..c31c27a 100644 --- a/bash.d/20-commands.sh +++ b/bash.d/20-commands.sh @@ -3,3 +3,15 @@ function gr() { cd "$(git rev-parse --show-toplevel)" || return } + +function tdd() { + set +e + path=$1 + shift + echo "Path: \"$path\"" + echo "Command: \"$@\"" + while [[ $? == 0 ]] + inotifywait -r "$path" -e create -qq; + eval "$@" + do echo $?; done; +} diff --git a/bash.d/20-nvm.sh b/bash.d/20-nvm.sh new file mode 100644 index 0000000..ce156bb --- /dev/null +++ b/bash.d/20-nvm.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +if test -d ~/.nvm; then + NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")" + export NVM_DIR + [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm +fi + +function dotfiles_install_nvm() { + git clone git@github.com:nvm-sh/nvm.git ~/.nvm +} diff --git a/bash.d/20-rbenv.sh b/bash.d/20-rbenv.sh new file mode 100644 index 0000000..d42a3f3 --- /dev/null +++ b/bash.d/20-rbenv.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +if command -v rbenv > /dev/null; then + eval "$(rbenv init -)" +fi + +function dotfiles_install_rbenv { + sudo apt install rbenv +} diff --git a/bash.d/30-dotnet-env.sh b/bash.d/30-dotnet-env.sh new file mode 100644 index 0000000..c26db68 --- /dev/null +++ b/bash.d/30-dotnet-env.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +export ASPNETCORE_ENVIRONMENT=Development diff --git a/dotfiles/.config/starship.toml b/dotfiles/.config/starship.toml index a7b0206..d9f04a4 100644 --- a/dotfiles/.config/starship.toml +++ b/dotfiles/.config/starship.toml @@ -1,2 +1,6 @@ [elixir] disabled=true + +[kubernetes] +disabled=false +# format = 'on [⛵ $context \($namespace\)](dimmed green) ' diff --git a/dotfiles/.gitconfig b/dotfiles/.gitconfig index e575a68..c002699 100644 --- a/dotfiles/.gitconfig +++ b/dotfiles/.gitconfig @@ -29,4 +29,7 @@ ignore = "!gi() { curl -sL https://www.gitignore.io/api/$@ ;}; gi" [rebase] - instructionFormat = (%an <%ae>) %s + instructionFormat = (%an <%ae>) %s +[pull] + rebase = true + ff = only