Kubectl: https://kubernetes.io/docs/reference/kubectl/quick-reference/
Helm: https://helm.sh/docs/intro/cheatsheet/
gh cli: https://cli.github.com/manual/gh_help_reference
argocd: https://argo-cd.readthedocs.io/en/latest/user-guide/commands/argocd/
| # ~~~~~~~~~~~~~~~ Functions ~~~~~~~~~~~~~~~~~~~~~ | |
| # If asdf is setup uncomment below line | |
| # source /opt/homebrew/opt/asdf/libexec/asdf.sh | |
| # ~~~~~~~~~~~~~~~ History ~~~~~~~~~~~~~~~~~~~~~~~~ | |
| HISTFILE=~/.zsh_history | |
| HISTSIZE=100000 | |
| SAVEHIST=100000 |
| #!/bin/bash | |
| # Format all the json files from the directory | |
| ls -d <dir>/* | xargs -I{} sh -c "jq -S '.' {} | sponge {}" |
| export GIT_PS1_SHOWDIRTYSTATE=true # show * for changes | |
| export GIT_PS1_SHOWUNTRACKEDFILES=true # show % for new files | |
| if [ "$color_prompt" = yes ]; then | |
| # PS1='${debian_chroot:+($debian_chroot)}\[\033[01;96m\]\W\[\033[00m\]\[\033[01;032m\] $(parse_git_branch)\[\033[00m\]' | |
| PS1='${debian_chroot:+($debian_chroot)}\[\033[01;96m\]\W\[\033[00m\]\[\033[01;032m\]$(__git_ps1)\[\033[00m\] ' | |
| # PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' | |
| # \033 can be replace with \e here | |
| # PS1='${debian_chroot:+($debian_chroot)}\[\e[01;32m\]\u@\[\e[00m\]:\[\e[01;34m\]\W\[\e[00m\]\$ ' | |
| else | |
| PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' |
| #!/usr/bin/env bash | |
| alias week="week" | |
| alias day="day" | |
| alias m="m" | |
| alias dt="today" | |
| alias paths="get_path" | |
| alias cl="clear && printf '\e[3J'" | |
| # ~~~~~~~~~~~~~~~ Aliases ~~~~~~~~~~~~~~~~~~~~~~~~ | |
| alias gb="git for-each-ref --sort='-authordate' --format='%(authordate)%09%(objectname:short)%09%(refname)' refs/heads | sed -e 's-refs/heads/--'" |
| # Install debs | |
| cd ~/Downloads | |
| wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb | |
| sudo dpkg -i google-chrome-stable_current_amd64.deb | |
| # Install gh cli | |
| (type -p wget >/dev/null || (sudo apt update && sudo apt-get install wget -y)) \ | |
| && sudo mkdir -p -m 755 /etc/apt/keyrings \ | |
| && wget -qO- https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null \ | |
| && sudo chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg \ |
| # Start windows and panes at 1, not 0 | |
| set -g base-index 1 | |
| set -g pane-base-index 1 | |
| set-window-option -g pane-base-index 1 | |
| set-option -g renumber-windows on | |
| bind r source-file ~/.tmux.conf \; display "~/.tmux.conf sourced!" | |
| bind R command-prompt "rename-window %%" | |
| set -g mouse on | |
| set -s escape-time 10 |
| "\e[A": history-search-backward | |
| "\e[B": history-search-forward | |
| set show-all-if-ambiguous on | |
| set completion-ignore-case on | |
| # To stop the bell sound in terminal after empty tab press | |
| set bell-style none | |
| # save this file and run below command in terminal | |
| # bind -f ~/.inputrc |
| #!/bin/bash | |
| # To avoid blank commit message | |
| if [[ -z $(grep '[^[:space:]]' $1) ]] | |
| then | |
| echo "empty commit not allowed :(" | |
| exit 1 | |
| fi | |
| # To add branch name in the commit message |
| name: "Convert workflow inputs to ENV variables Example" | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| stage: | |
| description: "stage" | |
| type: "string" | |
| required: true | |
| version: |