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
app:
address: 0x10200
end_address: 0xD3200
region: flash_primary
size: 0xC3000
external_flash:
address: 0x13B000
device: MX25R64
end_address: 0x7F0000
region: external_flash
Firmware Links
v1.4.5: https://cdn.evenreal.co/firmware/61e29fec9417f65fe7b2fe103825db8f.zip
v1.5.0: https://cdn.evenreal.co/firmware/41bcb137ef9159b92fcd51bbcf68d48d.zip
v1.5.2: https://cdn.evenreal.co/firmware/3d96374fe8f63a1ad30727772e66537b.zip
v1.5.6: https://cdn.evenreal.co/firmware/3adb8ebbd35c2343409d6d0c9fe6cbb9.zip
v1.6.3: https://cdn.evenreal.co/firmware/d9b6364bc1c054deeefca3cc3180e6bc.zip
v1.6.6: https://cdn.evenreal.co/firmware/dcfa510c090e476c10a6f6c348a22415.zip
@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
# autowarpn (completely new code by Joseph)
# licensed under gpl v2
# ported to 2.x by Kissa2k
# v2 by oqhadev fix
# - Fix cast warp stuck cause cast to self cordinate
# - Fix warp not trigger cause waiting to lockMap route queue
# - add autoWarp config Init (to lazy to edit config one by one if you have multiple bot, so just run this command via bus)
# - add condition move to warp only trigger on queue autowarp active
# - Fix trigger without gemstone, now autowarp only trigger if you had blue gemstone
@elvisoliveira
elvisoliveira / ARTICLE.md
Last active January 27, 2025 16:24
SSH over proxy
ssh USERNAME@HOST -o "ProxyCommand corkscrew PROXY_HOST PROXY_PORT %h %p ~/corkscrew-auth"

Using PHP and Twig as a Static Site Generator

In the world of static site generators, there are numerous tools that help you create static websites with little to no server-side processing. However, sometimes a simple and lightweight solution is all you need. This is where using PHP and Twig as a static site generator comes in. Although it may seem like a bit of a hack, it’s a viable option for simple projects that don’t require a large or diverse content management system.

Why PHP and Twig?

When building static websites, the main goal is usually to serve pre-rendered content that is fast and easy to deploy. PHP, a well-known server-side scripting language, has built-in functionalities that make it an excellent tool for quickly processing data and rendering templates. Twig, on the other hand, is a flexible and powerful template engine that integrates seamlessly with PHP.

By using PHP's built-in features, you can fetch and parse payloads that will serve as the general-purpose data for the site. This

@elvisoliveira
elvisoliveira / config.rb
Last active December 13, 2024 19:12
Simple data pagination on Ruby's middleman SSG
redirect "photos.html", to: "photos_1.html"
ready do
photos = @app.data.photos
start_index = 0
page_num = 1
per_page = 8
while start_index <= photos.size
proxy "photos_#{page_num}.html", "gallery.html", :locals => {

Creating a Restricted Wi-Fi Network on Linux

In certain network environments, it can be necessary to restrict web browsing on connected devices while allowing access to other services, such as SSH. One way to achieve this is by setting up a custom Wi-Fi hotspot that enforces selective network blocking. This article explores how to accomplish this setup using Linux tools, specifically ebtables for firewall rules and tcpdump for monitoring traffic.

Project Overview

In this setup, two machines were used: a “host” machine, which created the Wi-Fi hotspot, and a “client” machine, which connected to it. The host was configured to selectively block web browsing by dropping packets on HTTP and HTTPS ports, while still allowing access to the host’s SSH server.

To establish the Wi-Fi network, the linux-wifi-hotspot tool was used. This open-source project leverages [hostapd](https://en.w

ffmpeg -ss 00:28:31 -i "Reunião do meio de semana_ 26 de agosto – 1 de setembro_r720P.mp4" -to 00:02:33 -c copy "Iniciando conversas 01.mp4"