Skip to content

Instantly share code, notes, and snippets.

View elvisoliveira's full-sized avatar
😄
1% talent.. 99% not being distracted by the internet

Elvis Oliveira elvisoliveira

😄
1% talent.. 99% not being distracted by the internet
View GitHub Profile
@elvisoliveira
elvisoliveira / bmp.swift
Created August 9, 2025 10:46 — forked from KingAtoki/bmp.swift
ER BMP sending
/**
* Performs a single BMP transfer attempt to a peripheral
*
* This is the core BMP transfer protocol implementation using Java-style approach:
* 1. Splits BMP data into 194-byte chunks with proper addressing
* 2. Sends packets sequentially with minimal delays
* 3. Sends end command (0x20, 0x0d, 0x0e)
* 4. Sends CRC verification using standard CRC32
*
* @param peripheral: The target CBPeripheral device
@elvisoliveira
elvisoliveira / daily-text.py
Last active April 30, 2024 11:21 — forked from alissa-maria/daily-text.py
Prints daily text + explanation to stdout
import requests
from bs4 import BeautifulSoup
url = 'https://wol.jw.org/en/wol/h/r1/lp-e'
response = requests.get(url)
html_content = response.content
soup = BeautifulSoup(html_content, 'html.parser')
@elvisoliveira
elvisoliveira / README.md
Last active September 30, 2020 14:00 — forked from franciscocpg/README.md
Import mitm certificate to CA in arch linux
  1. After installing mitmproxy run it (just type mitmproxy) in a terminal session and quit. This will create the necessaries certificates files at ~/.mitmproxy.

  2. Extract the certificate to .crt format:
    openssl x509 -in ~/.mitmproxy/mitmproxy-ca.pem -inform PEM -out ca.crt

  3. Trust the certificate into CA:
    sudo trust anchor ca.crt

  4. Import certificate into Java KeyStore using the keytool