Skip to content

Instantly share code, notes, and snippets.

@patricknelson
patricknelson / README.md
Last active August 12, 2024 14:50
kubectl-sure: Provide confirmation when in sensitive contexts

kubectl-sure: Provide confirmation when in sensitive contexts

This bash function provides an extra failsafe that may help prevent you from accidentally running kubectl commands in the wrong context (or in contexts which could cause issues, such as shared or even production clusters).

Demo

Running kubectl in prod on accident:

@righi
righi / git-reup
Last active September 12, 2019 17:53
git-reup
#!/usr/bin/env ruby
#
# Usage: git-up
# git-reup
#
# Like git-pull but show a short and sexy log of changes
# immediately after merging (git-up) or rebasing (git-reup).
#
# Inspired by Kyle Neath's `git up' alias:
# http://gist.github.com/249223