Skip to content

Instantly share code, notes, and snippets.

View gleicon's full-sized avatar

Gleicon Moraes gleicon

View GitHub Profile
@gleicon
gleicon / 01 main.cf
Created June 7, 2024 19:54 — forked from kraba/01 main.cf
Postfix (RBL/DNSBL/BL) + Dovecot + Postgrey + Spamassassin + Clamav + Sieve + Roundcube + Postfixadmin : https://wiki.matteobasso.com/Postfix_%26_Dovecot_:_installation_procedure
biff = no
myhostname = mail.mysite.org
mydomain = mysite.org
myorigin = /etc/mailname
mydestination = $myhostname, localhost.$mydomain, localhost
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
@gleicon
gleicon / main.dart
Created January 27, 2024 14:39
Generated code from pixels2flutter.dev
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
@gleicon
gleicon / make-icpbrasil-bundle.sh
Created October 31, 2023 12:07 — forked from skarllot/make-icpbrasil-bundle.sh
Download ICP-Brasil certificates and make a bundle
#!/bin/bash
HTTPADDR=http://acraiz.icpbrasil.gov.br/credenciadas/CertificadosAC-ICP-Brasil/ACcompactado.zip
DEST=/etc/ssl/certs/icp-brasil
mkdir -p ${DEST}
cd ${DEST}
rm -f *.crt
rm -f *.zip
@gleicon
gleicon / id_rsa_encryption.md
Created September 13, 2023 02:06 — forked from fcoury/id_rsa_encryption.md
Encrypt/Decrypt a File using your SSH Public/Private Key on Mac OS X

A Guide to Encrypting Files with Mac OS X

This guide will demonstrate the steps required to encrypt and decrypt files using OpenSSL on Mac OS X. The working assumption is that by demonstrating how to encrypt a file with your own public key, you'll also be able to encrypt a file you plan to send to somebody else using their private key, though you may wish to use this approach to keep archived data safe from prying eyes.

Too Long, Didn't Read

Assuming you've already done the setup described later in this document, that id_rsa.pub.pcks8 is the public key you want to use, that id_rsa is the private key the recipient will use, and secret.txt is the data you want to transmit…

Encrypting

$ openssl rand 192 -out key

$ openssl aes-256-cbc -in secret.txt -out secret.txt.enc -pass file:key

@gleicon
gleicon / Cargo.toml
Created December 16, 2022 18:36
rust and symspell
[package]
name = "aho-exploration"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
aho-corasick = "0.7.19"
symspell = "0.4.3"
library(readxl)
library(readr)
library(tidyverse)
library(lubridate)
library(rsiconfi)
arquivo_geral <- read_excel("HIST_PAINEL_COVIDBR_30jun2020.xlsx",
col_types = c("text", "text", "numeric",
"text", "numeric", "numeric", "numeric",
"date", "numeric", "text", "numeric",
@gleicon
gleicon / mapa_eleicoes_deformado.r
Created November 19, 2022 20:29 — forked from fernandobarbalho/mapa_eleicoes_deformado.r
Gera mapa do Brasil deformado de acordo com variação da votação do PT entre 2018 e 2022 (2º turno)
library(readr)
library(tidyverse)
library(data.table)
library(geobr)
library(cartogram)
library(sf)
library(colorspace)
@gleicon
gleicon / mobile-headers.sh
Created August 11, 2022 13:53 — forked from quarkness/mobile-headers.sh
request headers with iphone / desktop user-agent
#!/bin/sh
echo "iPhone:"
curl -I -H "User-Agent: Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_3_2 like Mac OS X; nl-nl) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8H7 Safari/6533.18.5" $1
echo "Desktop:"
curl -I -H "User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/534.55.3 (KHTML, like Gecko) Version/5.1.5 Safari/534.55.3" $1
@gleicon
gleicon / audit-on-push.yml
Created January 6, 2022 16:55 — forked from LukeMathWalker/audit.yml
GitHub Actions - Rust setup
name: Security audit
on:
push:
paths:
- '**/Cargo.toml'
- '**/Cargo.lock'
jobs:
security_audit:
runs-on: ubuntu-latest
steps:
@gleicon
gleicon / lcd_arduino.ino
Created October 29, 2021 21:28
LCD Keypad 1602 and Arduino backlight bright control using up/down keys
#include <LiquidCrystal.h>
//LCD pin to Arduino
const int pin_RS = 8;
const int pin_EN = 9;
const int pin_d4 = 4;
const int pin_d5 = 5;
const int pin_d6 = 6;
const int pin_d7 = 7;
const int pin_BL = 10;