Skip to content

Instantly share code, notes, and snippets.

View earaujoassis's full-sized avatar
👻
Hey, there!

Carlos A. earaujoassis

👻
Hey, there!
View GitHub Profile

Keybase proof

I hereby claim:

  • I am earaujoassis on github.
  • I am earaujoassis (https://keybase.io/earaujoassis) on keybase.
  • I have a public key ASAFhWy_wlxvQFr6i7DtCh_Hr0Q5sQdighF0OmmiZMoLogo

To claim this, I am signing this object:

@earaujoassis
earaujoassis / instructions.md
Last active March 15, 2021 03:12
Creating your own certificate authority + signed certificates

Creating your own certificate authority + signed certificates

1. Creating the Certificate Authority

First, we create a private key for the certificate authority and then a root certificate, which will be used to sign the other certificates.

$ openssl genrsa -des3 -out your-certificate-authority.key 4096
$ openssl req -x509 -new -nodes -key your-certificate-authority.key -sha256 -days 1095 \
@earaujoassis
earaujoassis / clone_schema_function.sql
Created October 18, 2018 15:20
Clone schemas in Postgresql (it doesn't copy/clone data)
CREATE OR REPLACE FUNCTION clone_schema(source_schema text, dest_schema text) RETURNS void AS
$BODY$
DECLARE
objeto text;
buffer text;
BEGIN
EXECUTE 'CREATE SCHEMA ' || dest_schema ;
FOR objeto IN
SELECT TABLE_NAME::text FROM information_schema.TABLES WHERE table_schema = source_schema