Skip to content

Instantly share code, notes, and snippets.

View wesleyit's full-sized avatar

Wesley Rodrigues wesleyit

View GitHub Profile
@wesleyit
wesleyit / Analisando_Acoes_e_Dados_Economicos.ipynb
Created January 23, 2024 20:19
Este notebook apresenta algumas sugestões para análise de ações e índices econômicos utilizando Python.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@wesleyit
wesleyit / Node_MCU_OLED_Show_Text.ino
Created November 10, 2023 22:15
A very simple code to display text using an OLED display built in to NodeMCU
#include <Arduino.h>
#include <U8g2lib.h>
#include <Wire.h>
// This line will initialize the OLED display properly
U8G2_SSD1306_128X64_NONAME_F_SW_I2C u8g2(U8G2_R0, /* clock=*/ 12, /* data=*/ 14, /* reset=*/ U8X8_PIN_NONE);
#define U8LOG_WIDTH 14 // Width of ulog object
#define U8LOG_HEIGHT 4 // Height of ulog object
@wesleyit
wesleyit / Kubernetes_Single_Hosst.md
Created August 23, 2023 16:16
Install and remove a single host K8S "monocluster".

Install

sudo swapoff -a

sudo apt update; sudo apt dist-upgrade -y; sudo apt autoremove -y; sudo flatpak update -y
sudo apt install kubelet kubeadm kubectl docker-ce containerd.io cri-tools kubernetes-cni
cp ~/Downloads/cri-dockerd_0.3.4.3-0.ubuntu-jammy_amd64.deb /tmp/
sudo apt install /tmp/cri-dockerd_0.3.4.3-0.ubuntu-jammy_amd64.deb
# sudo apt-mark hold kubelet kubeadm kubectl
@wesleyit
wesleyit / BRLaw.bib
Created June 14, 2023 22:33
Template for laws in Biblatex format
@brlaw{LGPD2018,
author = {BRASIL},
title = {Lei nº 13.709, de 18 de agosto de 2018},
year = {2018},
subtitle = {Lei Geral de Proteção de Dados Pessoais},
publisher = {Diário Oficial da União},
address = {Brasília, DF},
url = {http://www.planalto.gov.br/ccivil_03/_ato2015-2018/2018/lei/L13709.htm},
addendum = {Acesso em: 14/06/2023.}
}
@wesleyit
wesleyit / test_sdcard.sh
Last active May 3, 2023 12:26
There are many cheap SD Cards with different capacities than informed on labels. Check with this command how many files really can be created inside them.
for n in {001..999}; do dd if=/dev/zero of=test_image_$n bs=1M count=1000 status=progress; done
@wesleyit
wesleyit / Circular_Pontos.ipynb
Created October 5, 2022 18:18
Uma solução para circular pontos em uma imagem
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@wesleyit
wesleyit / fedora_setup.sh
Created September 25, 2022 23:30
This is a basic configuration script for my fresh installed Fedora 36+
#!/bin/bash
# Define the hostname to something very cool
hostnamectl set-hostname "linuxdragon"
# Improve the default DNF config for a blazing fast one
cat > /etc/dnf/dnf.conf <<EOF
[main]
gpgcheck=1
installonly_limit=3
@wesleyit
wesleyit / pandas_df_with_multiple_csv_files.ipynb
Created September 23, 2022 21:37
Import multiple CSV files to the same Pandas dataframe
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@wesleyit
wesleyit / xor_encrypt_decrypt.py
Created August 10, 2022 14:50
This is a simple implementation of the XOR encrypting/decrypting algorithm in python3
def encrypt(message: str, key: str) -> str:
cipher = []
for m, k in zip(message, key):
cipher += [hex(ord(m) ^ ord(k))]
return " ".join(cipher)
def decrypt(cipher: str, key: str) -> str:
message = ""
cipher = cipher.split(" ")
for c, k in zip(cipher, key):
@wesleyit
wesleyit / ubuntu_20.04_packages.sh
Created July 6, 2022 01:48
Some packages for a security setup
sudo apt install -y \
adb afl++ aircrack-ng arp-scan arping autoconf bash-completion binwalk bison braa bruteforce-luks brutespray btscanner build-essential cabextract ccrypt cewl cowsay crunch cryptmount cupp curl default-jdk dhcpdump dialog exif exiftags exiv2 fastboot fdupes flatpak foremost fortune-mod funcoeszz gddrescue gdm3 ghex git git-core gnome-boxes gnome-session-wayland gnome-software-plugin-flatpak gobuster golang gparted guymager hashcat-nvidia hashid hcxdumptool heimdall-flash-frontend hexedit hping3 hydra hydra-gtk kismet kismet-plugins libbz2-dev libffi-dev libfprint-2-tod1-goodix libfreefare-bin libgdbm-dev liblzma-dev libncurses5-dev libncursesw5-dev libnfc-bin libqt5svg5-dev libreadline-dev libsqlite3-dev libssl-dev libxml2-dev libxmlsec1-dev libyaml-dev llvm lynx make medusa memdump mono mono-complete mono-devel mono-devel mono-runtime mono-utils neofetch nikto nmap nmapsi4 oem-somerville-melisa-meta oem-somerville-meta pdfcrack pkg-config pwgen qt5-default qt5-qmake qtbase5-dev qtbase5-d