For excessively paranoid client authentication.
Updated Apr 5 2019:
because this is a gist from 2011 that people stumble into and maybe you should AES instead of 3DES in the year of our lord 2019.
some other notes:
Every so often I have to restore my gpg keys and I'm never sure how best to do it. So, I've spent some time playing around with the various ways to export/import (backup/restore) keys.
cp ~/.gnupg/pubring.gpg /path/to/backups/
cp ~/.gnupg/secring.gpg /path/to/backups/
cp ~/.gnupg/trustdb.gpg /path/to/backups/
package main | |
import ( | |
"fmt" | |
"os" | |
"os/exec" | |
"syscall" | |
) | |
func main() { |
/* | |
Watch out, os.IsExist(err) != !os.IsNotExist(err) | |
They are error checkers, so use them only when err != nil, and you want to handle | |
specific errors in a different way! | |
Their main purpose is to wrap around OS error messages for you, so you don't have to test | |
for Windows/Unix/Mobile/other OS error messages for "file exists/directory exists" and | |
"file does not exist/directory does not exist" |
Collection of License badges for your Project's README file.
This list includes the most common open source and open data licenses.
Easily copy and paste the code under the badges into your Markdown files.
Translations: (No guarantee that the translations are up-to-date)
package main | |
// @lizrice, mostly copied from @doctor_julz: https://gist.github.com/julz/c0017fa7a40de0543001 | |
import ( | |
"fmt" | |
"os" | |
"os/exec" | |
"syscall" | |
) |
package main | |
import ( | |
"crypto/tls" | |
"crypto/x509" | |
"fmt" | |
"io/ioutil" | |
"net/http" | |
) |