Skip to content

Instantly share code, notes, and snippets.

View lfsmoura's full-sized avatar
🏠
Working from home

Leonardo Moura lfsmoura

🏠
Working from home
View GitHub Profile
@lfsmoura
lfsmoura / deploying-hermes-agent-on-dokploy.md
Last active April 13, 2026 00:14
Deploying Hermes Agent (NousResearch) on Dokploy — step-by-step guide

Deploying Hermes Agent on Dokploy

A step-by-step guide to deploying NousResearch Hermes Agent on a VPS using Dokploy, secured with Tailscale and a locked-down firewall.

Prerequisites

  • A VPS with Dokploy installed
  • Dokploy API token (Settings → API Keys in Dokploy UI)
  • A Telegram bot token from @BotFather
  • An LLM API key (OpenAI-compatible endpoint)
@lfsmoura
lfsmoura / README.md
Created December 25, 2025 20:55
Biome GritQL plugin to enforce browserLogger instead of console in React components

Biome Plugin: no-console-in-tsx

A custom Biome GritQL plugin that prevents direct console.* usage in React components (.tsx files).

Why?

I use OpenObserve for centralized log aggregation. To ensure all browser logs are captured and sent to OpenObserve, I created a browserLogger utility that wraps console methods and forwards logs to my observability backend.

This plugin enforces that pattern by flagging any direct console.log, console.error, console.warn, console.info, or console.debug calls in React components as errors.

@lfsmoura
lfsmoura / quicksort.cpp
Created September 15, 2021 16:18
Quicksort in C++ three lines
#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
void q(std::vector<int>::iterator b, std::vector<int>::iterator e) {
auto d = std::partition(b, e, [&](int s) { return s <= *b; });
if (b < e) q(b, d - 1), q(d, e);
}