view .shell.d/99.misc.zsh @ 325:64e73453e43f

xmonad: Pull apart custom layout into something readable This change doesn't affect any behavior, but it does document the custom layout by naming function parameters. Hopefully, this will make things easier to fix the next time the XMonad developers break us.
author Lucas Bergman <lucas@bergmans.us>
date Tue, 11 Mar 2014 12:49:05 -0500
parents e9932cf1692f
children
line wrap: on
line source

function certfor() {
  if [ "x$1" = "x" ] ; then
    echo 'abort: specify host:port pair as argument'
    return 1
  fi
  openssl x509 -in <(echo | openssl s_client -showcerts -connect $1 | \
    awk '/-----BEGIN CERTIFICATE-----/,/-----END CERTIFICATE-----/') -noout -text
}