Automatically locking a git crypt repo

I’ve been using Git Crypt with a few secure git repos at work. It works well and is easy to use. The one thing that occasionally wakes me up in the middle of the night is wondering if I’ve locked a repo when I’m finished with it. To help with this issue, I threw together a quick bash function using at and wall. I use this on both Debian Linux and OSX.

A Kubernetes-aware bash prompt

If you manage multiple Kubernetes deployments, this little trick can show you the current Kubernetes context as part of your bash prompt. Edit your ~/.bash_profile or ~/.bashrc with the following: function kube_context() { # could have used $?, but it was easier with a string compare local ctx=$(kubectl config current-context 2>&1) if [ "${ctx}" != "error: current-context is not set" ]; then echo -n "<${ctx}> " fi } Blue='\e[0;34m' # Blue White='\e[0;37m' # White BRed='\e[1;31m' # Red IWhite='\e[0;97m' # White LightBlue='\e[1;34m' PS1="\[$Blue\]\t\[$BWhite\]\[$LightBlue\] \$(kube_context)\[$BRed\]\[$BRed\]\w\[\033[m\]\[$IWhite\]\$(__git_ps1)\[$White\]\$ " The snippet above yields the following prompt:

Habitat

Habitat is a new approach to automation that focuses on the application instead of the infrastructure it runs on. With Habitat, the apps you build, deploy, and manage behave consistently in any runtime — bare metal, VMs, containers, and PaaS. You’ll spend less time on the environment and more time building features. Habitat is an open source project, and we’d love for you to get involved.