Skip to content

Instantly share code, notes, and snippets.

View fernandoeqc's full-sized avatar
😃

Fernando Carneiro fernandoeqc

😃
View GitHub Profile
@fernandoeqc
fernandoeqc / .nanorc
Created October 1, 2025 13:18
nanorc template
## Credits to [p4bl0](https://www.reddit.com/user/p4bl0/)
# editing
set softwrap
set atblanks
set autoindent
set trimblanks
set tabsize 4
@fernandoeqc
fernandoeqc / mbedtls-errors.txt
Created May 8, 2025 16:31 — forked from erikcorry/mbedtls-errors.txt
Mbed TLS error codes
High level error codes
0x1080 PEM - No PEM header or footer found
0x1100 PEM - PEM string is not as expected
0x1180 PEM - Failed to allocate memory
0x1200 PEM - RSA IV is not in hex-format
0x1280 PEM - Unsupported key encryption algorithm
0x1300 PEM - Private key password can't be empty
0x1380 PEM - Given private key password does not allow for correct decryption
0x1400 PEM - Unavailable feature, e.g. hashing/encryption combination
@fernandoeqc
fernandoeqc / autobitrate.py
Last active August 22, 2022 12:07
automatic bitrate detect
import can
import time
import sys
msg1 = can.Message(arbitration_id=0xabcd, data=[1,2,3])
def formated_bitrate(btr: int):
return f"{int(btr/1000)} Kbps"
def sending(btr: int) -> bool:
@fernandoeqc
fernandoeqc / plotSerial.py
Created December 8, 2021 23:44
Plota os dados vindos da serial.
import matplotlib.pyplot as plt
import matplotlib.animation as animation
import serial
__FORECAST_DATA = 10 #Linha de previsao dos dados
# initialize serial port
ser = serial.Serial()
ser.port = 'COM3' # Arduino serial port
ser.baudrate = 115200