Skip to content

Instantly share code, notes, and snippets.

View Fat83dotcom's full-sized avatar
🤖
I may be slow to respond.

Fernando Mendes Fat83dotcom

🤖
I may be slow to respond.
View GitHub Profile
@Fat83dotcom
Fat83dotcom / CMakeLists.txt
Last active February 11, 2024 04:33
Configuração de um CMakeLists.txt para compilar a biblioteca C++ PQXX (versão 7.6.2) no Ubuntu 22.04 - PostgreSQL
#-- Esta versão da lib somente suporta c++20 ou superior
cmake_minimum_required(VERSION 3.0.0)
project(nome_do_projeto_cmake VERSION 0.1.0 LANGUAGES C CXX)
#-- Adiciona o caminho para o arquivo FindPQXX.cmake
list(APPEND CMAKE_MODULE_PATH "caminho para o arquivo FindPQXX.cmake")
#-- Seta flags para o compilador
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++20 -lpqxx -lpq -lfmt")
@Fat83dotcom
Fat83dotcom / create-self-signed-ssl-certificates.sh
Created December 21, 2023 00:29 — forked from luizomf/create-self-signed-ssl-certificates.sh
create openssl self-signed certificates
cd /var/lib/postgresql/13/main
# Create a self-signed certificate
openssl req -new -nodes -text -out server.csr \
-keyout server.key -subj "/CN=postgresql.otaviomiranda.com.br"
openssl x509 -req -in server.csr -text -days 3650 \
-extfile /etc/ssl/openssl.cnf -extensions v3_ca \
-signkey server.key -out server.crt
@Fat83dotcom
Fat83dotcom / ambiente-dev-ubuntu.sh
Created August 27, 2022 22:06 — forked from luizomf/ambiente-dev-ubuntu.sh
Ambiente de desenvolvimento Python no Ubuntu - Com VS Code, Google Chrome, ZSH, Oh-my-zsh, zsh-syntax-highlighting, zsh-autosuggestions e spaceship prompt.
#!/bin/bash
# Executar comandos a seguir para atualizar os pacotes
sudo apt update -y
sudo apt upgrade -y
# Instalar pacotes a seguir
sudo apt install dkms make perl gcc build-essential git curl -y
# Instalar Python 3.10 (opcional)