Creating Keys

This is a brief guide to creating a public/private key pair that can be used for OpenSSL. While the "easy" version will work, I find it convenient to generate a single PEM bundle and then export the private/public key from that as needed. This document also covers how to add and remove a password from your private key and how to make sure that keychain will automatically unlock it when you sign in.

Just make it work

Generate an ssh key-pair:


layout: post category : tips tagline: "Some tips about running and building with docker"

tags : [docker,tips,tools,devops]

Você já sabe o básico de Docker, mas quando começa a usar com mais frequência, alguns desconfortos surgem. Como qualquer ferramenta, Docker tem seu próprio conjunto de boas práticas e dicas para ser efetivo.


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.

Method 1

Backup the public and secret keyrings and trust database

cp ~/.gnupg/pubring.gpg /path/to/backups/
cp ~/.gnupg/secring.gpg /path/to/backups/
cp ~/.gnupg/trustdb.gpg /path/to/backups/
# or, instead of backing up trustdb...
def getbit(n, i):
>>> getbit(4, 0)
>>> getbit(4, 1)
>>> getbit(4, 2)
class Node:
def __init__(self, value, children=[]):
self.children = children
self.value = value
def tree_level_order(self):
level = [self]