Skip to content

Instantly share code, notes, and snippets.

@chrisroos
chrisroos / gpg-import-and-export-instructions.md
Created September 9, 2011 10:49
Instructions for exporting/importing (backup/restore) GPG keys

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...

.
├── books
│   ├── handlers.go
│   └── models.go
├── config
│   └── db.go
└── main.go
@MichaelCurrie
MichaelCurrie / autopep8 Travis-CI.md
Last active April 26, 2021 17:18
Automatically fix PEP-8 issues using Travis-CI

PEP-8 is a set of Python style recommendations. pep8 is a module that checks your .py file for violations. To make your Travis-CI build fail if you have any violations, you could add these lines to your .travis.yml:

before_install:
    - pip install pep8
    
script:
    # Run pep8 on all .py files in all subfolders
    # (I ignore "E402: module level import not at top of file"
    # because of use case sys.path.append('..'); import <module>)
@asukakenji
asukakenji / go-stdlib-interface-selected.md
Last active July 27, 2024 10:31
Go (Golang) Standard Library Interfaces (Selected)

Go (Golang) Standard Library Interfaces (Selected)

This is not an exhaustive list of all interfaces in Go's standard library. I only list those I think are important. Interfaces defined in frequently used packages (like io, fmt) are included. Interfaces that have significant importance are also included.

All of the following information is based on go version go1.8.3 darwin/amd64.

@Killeroid
Killeroid / gpg-import-and-export-instructions.md
Created October 18, 2017 11:51
How to export and import gpg keys

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

Gotten from the RedHat GPG migration manual

Backup the public and secret keyrings and trust database

## Export all public keys

gpg -a --export >mypubkeys.asc

@rabajaj0509
rabajaj0509 / gist:c9c35a3e626e857c99d540bfccfa55b5
Created December 8, 2017 11:07
Ansible meetup 9/12/2018
## Create a folder by the name Ansible:
$ mkdir Ansible
## Create a vagrant env:
$ vagrant init
# After creating a vagrant env, you will see a `Vagrant File`
$ vi Vagrantfile
##press dG to delete all contents of the file
##paste the following contents into the file:
@edgimar
edgimar / archive-with-ancestors.el
Last active June 30, 2024 16:45
Org-mode archive function that includes ancestor tree structure when copying
(require 'org-archive)
; Set the function to use for org-archive-default (C-c C-x C-a)
; (setq org-archive-location (concat org-directory "/archive/%s_archive::"))
; (setq org-archive-location "archive/archived_%s::")
(setq org-archive-location "::* ARCHIVED")
; unmap org-archive-subtree
(define-key org-mode-map (kbd "C-c C-x C-s") nil)
@mattharrison
mattharrison / gist:90dcbe5f37de7148533989fb4b8e3e69
Last active March 26, 2021 21:31
Mastering Pytest README
=====================
Intermediate Pytest
=====================
http://bit.ly/2019-07-01-pytest
These assignments are based on a Python implementation
that models a lift at a ski resort.
@krisleech
krisleech / renew-gpgkey.md
Last active July 10, 2024 14:14
Renew Expired GPG key

Renew GPG key

Given that your key has expired.

$ gpg --list-keys
$ gpg --edit-key KEYID

Use the expire command to set a new expire date:

@alexedwards
alexedwards / _tree
Created October 27, 2020 07:40
Config package with global variable
.
├── config
│ └── config.go
├── go.mod
├── go.sum
├── main.go
└── models
└── books
└── books.go