Function for bash or zsh to generate SSL requests and certificates

Rather than memorising annoying OpenSSL options, stick this in your profile, edit the ‘SUBJ’ bit, and you’ll be generating keys with ease. # Generate an SSL key and a signing request or self-signed certificate sslcert() { cn=$1 # The prefix for the certificate's subject, eg # SUBJ="/C=GB/ST=Edinburgh/L=Edinburgh/O=Widget Co" SUBJ="<<< SET THIS BIT >>>" if [ -z "$cn" -o "$cn" = "-h" ]; then echo "usage: $0 <common name> [csr|crt]" >&2 echo "...

2015-07-03 · James McDonald

Useful Haskell Learnings

isSexyPerson x = if x == "Oda" then x ++ " is indeed sexy!" else "The sexiness of " ++ x ++ " is unknown." Most useful.

2013-08-03 · James McDonald