Compare commits
No commits in common. "383e96efec17a907b6586cbc3c2b098e4c849a89" and "07d93ee063c5d329024d6ecb9c0e6072be95152b" have entirely different histories.
383e96efec
...
07d93ee063
@ -7,6 +7,7 @@ format = """\
|
|||||||
$git_commit\
|
$git_commit\
|
||||||
$git_state\
|
$git_state\
|
||||||
$git_status\
|
$git_status\
|
||||||
|
$aws\
|
||||||
$kubernetes\
|
$kubernetes\
|
||||||
$helm\
|
$helm\
|
||||||
$golang\
|
$golang\
|
||||||
@ -43,8 +44,6 @@ format = '[$symbol$context \($namespace\)]($style) '
|
|||||||
symbol = "ﴱ "
|
symbol = "ﴱ "
|
||||||
style = "bold blue"
|
style = "bold blue"
|
||||||
disabled = false
|
disabled = false
|
||||||
[kubernetes.context_aliases]
|
|
||||||
"gs-(?P<cluster>.+)" = "$cluster [MC]"
|
|
||||||
|
|
||||||
[terraform]
|
[terraform]
|
||||||
format = "[$symbol$version]($style) "
|
format = "[$symbol$version]($style) "
|
||||||
|
@ -7,12 +7,12 @@ plugins=(
|
|||||||
zsh-autosuggestions
|
zsh-autosuggestions
|
||||||
)
|
)
|
||||||
autoload -U compinit && compinit
|
autoload -U compinit && compinit
|
||||||
|
fpath=($fpath ~/.zsh/completion)
|
||||||
|
|
||||||
DISABLE_UNTRACKED_FILES_DIRTY="true"
|
DISABLE_UNTRACKED_FILES_DIRTY="true"
|
||||||
SHOW_AWS_PROMPT=false
|
SHOW_AWS_PROMPT=false
|
||||||
|
|
||||||
source $ZSH/oh-my-zsh.sh
|
source $ZSH/oh-my-zsh.sh
|
||||||
source `brew --prefix switch`/switch.sh
|
|
||||||
|
|
||||||
# History
|
# History
|
||||||
HISTFILE="$HOME/.zsh_history"
|
HISTFILE="$HOME/.zsh_history"
|
||||||
|
@ -24,8 +24,6 @@ alias bandwhich='sudo bandwhich'
|
|||||||
alias top='btm'
|
alias top='btm'
|
||||||
alias ps='procs'
|
alias ps='procs'
|
||||||
alias dig='dog'
|
alias dig='dog'
|
||||||
alias kubectx='switch'
|
|
||||||
alias kctx='switch'
|
|
||||||
|
|
||||||
alias machine-info='macchina -t Boron --bar'
|
alias machine-info='macchina -t Boron --bar'
|
||||||
alias watch='watch '
|
alias watch='watch '
|
||||||
@ -41,11 +39,7 @@ lt() {
|
|||||||
}
|
}
|
||||||
alias aws='docker run --rm -ti -v ~/.aws:/root/.aws -v $(pwd):/aws -e AWS_PROFILE -e AWS_DEFAULT_REGION -e AWS_REGION -e AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY amazon/aws-cli'
|
alias aws='docker run --rm -ti -v ~/.aws:/root/.aws -v $(pwd):/aws -e AWS_PROFILE -e AWS_DEFAULT_REGION -e AWS_REGION -e AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY amazon/aws-cli'
|
||||||
|
|
||||||
git() {
|
git-clone() {
|
||||||
if [ "$1" = "take" ]; then
|
git clone $1
|
||||||
/usr/local/bin/git clone $2
|
cd "$(basename "$1" .git)"
|
||||||
cd $(basename $2 | sed 's/\.git$//')
|
|
||||||
else
|
|
||||||
/usr/local/bin/git $@
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:$HOME/goworkspace/bin:$HOME/.cargo/bin:/usr/local/kubebuilder/bin:$HOME/.asdf/shims"
|
export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:$HOME/goworkspace/bin:$HOME/.cargo/bin:/usr/local/kubebuilder/bin:$HOME/.asdf/shims"
|
||||||
export EDITOR='vim'
|
export EDITOR='vim'
|
||||||
export VISUAL='code'
|
export VISUAL='code'
|
||||||
export GPG_TTY=$(tty)
|
|
||||||
|
|
||||||
# AWS
|
# AWS
|
||||||
if [ -f ~/.aws/profile ]; then
|
if [ -f ~/.aws/profile ]; then
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
alias k='kubectl '
|
alias k='kubectl '
|
||||||
alias kgs='kubectl-gs '
|
|
||||||
alias kshell='kubectl run -it shell --image bash --restart Never --rm -- sh'
|
alias kshell='kubectl run -it shell --image bash --restart Never --rm -- sh'
|
||||||
|
|
||||||
kiam () {
|
kiam () {
|
||||||
@ -71,6 +70,12 @@ kube-forward() {
|
|||||||
|
|
||||||
source <(kubectl completion zsh)
|
source <(kubectl completion zsh)
|
||||||
|
|
||||||
|
## Merge multiple kubeconfigs
|
||||||
|
function join_by { local d=$1; shift; echo -n "$1"; shift; printf "%s" "${@/#/$d}"; }
|
||||||
|
KUBECONFIG="$HOME/.kube/config"
|
||||||
|
OTHER_CLUSTERS="$(join_by :$HOME/.kube/clusters/ $(echo $HOME/.kube/clusters/$(/bin/ls $HOME/.kube/clusters)))"
|
||||||
|
export KUBECONFIG=$KUBECONFIG:$OTHER_CLUSTERS
|
||||||
|
|
||||||
## Kubectl exec
|
## Kubectl exec
|
||||||
kx () {
|
kx () {
|
||||||
local pod=($(kubectl get pods --all-namespaces -owide | fzf | awk '{print $1, $2}'))
|
local pod=($(kubectl get pods --all-namespaces -owide | fzf | awk '{print $1, $2}'))
|
||||||
@ -94,6 +99,13 @@ kall () {
|
|||||||
kubectl get all --all-namespaces
|
kubectl get all --all-namespaces
|
||||||
}
|
}
|
||||||
|
|
||||||
|
kctx () {
|
||||||
|
KUBECONFIG="$HOME/.kube/config"
|
||||||
|
OTHER_CLUSTERS="$(join_by :$HOME/.kube/clusters/ $(echo $HOME/.kube/clusters/$(ls $HOME/.kube/clusters)))"
|
||||||
|
export KUBECONFIG=$KUBECONFIG:$OTHER_CLUSTERS
|
||||||
|
kubectx $@
|
||||||
|
}
|
||||||
|
|
||||||
k-version-test() {
|
k-version-test() {
|
||||||
VERSION=""
|
VERSION=""
|
||||||
FILES=""
|
FILES=""
|
||||||
|
@ -1,9 +1,5 @@
|
|||||||
[user]
|
[user]
|
||||||
name = Marcus Noble
|
name = Marcus Noble
|
||||||
signingkey = B8F2DB8A7AEBAF78
|
|
||||||
|
|
||||||
[commit]
|
|
||||||
gpgsign = true
|
|
||||||
|
|
||||||
[core]
|
[core]
|
||||||
editor = /usr/bin/vim
|
editor = /usr/bin/vim
|
||||||
@ -30,9 +26,8 @@
|
|||||||
org-name = "!git remote -v | grep -m 1 -o ':.*/' | sed 's:^.\\(.*\\).$:\\1:'"
|
org-name = "!git remote -v | grep -m 1 -o ':.*/' | sed 's:^.\\(.*\\).$:\\1:'"
|
||||||
branch-name = "!git rev-parse --abbrev-ref HEAD"
|
branch-name = "!git rev-parse --abbrev-ref HEAD"
|
||||||
changelog-changed = "!test $(git diff --name-only HEAD origin/$(git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@') | grep CHANGELOG.md | wc -l | xargs) = 1"
|
changelog-changed = "!test $(git diff --name-only HEAD origin/$(git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@') | grep CHANGELOG.md | wc -l | xargs) = 1"
|
||||||
main-branch = "!git remote show origin|grep HEAD|sed 's/.* //'"
|
|
||||||
|
|
||||||
main = "!git remote set-head origin --auto && git checkout $(git main-branch) && git pull"
|
main = "!git remote set-head origin --auto && git checkout $(git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@') && git pull"
|
||||||
publish = "!func(){ if [[ $(git branch-name) != \"$(git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@')\" ]]; then git push -u origin $(git branch-name) && (git changelog-changed || echo '\n\n⚠️ Dont forget to update changelog ⚠️ ') ; else echo "Wat?!"; fi; }; func"
|
publish = "!func(){ if [[ $(git branch-name) != \"$(git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@')\" ]]; then git push -u origin $(git branch-name) && (git changelog-changed || echo '\n\n⚠️ Dont forget to update changelog ⚠️ ') ; else echo "Wat?!"; fi; }; func"
|
||||||
cleanup = "!git fetch -p && for branch in `git branch -vv | grep ': gone]' | awk '{print $1}'`; do git branch -D $branch; done"
|
cleanup = "!git fetch -p && for branch in `git branch -vv | grep ': gone]' | awk '{print $1}'`; do git branch -D $branch; done"
|
||||||
dont-change-file = "!git update-index --assume-unchanged"
|
dont-change-file = "!git update-index --assume-unchanged"
|
||||||
@ -50,3 +45,5 @@
|
|||||||
|
|
||||||
[url "ssh://git@github.com"]
|
[url "ssh://git@github.com"]
|
||||||
insteadOf = https://github.com
|
insteadOf = https://github.com
|
||||||
|
[url "ssh://git@gitlab.et-scm.com/"]
|
||||||
|
insteadOf = https://gitlab.et-scm.com
|
||||||
|
@ -1,8 +0,0 @@
|
|||||||
kind: SwitchConfig
|
|
||||||
version: v1alpha1
|
|
||||||
kubeconfigName: "*.yaml"
|
|
||||||
kubeconfigStores:
|
|
||||||
- kind: filesystem
|
|
||||||
kubeconfigName: "*.yaml"
|
|
||||||
paths:
|
|
||||||
- ~/.kube/clusters/
|
|
4
.zshrc
4
.zshrc
@ -1,7 +1,3 @@
|
|||||||
if [ ! -z ~/.additional_dotfiles/credentials ]; then
|
|
||||||
source ~/.additional_dotfiles/credentials
|
|
||||||
fi
|
|
||||||
|
|
||||||
for filename in ~/.dotfiles/*; do
|
for filename in ~/.dotfiles/*; do
|
||||||
source $filename
|
source $filename
|
||||||
done
|
done
|
||||||
|
8
Makefile
8
Makefile
@ -36,7 +36,6 @@ pre-reqs: ## Install all required binaries.
|
|||||||
which btm > /dev/null || cargo install bottom; \
|
which btm > /dev/null || cargo install bottom; \
|
||||||
which procs > /dev/null || brew install procs; \
|
which procs > /dev/null || brew install procs; \
|
||||||
which dog > /dev/null || brew install dog; \
|
which dog > /dev/null || brew install dog; \
|
||||||
which switcher > /dev/null || brew install danielfoehrkn/switch/switch; \
|
|
||||||
brew install gpg gawk coreutils; \
|
brew install gpg gawk coreutils; \
|
||||||
git clone https://github.com/zsh-users/zsh-autosuggestions $${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions; \
|
git clone https://github.com/zsh-users/zsh-autosuggestions $${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions; \
|
||||||
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting; \
|
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting; \
|
||||||
@ -73,7 +72,6 @@ upgrade: ## Upgrade all required binaries.
|
|||||||
which btm > /dev/null && cargo install bottom; \
|
which btm > /dev/null && cargo install bottom; \
|
||||||
which procs > /dev/null && brew upgrade procs; \
|
which procs > /dev/null && brew upgrade procs; \
|
||||||
which dog > /dev/null && brew upgrade dog; \
|
which dog > /dev/null && brew upgrade dog; \
|
||||||
which switcher > /dev/null && brew upgrade switch; \
|
|
||||||
cd $${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions && git pull && cd -; \
|
cd $${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions && git pull && cd -; \
|
||||||
cd $${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting && git pull && cd -; \
|
cd $${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting && git pull && cd -; \
|
||||||
cd ~/.oh-my-zsh && git pull && cd -; \
|
cd ~/.oh-my-zsh && git pull && cd -; \
|
||||||
@ -98,12 +96,6 @@ dotfiles: ## Installs the dotfiles.
|
|||||||
f=$$(basename $$file); \
|
f=$$(basename $$file); \
|
||||||
ln -sfn $$file $(HOME)/.k9s/$$f; \
|
ln -sfn $$file $(HOME)/.k9s/$$f; \
|
||||||
done; \
|
done; \
|
||||||
mkdir -p $(HOME)/.kube; \
|
|
||||||
for file in $(shell find $(CURDIR)/.kube -type f); do \
|
|
||||||
f=$$(basename $$file); \
|
|
||||||
ln -sfn $$file $(HOME)/.kube/$$f; \
|
|
||||||
done; \
|
|
||||||
|
|
||||||
|
|
||||||
.PHONY: help
|
.PHONY: help
|
||||||
help:
|
help:
|
||||||
|
Loading…
Reference in New Issue
Block a user