Skip to content

Instantly share code, notes, and snippets.

View akhan4u's full-sized avatar
☘️
Gratitude

Amaan Khan akhan4u

☘️
Gratitude
View GitHub Profile
@akhan4u
akhan4u / kubectl_export.sh
Last active December 10, 2022 05:31
Export Kubernetes namespace to Disk 💾
# Prerequisites:
# [GNU Parallel](https://www.gnu.org/software/parallel/)
# [kubectl-neat](https://github.com/itaysk/kubectl-neat)
# [mikefarah/yq](https://github.com/mikefarah/yq)
#
# Usage:
# - Copy and paste the below into your active shell session. Alternatively, add to your shell initialization scripts.
# - kubectl_export <namespace>
# The folder structure will be created: <namespace>/<kind>/<resource_name>.yaml
#
@akhan4u
akhan4u / expr_syntax.md
Created February 9, 2023 14:57
Expr Syntax and bash equivalent
EXPR Syntax Bash Equiv Meaning
SEE NOTE 1 "${ARG1:-$ARG2}" ARG1 if it is neither null nor 0, otherwise ARG2
ARG1 & ARG2