Skip to content

Instantly share code, notes, and snippets.

View reinaldocoelho's full-sized avatar

Reinaldo Coelho Sartorelli reinaldocoelho

View GitHub Profile
@reinaldocoelho
reinaldocoelho / install_ubuntu.sh
Last active March 16, 2024 21:04
Bash script para instalacão dos softwares Ubuntu (After reinstall)
#! /bin/bash
## Corrigir cedilha Ubuntu (principalmente navegadores)
## Detalhes: <https://gist.github.com/reinaldocoelho/3fc62b9b1e4287708eb458f5010dde8f#file-correcao-cedilha-ubuntu-md>
echo 'GTK_IM_MODULE=cedilla' | sudo tee -a /etc/environment
echo 'QT_IM_MODULE=cedilla' | sudo tee -a /etc/environment
## #######################################################
## VIA APT
## #######################################################
@reinaldocoelho
reinaldocoelho / Flux.md
Last active July 12, 2023 20:39
Documento sobre queries no InfluxDB, explicando algumas formas de organizar.

Telegraf

  • O telegraf é o sistema que recupera, processa e dispara registros de fontes para os destinos.

O telegraf é dividido na seguinte estrutura:

  1. Configurações - Configurações gerais de comportamento
  2. Inputs - Processadores de Input que vão ler alguma estrutura de entrada, seja arquivo, banco ou log.
  3. Processors - Podem
  4. Aggregators
@reinaldocoelho
reinaldocoelho / vimrc
Last active March 30, 2022 13:36
Meu arquivo vimrc para ir melhorando com o tempo.
" #################################################
" ## To use this, save this file on: ~/.vimrc ##
" ## or file /usr/share/vim/vimrc ##
" ## If error when run, verify encode (win/unix) ##
" #################################################
" Videos
" https://www.youtube.com/watch?v=lm7y2hI6zME
" HERE DEFAULT UBUNTU /etc/vim/vimrc
@reinaldocoelho
reinaldocoelho / TriggerCalculoMariaDBComDebug.sql
Created March 3, 2022 00:17
Exemplo de Trigger com MariaDB
-- EXEMPLO:
-- 1. CRIA TABELA PARA REGISTRAR LOGS
CREATE OR REPLACE TABLE TriggerLog(text varchar(200)) ENGINE=MyIsam;
-- 2. CRIA TABELA DE REGISTROS
CREATE OR REPLACE TABLE registros (
id int(11) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
cliente int NOT NULL,
valor varchar(80) COLLATE utf8_unicode_ci NOT NULL,
@reinaldocoelho
reinaldocoelho / .bash_aliases
Last active June 2, 2022 20:00
Scrips configuração ambiente Linux
## About Alias
# https://www.tecmint.com/create-alias-in-linux/#:~:text=Aliases%20are%20like%20custom%20shortcuts%20used%20to%20represent,on%20your%20profile%20by%20simply%20executing%20alias%20command.
## ##############
## ALIASES
## #############
# Como fazer:
# Ediar arquivo de profile:
vim $HOME/.bash_aliases
@reinaldocoelho
reinaldocoelho / win-term-settings.json
Last active May 1, 2022 12:46
Windows Terminal Settings
{
"$help": "https://aka.ms/terminal-documentation",
"$schema": "https://aka.ms/terminal-profiles-schema",
"actions":
[
{
"command":
{
"action": "copy",
"singleLine": false
@reinaldocoelho
reinaldocoelho / ElasticSearch.md
Last active November 22, 2022 15:27
Documento de dicas de uso do Elastic Search

Ajuda com ElasticSearch

ElasticSearch 2

ElasticSearch

Elastic search é a API do servidor de pesquisa propriamente dito e depende das portas 9200 e 9300 onde a 9200 é a API HTTP para uso.

URL Padrão: http://localhost:9200

@reinaldocoelho
reinaldocoelho / profile.ps1
Last active March 4, 2022 18:17
Powershell profile.
# Outros modulos PS instalados
Import-Module posh-git
Import-Module oh-my-posh
Set-Theme Paradox
# Salve este arquivo em: $profile (C:\Users\reinaldo\Documents\PowerShell\Microsoft.PowerShell_profile.ps1)
# Pode-se abrir direto para edição com: vim $profile
# Mais detalhes em: https://stackoverflow.com/questions/24914589/how-to-create-permanent-powershell-aliases
# Cria uma funcao para processar os comandos