Buy Me a Coffee

Hey👋 I’m Oscar

Welcome to my technical blog!
Here, you’ll find useful insights and knowledge to help you stay ahead in the industry.
Thanks for stopping by, and I hope you enjoy what you read.
Find about me more ⬇️

OneClickTLS online certificate generator

Introducing OneClickTLS: Generate Self-Signed TLS and mTLS Certificates Instantly

Introducing OneClickTLS: Generate Self Signed TLS and mTLS Certificates Instantly If you have worked with Kubernetes, Docker, microservices, or local HTTPS development, you already know how frustrating it is to generate self signed TLS certificates. Searching for OpenSSL commands, adjusting SAN values, fixing errors, and repeating the entire process again and again. After dealing with this pain for years, I finally built a tool that removes all the friction: https://oneclicktls.com ...

Running n8n in Docker for AI Workflow

[n8n/Ollama] How to Run n8n in Docker for AI Workflow with Local Ollama Service (Windows Example)

Let’s get started with setting up an AI workflow using n8n in Docker on a Windows machine, featuring local service integration with Ollama. Whether you are familiar with n8n or starting from scratch, this guide walks you through the steps needed. Understanding the Basics n8n is a versatile, self-hosted automation tool designed to connect and automate the use of over 400 services, now including AI components. When integrated with various large language models (LLMs) such as OpenAI’s chat models, Google’s Gemini Chat Model, or Ollama, it extends its capabilities significantly. ...

Automated Docker Image Build and Push

[Docker] Simple Script to Build and Push 'latest' Docker Images with Small Changes for Pull Image Debugging

In production environments, many systems still use the latest tag for Docker images. While convenient, this makes it difficult to verify whether your program is actually pulling the updated image or just using a cached one. To properly test the pull logic, you need a workflow that repeatedly builds and pushes images tagged as latest, each with a small change so the digest is unique every time. This post shows how to do that with a lightweight alpine-based image and a simple shell script. The image size is very small and it’s very fast to build. ...

Debugging Go Programs in VSCode with Kubernetes

[Kubernetes] How to Debug Programs That Use the Kubernetes Client SDK in VSCode (Golang Example)

When you first work on a Go project that uses the Kubernetes client SDK, you might feel lost about how to debug it on your local environment. Don’t panic. It’s actually very simple once you understand what’s happening behind the scenes. I’ll walk you through how to make it work using VSCode as an example. The Common Confusion When your program is designed to run inside a Kubernetes cluster, it usually connects to the cluster using rest.InClusterConfig(). This configuration relies on the ServiceAccount token mounted at /var/run/secrets/kubernetes.io/serviceaccount/token. When you run the same program locally, that path doesn’t exist, and the SDK will fail to initialize with an error like: ...

Docker garbage characters in API responses

[Docker] `docker exec` API Responses returns Garbage Characters

When using the Docker Engine API to execute commands inside a container, some users report seeing garbage characters or random symbols appearing in the API response. These characters do not appear when the same command is executed interactively in the terminal, and they often show up inconsistently. This behavior can be confusing, but it’s actually expected under certain conditions. 1. The Issue A developer may use the Docker Exec API to run commands in containers, such as: ...

Save Text to File in n8n

[n8n] How to Save Text into a Downloadable File

Managing workflows in n8n often involves handling large chunks of text or generated content, which might exceed the limits of platforms like Slack or Discord. An effective solution is to convert this text into a file, upload it to an S3 storage bucket, and share the access URL. This guide walks you through creating a downloadable file from text using n8n and setting it up for automatic handling. 1. Save the Text into a File Start by utilizing the Code function node. Suppose your previous node outputs the following JSON: ...

Observer pattern illustration depicting a central subject with multiple observers connected

[Golang] Exploring the Observer Design Pattern with Code Example

Introduction Today, we will dive into understanding the Observer Design Pattern with a Golang code example. This pattern is a cornerstone of software design, promoting flexibility and reuse in code by managing dependencies effectively. What Is the Observer Pattern? The Observer pattern defines a one-to-many dependency between objects, ensuring that when one object (the Subject) changes its state, all its dependents (Observers) are automatically notified. This pattern is pivotal in creating an efficient and decoupled architecture. ...

Understanding cryptographic keys and certificates

[Cryptography] Understanding Public Key, Private Key, and Certificate with a Real-Life Analogy

Sometimes when developers hear about public keys, private keys, and certificates, their brain goes foggy. Let’s clean that up simply. By following this post, you will understand these concepts clearly with a real-life analogy that makes them easy to remember. 1. Public Key and Private Key A key pair consists of two mathematically linked keys: where one key locks, only the other can unlock. A message encrypted with a public key can be decrypted only with the private key. A message “signed” (not really encrypted, but mathematically processed) with a private key can be verified with the public key. 1.1 Public Key → The Mailbox Imagine a mailbox in front of a house. ...

Alternative IMAP Node for n8n

[n8n] A Reliable Alternative for the Broken IMAP Node in n8n

When the default IMAP node in n8n stopped working, I found a community-contributed solution that you can rely on. Whether you’re setting up workflows in n8n or managing existing ones, this guide will show you how to seamlessly integrate with IMAP despite the hiccups in recent n8n versions. Understanding the Problem The IMAP node in n8n has become troublesome in versions beyond 1.80.3. When a friend encountered this issue on version 1.104.2, we confirmed the problem persists even with the latest version, 1.112.6. ...

Forwarding Real Client IP in Docker Swarm

How to Forward the Real Client IP Through Traefik in Docker Swarm

Introduction In some applications, getting the real client IP address is critical. For example, web APIs, analytics systems, or rate-limiting middleware rely on it for logging, geo-location, or security. Normally, this is not a challenge. The backend can read the IP directly from X-Forwarded-For or the socket connection. However, when the application is deployed behind a Traefik proxy and running as a Docker Swarm service, things become complicated. The Issue Understanding the Request Path When an application is deployed behind Traefik in Swarm, one might assume the network request path is straightforward: ...

DigitalOcean Referral Badge
Sign up to get $200, 60-day account credit !