Skip to content

Instantly share code, notes, and snippets.

View edgardleal's full-sized avatar
💻
working from home

Edgard Rosberg Duarte Leal edgardleal

💻
working from home
View GitHub Profile
@edgardleal
edgardleal / gpg-import-and-export-instructions.md
Created April 24, 2016 20:51 — forked from chrisroos/gpg-import-and-export-instructions.md
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...

@edgardleal
edgardleal / install.sh
Last active August 29, 2015 14:06 — forked from julesbou/install.sh
###
### Debian configuration
###
# --- Bashrc ---
echo "
#!/bin/sh
##
## Redhat / Linux / LSB
##
# chkconfig: 345 80 20
# description: Startup script for Express / Node.js application with the \
## forever module.
##
## A modification of https://gist.github.com/1339289
##
@edgardleal
edgardleal / gist:158e682631b2edd42d8f
Last active July 9, 2016 14:52 — forked from jessedearing/gist:2351836
Generate self signed ssl certificate
#!/bin/bash
echo "Generating an SSL private key to sign your certificate..."
openssl genrsa -des3 -out myssl.key 1024
echo "Generating a Certificate Signing Request..."
openssl req -new -key myssl.key -out myssl.csr
echo "Removing passphrase from key (for nginx)..."
cp myssl.key myssl.key.org
openssl rsa -in myssl.key.org -out myssl.key
@edgardleal
edgardleal / is_installed.sh
Last active August 29, 2015 13:57 — forked from JamieMason/is_installed.sh
Verify nodejs tools is instaled
#!/bin/bash
# Functions ==============================================
# return 1 if global command line program installed, else 0
# example
# echo "node: $(program_is_installed node)"
function program_is_installed {
# set to 1 initially
local return_=1