Skip to content

Instantly share code, notes, and snippets.

View ironlungx's full-sized avatar
🍁

ironlung :) ironlungx

🍁
View GitHub Profile
@ironlungx
ironlungx / SettingsManager.md
Last active February 17, 2025 21:28
Serialize & Deserialize an object (for settings)

Settings Manager for ESP32 with LittleFS

This library provides simple functions to serialize and deserialize settings or any other struct data to and from the ESP32's LittleFS (Little File System). It allows easy storage and retrieval of configuration parameters.

Features

  • Serialize any object of type T and save it as a file in LittleFS.
  • Deserialize the stored file back into an object.
  • Supports arbitrary struct types.
  • Error handling for file operations.
@ironlungx
ironlungx / xThings.md
Created November 1, 2024 15:11
X11 GTK Theme and Cursor Theme, in a window manager

I daily drive XMonad on my Arch linux distro. For like 7 months, I had no idea how to change the GTK themes & cursor themes without using programs like lxappearance Even when I used lxappearance, it was very buggy and a bad experience in general. I will be explaining how to do all that with minimal dependencies.

Set the GTK Theme

I am assumiming that you use .xinitrc to login, even if you don't you can still follow along. All GTK applications get their theme from an environment variable GTK_THEME. You can just add a line in your .xinitrc

export GTK_THEME=catppuccin-frappe-lavender-standard+default   # This is the line
exec xmonad
@ironlungx
ironlungx / rtc-ntp.md
Last active September 5, 2024 17:23
Arduino ESP32 set external RTC time using NTP

The following program sets a RTC with NTP time

#include <WiFi.h>
#include <RTCLib.h>

#include "time.h"

const char *ntpServer = "pool.ntp.org";
const long gmtOffset_sec = 0;
@ironlungx
ironlungx / nvim-pio.md
Last active February 28, 2025 07:14
PlatformIO with Neovim

Extensions

Following are the extensions required for neovim:

I use lazy.nvim so, just add the following to your plugins table, or create a new file in lua/plugins/lsp.lua

return {
	{