Skip to content

Instantly share code, notes, and snippets.

View Davidsonts's full-sized avatar
👽
Apenas que ..., busquem conhecimento!

Davidson Santos Davidsonts

👽
Apenas que ..., busquem conhecimento!
View GitHub Profile
@Davidsonts
Davidsonts / gist:87bffff47fbeb377f2399d0fbb6d47b7
Last active October 28, 2025 20:09
verificar certificado
openssl pkcs12 -in certificado.pfx -clcerts -nokeys -out publico.pem -legacy
openssl x509 -in publico.pem -text -noout | grep Issuer
Issuer: C=BR, O=ICP-Brasil, OU=Secretaria da Receita Federal do Brasil - RFB, CN=AC Certisign RFB G5
CA Issuers - URI:http://icp-brasil.certisign.com.br/repositorio/certificados/AC_Certisign_RFB_G5.p7c
openssl pkcs7 -inform DER -print_certs -in AC_Certisign_RFB_G5.p7c -out cadeia.pem
openssl verify -CAfile cadeia.pem publico.pem
@Davidsonts
Davidsonts / comandos-docker
Created January 16, 2025 12:29 — forked from morvanabonin/comandos-docker
Comandos do Docker
Segue a lista de comandos docker e sua utilidade:
docker attach – Acessar dentro do container e trabalhar a partir dele.
docker build – A partir de instruções de um arquivo Dockerfile eu possa criar uma imagem.
docker commit – Cria uma imagem a partir de um container.
docker cp – Copia arquivos ou diretórios do container para o host.
docker create – Cria um novo container.
docker diff – Exibe as alterações feitas no filesystem do container.
docker events – Exibe os eventos do container em tempo real.
docker exec – Executa uma instrução dentro do container que está rodando sem precisar atachar nele.
@Davidsonts
Davidsonts / bkp_postgres.sh
Created November 14, 2024 18:45 — forked from rafabarzotto/bkp_postgres.sh
Script Backup Postgres
#!/bin/bash
#################### SCRIPT PARA BACKUP POSTGRES ####################
# Jeferson R. Costa <[email protected]> #
# Created Feb, 2013 #
# Update Feb, 2013 #
# Definindo parametros do MySQL
echo " -- Definindo parametros do PGSQL ..."

Oh my zsh.

Oh My Zsh

Install ZSH.

sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh

Install Oh my ZSH.

@Davidsonts
Davidsonts / Email Server (Linux, Unix, Mac).md
Created May 2, 2023 22:40 — forked from surajitbasak109/Email Server (Linux, Unix, Mac).md
Setup Local Mail Server using Postfix for Laravel

Setup Local Mail Server using Postfix for Laravel

You can follow these steps to create your own local mail server using postfix.

Before that we need to learn what is Postfix? Postfix is a mail transfer agent (MTA) that routes and delivers electronic mail. And Mail transfer agent is a software that transfers electronic mail from one computer to another computer using Simple Mail Transfer Protocol(SMTP).

Here we are going to use local mail for that and we will use sendmail driver for our laravel project.

1 - Point localhost.com to your machine

@Davidsonts
Davidsonts / make_certs.sh
Created September 13, 2022 14:28 — forked from mediaupstream/make_certs.sh
extract ca-certs, key, and crt from a pfx file
#!/bin/bash
#
# Usage:
# ./make_certs.sh test.example.com
#
# The required input to make_certs.sh is the path to your pfx file without the .pfx prefix
#
# test.example.com.key
# test.example.com.crt (includes ca-certs)
@Davidsonts
Davidsonts / configurar_pyenv.md
Created May 2, 2022 12:03 — forked from luzfcb/configurar_pyenv.md
instalar pyenv no ubuntu

baseado no meu outro tutorial https://gist.github.com/luzfcb/1a7f64adf5d12c2d357d0b4319fe9dcd

Use o pyenv https://github.com/pyenv/pyenv para baixar, instalar e gerenciar múltiplas versões do INTERPRETADOR Python na sua maquina.

Primeiro instale as dependências:

Linux (Ubuntu):

Abra um terminal, apertando o atalho CRTL + ALT + T ou digite aperte a tecla do windows e digite terminal, ou clique com o botão direito na tela, e escolha a opção "Abrir Terminal" (somente para Ubuntu 15.10 ou superior, para 14.04 é necessário instalar o pacote nautilus-open-terminal e reiniciar)

@Davidsonts
Davidsonts / gist:bf96ec1956391fb8899826eea7ccb8f4
Created April 30, 2022 11:49 — forked from christofluethi/gist:646ae60d797a46a706a5
Convert m4a to mp3 on OS X command line using ffmpeg
brew update
brew link yasm
brew link x264
brew link lame
brew link xvid
brew install ffmpeg
ffmpeg wiki:
https://trac.ffmpeg.org/wiki/Encode/MP3
@Davidsonts
Davidsonts / README.md
Created December 13, 2021 15:45 — forked from thurow/README.md
Validação de CPF e CNPJ com integração com React Forms, implementado com Angular 6.

Exemplos

Uso com reactive forms

new FormGroup({
    cpf: new FormControl('', [
        Validators.required,
        Validators.pattern(/^(\d{3}\.){2}\d{3}\-\d{2}$/),
 Validators.minLength(14),
@Davidsonts
Davidsonts / letsencrypt_apache_2018.md
Created September 29, 2021 11:10 — forked from omushpapa/letsencrypt_apache_2018.md
How to configure SSL using LetsEncrypt and Certbot on Apache in Ubuntu 16.04

How to setup Let's Encrypt for Apache on Ubuntu 16.04

In the following, we're setting up mydomain.com.

Challenges are served from /var/www/letsencrypt.

Apache snippets

First we create two snippets (to avoid duplicating code in every virtual host configuration).