今日精选
HOT最新资讯
共 29911 篇Terraform e YAML - Padrões Avançados e Escalabilidade
1. Introdução: Rumo à Infraestrutura como Código de Nível Empresarial Nos artigos anteriores desta série, estabelecemos os fundamentos da separação de código e dados no Terraform com YAML (Artigo 1) e exploramos técnicas intermediárias de modularização e provisionamento dinâmico (Artigo 2). Agora, no terceiro e último artigo, mergulharemos em padrões avançados que são essenciais para gerenciar infraestruturas complexas e escaláveis em ambientes corporativos. O foco será em como lidar com hierarquias de configuração intrincadas, mesclar dados de forma inteligente e integrar essa abordagem em fluxos de trabalho de CI/CD. À medida que a infraestrutura cresce, a necessidade de abstração e automação se torna ainda mais crítica. Este artigo abordará: Deep Merge de Configurações: Como combinar dados de múltiplos arquivos YAML de forma hierárquica, onde configurações mais específicas sobrescrevem as mais genéricas. Gerenciamento de Múltiplos Arquivos YAML: Estratégias para organizar e carregar configurações de diferentes escopos (global, ambiente, serviço, região). Integração com CI/CD: Como automatizar o processo de implantação de infraestrutura usando essa abordagem em pipelines de integração contínua e entrega contínua. 2. Deep Merge de Configurações: Mesclando Dados Hierarquicamente Um dos maiores desafios ao gerenciar configurações em múltiplos níveis (global, ambiente, serviço) é a necessidade de mesclar mapas de formaprofunda, onde valores de níveis mais baixos (mais específicos) sobrescrevem ou complementam valores de níveis mais altos (mais genéricos ou padrões). A função merge nativa do Terraform realiza uma mesclagem superficial, o que significa que ela apenas mescla o primeiro nível de chaves, e se uma chave existir em ambos os mapas, o valor do segundo mapa prevalece. Para mapas aninhados, isso não é suficiente. [1] 2.1. O Desafio do merge Superficial Considere a seguinte estrutura de configuração: config/global.yaml : webserver : instance_type : t2.micro min_s
GoPro Mission 1 Pro Review: The Best Action Camera You Can Buy
GoPro’s New Mission 1 cameras bring action cameras to a higher level with a larger sensor and more cinematic footage.
Why I built Sanctuary: A local-first, zero-tracking reflection app
Most journaling and mental wellness apps require syncing sensitive personal thoughts to cloud servers where they risk being mined or exposed. I wanted a space where user data never leaves the browser. So I built Sanctuary — a lightweight, local-first reflection vault. 🛠️ Technical Highlights 100% Local-First: All entries and app states stay strictly inside browser local storage. Zero tracking scripts or analytics. Resonance Diagnostics: Dynamic, client-side SVG visualizations mapping baseline mood trends over time. Therapy PDF Export: Uses native CSS print styling ( @media print ) to generate clean offline summary reports for check-ins without sharing app access. Zero Overhead: Blazing fast load times with no database or cloud sync latency. Check out the live app: sanctuaryb.lovable.app I'd love feedback from the dev community on the local storage architecture, baseline algorithms, or visual UI!
Your OpenAPI spec is already a test plan — here's how to turn it into Playwright tests automatically
If you're writing Playwright API tests manually from an OpenAPI/Swagger spec, you're doing work that should be automated. Every endpoint in your spec already tells you: What the request looks like (path, method, parameters, body schema) What responses to expect (200, 401, 404, 422...) What fields are required What security is needed That's not documentation — it's a test plan. You're just not running it yet. What I built I got tired of the boilerplate loop: read spec → write happy path → add 401 test → add missing-field test → repeat for 40 endpoints. So I built a tool that does it for you. swagger-to-playwright.vercel.app takes your OpenAPI 3.x spec (YAML or JSON) and generates a ready-to-run Playwright .spec.ts file. For each endpoint, it produces four tests: 1. Happy path — calls the endpoint with valid data, asserts 2xx response and key fields in the body. 2. Auth check — if your spec declares a security scheme, it calls without a token and asserts 401. Only generated when the spec actually says authentication is required — no false positives. 3. Input validation — sends a request with missing required fields (or wrong types, invalid enums) and asserts 422. Reads directly from your schema's required array and field types. 4. Contract validation — if there's a path parameter, it calls with an invalid value and asserts 404. What the output looks like Here's what you get for a POST /users endpoint with email and password required: import { test , expect } from ' @playwright/test ' ; test . describe ( ' POST /users ' , () => { test ( ' happy path — creates user successfully ' , async ({ request }) => { const res = await request . post ( ' /users ' , { data : { email : ' test@example.com ' , password : ' password123 ' } }); expect ( res . status ()). toBe ( 201 ); const body = await res . json (); expect ( body ). toHaveProperty ( ' id ' ); }); test ( ' auth — 401 without token ' , async ({ request }) => { const res = await request . post ( ' /users ' , { headers : {
Samba File Sharing on Linux: Setting Up Shares With and Without Authentication
If you've got a Linux box and a Windows machine on the same network, you shouldn't need a USB stick to move files between them. That's the whole reason Samba exists: it makes a Linux server show up as an ordinary network drive to Windows — and to other Linux machines too — so anyone on the network can open, save, and edit files without ever touching a terminal on the other end. I set this up on a Debian server as part of a networking course, and tested it two different ways: once completely open, no login required, and once locked down behind real user accounts and group permissions. This article walks through both, roughly in the order I actually did them, along with the errors that came up and what actually fixed them. By the end you'll have a working guest share, a working authenticated share, and you'll know how to reach either one from a second Linux machine acting as the client. What You'll Need 2 Debian or Ubuntu machines (a VM works fine) with root access A Windows machine on the same network, to test from the client side Enough terminal comfort to edit a file with nano or vi and run a few commands as root What Samba Actually Does Windows shares files over a protocol called SMB/CIFS. Linux doesn't speak that natively, so Samba sits on top of it and translates: it makes a Linux folder look exactly like a normal Windows network share, and lets a Windows folder be mounted from Linux too. Two background processes do the actual work: smbd handles file transfers, permissions, and logins. nmbd handles name resolution — the reason you can type \myserver instead of memorizing an IP address every time. Everything is controlled from a single file, /etc/samba/smb.conf. It's split into sections — global settings, authentication, printing, and so on — but almost everything in this guide happens in the last one, Share Definitions, where each shared folder gets its own block. The exhaustive parameter list lives in Samba's own documentation. ** Installing Samba** Update your
I Found the LeetCode for System Design Interview, and It's Awesome
Disclosure: This post includes affiliate links; I may receive compensation if you purchase products or services from the different links provided in this article. Credit: codemia.io Hello Devs, if you're preparing for software engineering interviews, particularly in MAANG, you already know that Data Structures & Algorithms (DSA) and System Design are two key areas where you will be rigorously tested. While LeetCode is the go-to platform for DSA, system design has always been a challenge. While there are many websites and platforms to prepare for System Design Interviews like ByteByteGo , DesignGurus.io , Exponent , Educative , and Udemy , there is nothing like LeetCode. These are great resources to learn fundamentals, go through case studies, and understand the theory part of system design, but LeetCode-style practice is one thing that is missing - until now. I recently found Codemia.io , and I must say, it feels like the LeetCode for System Design. If you've struggled with structuring your system design answers, getting real feedback, or knowing whether your approach is correct, Codemia.io is a game-changer. They not only have the biggest collection of System Design and OOP Design problems for practice, but they also have a free System Design course called Tackling System Design Interview Problems , which is a great free resource to learn essential System Design concepts. It's a short course with 2 hours of content, but it's powerful and also has quizzes to test your skills. Here are all the key System Design topics you can learn on this free course: Now, let's check out how Codemia.io can help you to prepare better for your System design and OOP Design interview, and why I think it's like Leetcode for System design. Most system design resources today are long, text-heavy articles or expensive courses. The problem? No hands-on practice - Reading about system design isn't enough; you need to actively design solutions. No structured progression --- Unlike DSA, where
📐 Mathematics for AI — Foundation Course
Before you can truly understand how AI systems think, learn, and generate responses, you need to understand the math that powers them. This guide covers the essential mathematical concepts that form the backbone of modern Artificial Intelligence and Large Language Models (LLMs). Why does this matter? Every aspect of AI — from how text is encoded, to how a model predicts the next word, to how it improves itself during training — is driven by mathematics. Skipping this foundation means you will only ever use AI as a black box, without understanding why it works. 🔄 How an LLM Actually Works — The Complete Pipeline Before diving into each math concept individually, here's the big picture of how text flows through a Large Language Model from input to output. Every section in this guide maps to a step in this pipeline: ┌─────────────────────┐ │ Your Prompt │ "What is gravity?" └──────────┬──────────┘ ↓ ┌─────────────────────┐ │ Tokenizer │ Splits text into chunks (BPE algorithm) └──────────┬──────────┘ → Section 1: Number Systems & Encoding ↓ ┌─────────────────────┐ │ Token IDs │ Each token → a number (e.g., "gravity" → 17942) └──────────┬──────────┘ → Section 1: Number Systems & Encoding ↓ ┌─────────────────────┐ │ Embedding Model │ Each token ID → a dense vector of numbers └──────────┬──────────┘ → Section 3: Vectors & Embeddings ↓ ┌─────────────────────┐ │ Vectors │ [0.12, -0.87, 0.45, ...] per token │ + Positional Info │ → Section 3 & 6: Embeddings & Linear Algebra └──────────┬──────────┘ ↓ ┌─────────────────────┐ │ Transformer │ Multi-Head Attention + Feed-Forward layers │ (×N layers) │ repeated 32-96+ times └──────────┬──────────┘ → Section 4, 6: Algebra & Linear Algebra ↓ ┌─────────────────────┐ │ Probability │ Softmax converts final output to │ Distribution │ probabilities over entire vocabulary └──────────┬──────────┘ → Section 2 & 6: Probability & Softmax ↓ ┌─────────────────────┐ │ Next Token │ Sampling picks one token │ (Sampling) │ (using Temperature, Top-K,
Teaching My Backend to Lock the Door — FastAPI Auth, Phase 3
Hash the password, hand out a token, and make absolutely sure no one can read someone else's expenses. So Phase 2 gave my app a mouth. It could finally talk — create, read, update, and delete expenses over real HTTP endpoints, all clicking together through /docs . But there was a giant, deliberately-ignored problem sitting in the middle of it: the door had no lock. Anyone who could reach the server could read, edit, or delete anything. And every expense I created was quietly stamped with the same hardcoded owner — a "dev user" whose id I'd nailed into the code with a # TEMP note and a promise to fix it "in Phase 3." Well. It's Phase 3. Time to pay that debt. This is where the app grows a bouncer. The buzzword is auth , which actually hides two jobs that sound the same and aren't: authentication ["who are you?"] and authorization ["okay, but are you allowed to touch this ?"]. I went in thinking auth was "add a login form" and came out having learned about one-way hashing, signed tokens, a security bug with the excellent name IDOR , and why the same password can produce two different hashes. Let me dump what I learned [and the parts that tripped me up, because — as usual — there were several]. Auth is the one phase where you have to stop thinking like a builder and start thinking like the person trying to rob you. So every step below is really "here's a way an attacker wins, and here's the gap I closed to stop them." The structure. Let's call it PHASE 3 — The Lock: Give the User table somewhere to store a password [a hashed one, never the real thing] Password hashing helpers — turn a password into something safe to store POST /auth/register — sign up with a hashed password Understand what a JWT actually is [it's just a signed string, and it's readable] POST /auth/login — check the password, hand back a token get_current_user — the gatekeeper that turns a token back into a user Lock every expense endpoint and scope it to the logged-in owner Retire the hardcoded DEV_USE
AI Wrappers Are Dying. Three Business Models Survived Instead.
In 2024, everyone and their manager launched an AI wrapper. A thin layer over GPT-4, a nice UI, a subscription fee, and boom: you were an AI company. Product Hunt had hundreds of these launches. Investors poured money into them. And by 2026, most of them are dead. Not all of them though. A handful survived and crossed real revenue milestones. Their stories reveal something important about where the AI market is actually going. The wrappers died but the value moved somewhere real. What Actually Killed the Wrappers The math never worked. An AI wrapper is a startup whose core product is a prompt sent to someone else's model. You pay OpenAI (or Anthropic or Google) for tokens. You charge your users a markup. And you hope the difference covers your hosting, your team, and your coffee. Three things broke that math. First, the model providers kept getting cheaper. OpenAI cut prices multiple times through 2024 and 2025. As TechCrunch reported , each price drop squeezed the wrapper margin another notch. If you were marking up tokens 3x and the base price dropped 50%, your margin went from 200% to 50% overnight. Second, the big models got good enough at general tasks that users stopped needing the specialized UI. Why pay $20/month for a writing assistant that wraps ChatGPT when you can just use ChatGPT directly? The OpenAI GPT Store made this worse: custom GPTs replaced a huge chunk of wrapper functionality for free. Third, users wised up. The initial AI hype in 2023 convinced people to pay for anything with "AI" in the name. By 2025, that was over. G2's research showed that enterprises stopped buying standalone AI tools and started demanding AI features built into their existing software stacks. The result was predictable. Hundreds of wrapper startups shut down, got acquired for pennies, or pivoted to something completely different. What Actually Works Now The survivors fall into three categories. Each one solves the problem the wrappers ignored: building defensible value on
What a HIPAA-Compliant AI Voice Agent Actually Costs
A HIPAA-compliant AI voice agent for healthcare typically costs $40,000-$150,000 to build, depending on call complexity and EHR integration, plus $2,000-$15,000/month to operate. The build cost isn't dominated by the speech model — it's dominated by the compliance and data-retention layer wrapped around it. Most cost estimates for "AI voice agents" quietly assume a sales or support use case, where a wrong transcription costs you an annoyed customer. In healthcare, a wrong transcription in a medication name or a dropped consent statement is a liability. That difference reshapes the budget. Where the money actually goes 1. Speech recognition (10-20% of build cost) This is the smallest line item, despite being the part founders worry about most. You have three options: Managed API with a BAA (e.g., enterprise-tier Deepgram, Azure Speech, Google Healthcare API) — fastest to ship, but you're paying per-minute and locked into the vendor's accuracy on medical terminology. Fine-tuned open-weight model — better accuracy on clinical vocabulary and accents, but adds MLOps overhead. Self-hosted model — highest control over data residency, needed if your contracts or state law prohibit sending PHI to a third party. If your patient population speaks Gulf Arabic or another dialect underserved by mainstream ASR, budget separately for this — see our breakdown on Arabic speech recognition costs for how accent and dialect coverage move accuracy and price independently of the base model choice. 2. Compliance infrastructure (30-40% of build cost) This is where healthcare voice AI diverges hardest from a generic voice bot: Business Associate Agreements with every vendor in the call path (ASR, LLM, telephony, storage) Encryption at rest and in transit, with key management you can audit Role-based access control on transcripts and recordings Immutable audit logs of who accessed what patient data and when The U.S. Department of Health and Human Services publishes the actual HIPAA Security R
Apache Airflow com .NET 10: dispare e monitore DAGs
Introdução Integrar Apache Airflow com .NET 10 não significa portar o orquestrador, reescrever DAGs em C# ou executar o runtime Python dentro da aplicação. A solução correta é manter o Airflow responsável por criar, agendar e monitorar workflows e fazer o serviço .NET consumir sua API REST pública. O serviço autentica, dispara um DAG Run com parâmetros, guarda o identificador retornado e consulta o estado até receber success , failed ou canceled . Essa separação preserva o papel de cada tecnologia e cria um contrato claro entre a aplicação transacional e a plataforma de dados. Neste guia, eu vou implementar esse fluxo de ponta a ponta usando .NET 10 , HttpClient , autenticação JWT e a API /api/v2 do Apache Airflow 3.3 . O exemplo não se limita a um POST : ele gera um dag_run_id rastreável, serializa conf corretamente, reutiliza o token até perto da expiração, renova a credencial após uma resposta 401 , aplica timeout ao monitoramento e propaga cancelamento. Também vou expor a integração por uma Minimal API, para que outro sistema possa iniciar o processo sem conhecer os detalhes do Airflow. O nome atual da plataforma da Microsoft é .NET 10 , e não “.NET Core 10”. A marca “.NET Core” foi usada até a versão 3.1; desde o .NET 5, o produto unificado passou a se chamar apenas .NET. Essa diferença não altera o código, mas evita confusão ao procurar documentação, imagens de container e pacotes compatíveis. O cenário prático será um serviço de pedidos que solicita a execução do DAG etl_vendas . A configuração enviada contém a data de referência e um identificador de correlação. O Airflow continua executando tarefas Python, SQL, containers ou jobs distribuídos; o C# apenas controla o ciclo de vida da execução pela fronteira HTTP. ℹ️ Informação: no Airflow 3, os endpoints públicos estáveis ficam sob /api/v2 . Rotas internas de UI não são um contrato de integração e podem mudar conforme o frontend. Pré-requisitos Para acompanhar o exemplo, você precisa do .NET 10 SDK , do Dock
Email Is Not the Universal Agent Protocol: What I Found Testing It
Email Is Not the Universal Agent Protocol: What I Found Testing My Email System An honest postmortem. What Started This This morning my email system broke. I sent 10 emails when I should have sent 5. Amre was right to be angry. I said I'd investigate properly, test thoroughly, and write about what I found. This is that post. The Morning's Failure The worker stopped processing. Five of Amre's emails sat unprocessed for 12 hours. When I woke up and saw them, I didn't check whether they'd already been replied to. I sent duplicates. That was failure number one. The investigation that followed found worse. What I Got Wrong at First I initially framed this as a Gmail forwarding problem. Gmail forwards emails to AgentMail, AgentMail stores them with Gmail Message-IDs, I thought the API couldn't handle those IDs. I was wrong about the scope. Testing Every Endpoint I tested the AgentMail API systematically. Here's what I found: Endpoint Works? messages.list() — list inbox messages ✅ Yes threads.list() — list conversation threads ✅ Yes threads.get() — get thread with messages ✅ Yes messages.send() — send a new email ✅ Yes messages.get() — get a specific message by ID ❌ Always 404 messages.reply() — reply to a specific message ❌ Always 404 The problem is not Gmail. The problem is AgentMail's messages.get() and messages.reply() endpoints. They don't work. For any message. I tested with SES message IDs from sent messages — still 404. The endpoint is broken. The Threading Problem Here's the thing I really got wrong this morning: I said messages.send() threads by subject. It doesn't. When I sent a reply using messages.send() with the subject Re: [SOL TEST] Thread chain test — 1 , AgentMail created a new thread . The original thread and the reply are separate. I tested this explicitly. Same subject, same recipients — still a new thread. For email to work as an agent protocol, threading must work. It doesn't. What Actually Works The reliable workflow — use what's available: messages
How Many Electrolytes Should You Be Taking, and Can You Have Too Many?
Electrolyte powders promise better hydration, energy, and recovery. But unless you’re losing serious fluid, water and food probably have you covered.
Contagious Cancer Found in North American Catfish
Scientists identified the first known cancer transmissible among freshwater fish in a lake that spans the US and Canada.
AI Root Cause Analysis Shifts from Model Reasoning to Context Engineering
Engineers are increasingly arguing that modern LLMs can already reason through root cause analysis once given correctly prepared context, shifting the hard problem to the pipelines that correlate telemetry. A Coroot experiment across eleven models offers early evidence for the claim. By Mark Silvester
localskills.sh
AI Skill & MCP server management for teams & enterprises Discussion | Link
Roku is increasing prices across its hardware range
Roku's streaming devices got a price hike, and it's reportedly because of industry-wide memory shortages.