Stackomate

@stackomate.com

A Brazilian web development company. https://stackomate.com

Ever used MessagePorts in the web platform? They’re like lightweight pipes you can pass between windows, workers, or iframes—making it easy to send messages back & forth without relying on global state. Perfect for structured, scoped communication. #WebDev #JavaScript #Workers

How a TCP connection starts: 1. Client sends a SYN packet ("let’s talk") 2. Server sends a SYN-ACK packet ("I hear you, can you hear me?") 3. Client sends a ACK packet ("I hear you") That 3-step handshake syncs sequence numbers and opens a reliable channel. #TCP #netsys

The Two Generals Problem is a classic thought experiment in distributed systems: Two generals want to coordinate an attack, but can only communicate by messenger, and the messenger might not make it through. For the attack to succeed, both generals must strike together. 👇

Ever seen -v /var/run/docker.sock:/var/run/docker.sock in a docker run command? 🐳 That’s called mounting the Docker socket. It lets a container talk directly to the Docker daemon running on the host. Tools like Portainer, Watchtower, and CI/CD runners use the mount to manage other containers.

⚠️ Security tip for Docker users: Bind your container ports to 127.0.0.1 instead of 0.0.0.0 if you only need local access: docker run -p 127.0.0.1:8080:8080 myappname This keeps your service private, since Docker can sometimes bypass firewalls and expose ports to the internet. 🔒 #docker #security

TIL: macOS has two firewalls 🧱 - Application Firewall → the one you can enable in System Settings. - Packet Filter (pf) → a hidden firewall that filters traffic at the network packet level (only configurable via Terminal). #apple #macos #firewall

Tip: RAG (Retrieval-Augmented Generation) can improve LLMs: 1️⃣ Encode query → search vector DB / index 2️⃣ Retrieve top-k docs as context 3️⃣ LLM consumes [query + retrieved chunks] → grounded output ⚡ Benefits: reduces hallucinations, adapts to new domains, and scales knowledge without retraining.

💡 Tip: TanStack Table is a headless, framework-agnostic library for building complex data grids & tables. ⚛️ Works with React, Vue, Solid, Svelte 🎨 No styles, just logic → you bring the UI If you’ve ever wrestled with tables, pagination, or sorting, this is for you: tanstack.com/table #webdev #UI

TanStack Table

Supercharge your tables or build a datagrid from scratch for TS/JS, React, Vue, Solid, Svelte, Qwik, Angular, and Lit while retaining 100% control over markup and styles.

tanstack.com

Working with Electron apps? 🖥️ You can easily list & extract .asar archives with the CLI tool: npx @electron/asar list app.asar npx @electron/asar extract app.asar ./output-folder Perfect for inspecting packaged apps 🔧✨ #electron #webdev

⚡️ Reminder for JS devs: When using fetch, don’t forget that the promise only rejects on network errors, not on HTTP errors. Always check response.ok before parsing the body, otherwise you may call .json() on a 500 HTTP error. #webdev #javascript

🐳 docker buildx drivers compared: 🔹 docker driver (default) Great for quick local builds Limited features (no multi-arch, no advanced caching) 🔹 docker-container driver Builds inside a dedicated container Supports multi-arch Recommended for CI/CD deployments