Painel de Notícias

Tecnologia

7045 posts · 26 feeds · tópicos e interesse por Jev

Filtros
dev.to

Create an Interactive Audio Story Generator

Introduction Hey devs! Have you ever wanted to turn a simple script into a living, breathing audio experience? Imagine a choose‑your‑own adventure where the narrator’s voice changes based on the player’s choices, or a podcast that adapts on the fly to the listener’s mood. That’s the power of an Interactive Audio Story Generator (IASG). In this post we’ll walk through building one from scratch, leveraging modern text‑to‑speech (TTS) and voice‑cloning tech. And if you’re curious about the best tool for the job, keep an eye on the section about ElevenLabs—trust me, you’ll want to try it out. Accessibility: Audio narratives reach users who can’t read easily or prefer listening. Immersion: Dynamic narration feels like a conversation with the story itself. Scalability: Once the TTS pipeline is set up, you can generate thousands of unique episodes without a human narrator. The core of any IASG is a voice engine that can produce natural, expressive speech from text. That’s where TTS and voice cloning come in. Let’s start with a lightweight stack: Python for the backend TTS orchestration. FastAPI to expose a simple HTTP endpoint. WebSocket (via fastapi-websocket) to stream audio chunks to the front end. React on the client for UI and audio playback. You can bootstrap this with: pip install fastapi uvicorn python-multipart websockets npm create vite@latest ia-story -- --template react ElevenLabs offers a developer‑friendly TTS API with high‑fidelity voice models and voice cloning capabilities. Their pricing is straightforward and the SDKs are well documented. Here’s how to get started in Python: import requests ELEVENLABS_API_KEY = "YOUR_API_KEY" BASE_URL = "https://api.elevenlabs.io/v1" def synthesize(text, voice_id="en-US-Standard-A"): headers = { "xi-api-key": ELEVENLABS_API_KEY, "Content-Type": "application/json", } payload = { "text": text, "voice_id": voice_id, "model_id": "eleven_monolingual_v1", } resp = requests.post(f"{BASE_URL}/text-to-speech/{voice_id}", json=payl

Dev
Interesse
dev.to

47 of 360 VPS IPs are blacklisted. All 47 are on exactly one list — and 87% of them on the same one.

47 of 360 VPS IPs are blacklisted. All 47 are on exactly one list — and 87% of them on the same one. Checking an IP against a DNSBL and seeing "listed" feels like a verdict. Across 360 IPs sampled from 12 VPS providers, 47 came back listed — 13.1%. That number on its own would make you avoid datacenter IPs entirely. It shouldn't. Every single one of the 47 appears on exactly one list. Not one IP in the sample is listed by two or more providers. Eight public DNSBLs, 360 IPs each: Blocklist Hits dnsbl.spfbl.net 41 all.s5h.net 3 hostkarma.junkemailfilter.com 2 dnsbl.dronebl.org 1 bl.blocklist.de 0 bl.spamcop.net 0 dnsbl-1.uceprotect.net 0 psbl.surriel.com 0 Four of the eight lists returned zero hits across the entire sample. SpamCop, UCEProtect, blocklist.de and PSBL — the names people actually recognise — listed nothing. 41 of the 47 hits — 87% — come from a single list, dnsbl.spfbl.net. That matters because SPFBL is an aggressive, largely automated service with a low bar for inclusion. A listing there is not the same signal as a listing from an established operator, and the two should not be read as equivalent. Take RackNerd: 25 of its 30 IPs are listed, all on SPFBL, spread across 25 different /24 blocks. Read alone, "25/30 blacklisted" sounds damning. Read against the table above, it means one list operator has decided to list most of a network that four other major operators have never touched. At the other end, Contabo is 0/30 across all eight lists. If you run an IP reputation check and see a single listing from an automated list you don't recognise, while the established names come back clean, the correct reading is probably "one list operator's policy", not "this IP is dirty". Cross-check against several established lists before acting on it. 360 IPs, 12 providers, 30 IPs each, sampled from each provider's announced BGP prefixes at /24 granularity. Same seed (20260928), reproducible. All 360 had a BGP origin ASN equal to the target provider. The 360 raw record

Infra
Interesse
dev.to

How to Govern 3 Named Image Transformations and Inline Operation Lists

Short answer: For marketplace listings in a B2B SaaS product, put every public image variant behind one moderation decision. Use versioned named transformations for three approved display roles. Keep inline operation lists for experiments that cannot publish until reviewed. The choice is about which bytes can reach a buyer after a seller replaces a photo. Choice Moderation coverage Change surface Named roles One allowlist of publishable roles A recipe edit affects every caller Inline lists Each distinct list needs policy validation A caller can alter one rendition Pick named roles when the same image appears in thumbnails, search results, and detail views. Pick inline lists when renditions genuinely differ and the delivery gateway validates every operation. Neither option makes an unreviewed upload safe. The gate matters more. Moderate the source before issuing a public delivery reference. Bind the decision to the exact source revision. If a seller replaces a photo, approval of the old bytes must not authorize derivatives of the new bytes. Keep originals private and public renditions behind the same access check. A deny decision must stop all roles, including cached outputs; plan cache invalidation and authorization together. A named role limits which outputs exist, but does not substitute for content review. Cropping can hide context that an original-image check relied on. Inline lists can introduce a new crop without a reviewer noticing. Check the input revision and review transformations that substantially change visible content. Count approved source revisions whose every reachable public variant is governed by the same decision, divided by source revisions with any reachable public variant. Separately count denied revisions that remain reachable. The target for that second count is zero. An upload-job success rate cannot detect a cached derivative leaking after a reversal. Consider a replacement arriving between approval and delivery: the approval record still

SegurançaDev
Interesse
dev.to

Comparing Prometheus Pull and Push API Custom Metrics for Small SaaS Node.js

Short answer: start with a push-style metrics API when a small Node.js team needs to judge a flagged property-pricing rule from a few application-level signals. Choose Prometheus plus Grafana when scrape-based infrastructure coverage, Kubernetes integrations, or sophisticated querying matter more than setup weight. The deciding variable is signal quality versus noise, not dashboard polish. For a solo founder, Infrai's native surface also exposes consistent per-call cost, vendor, and latency metadata. Those fields make the monitoring path's own overhead visible while the pricing experiment runs; they are a supporting benefit, not a substitute for application metrics. For this rollout, report the smallest useful set: evaluation count, selected flag variant, quoted rent delta, and request latency. Keep operational health separate from business outcomes. A chart that mixes host CPU, HTTP latency, and pricing-rule adoption may look busy while answering none of the questions that decide whether to expand the flag. The dashboard has one job: show whether the new rule behaves well enough to widen its rollout. That requires a denominator. A count of pricing_rule_applied is weak by itself; it becomes useful beside total eligible evaluations, control-versus-treatment allocation, errors, and latency. There is an important boundary here. Metrics can reveal a changed rate or distribution, but they do not establish why an individual quote changed. Preserve request-level diagnostic context in logs, with trace_id and span_id where useful. Do not mistake those correlation fields for distributed trace querying or a span tree. I would begin with four dashboard panels, not forty: eligible evaluations by variant, successful quotes by variant, rent-delta distribution, and p95 evaluation latency. That choice is deliberately narrow. Every extra dimension increases query and interpretation cost, while a solo builder still has to decide whether the flag stays at 5%, moves to 25%, or returns t

InfraDev
Interesse
dev.to

I got tired of “top starred” open-source lists, so I built PickOpenSource

I use open source software all the time, but it’s a constant struggle to find the right project. My usual process goes something like: Search ‘open source alternative to X’ Check round up posts Inspect GitHub stars Pick one Discover later that the license is weird, or that it’s a pain to self-host or that it’s abandoned This happened to me over and over again. I realized the problem was a simple misassumption: GitHub stars don’t always reflect what I actually need in a project. So I built PickOpenSource. What I wanted in an open source directory When evaluating projects, I usually have decision points around: What problem does this solve? What is the license? Can it be self-hosted? Is there a managed version? Is the repository maintained? Usually these things are more important to me than the number of stars, so that’s what PickOpenSource focuses on. Browse by the job you need to get done The site is organized around categories like: Analytics Authentication CMS CRM Databases Developer tools Customer support DevOps You pick a category, then compare projects within that category. The idea is that you start from the job that needs to get done, rather than the existing projects. The things that I care about In general I want to highlight the things that are deal-breakers or that slow down adoption: License MIT, Apache, AGPL, and custom licenses can all be deal-breakers, depending on what you’re building. I’m not a lawyer, but I think this information should be easy to find for any given project. Hosting This is a tricky one - I think people sometimes use the term ‘open source’ to mean ‘can I self-host this?’. Other times it’s a managed product that just has an open source repository. Both are totally valid, but I want to highlight that difference. Repository activity A high number of stars doesn’t mean much if the project isn’t actively maintained. The site tries to pull this information in as well, using GitHub’s API (as of roughly every 24 hours). Alternatives pages

Dev
Interesse
dev.to

Create an AI Voice Agent for Customer Support

Why a Voice Agent Makes Sense for Support Customer support is shifting from static FAQs to real‑time, conversational experiences. Adding a voice channel lets you: Reduce friction for users who prefer speaking over typing. Provide a more personal touch that can boost satisfaction scores. Scale human agents by handling routine queries automatically. In this guide we’ll build a simple AI voice agent that can answer common support questions, synthesize responses with high‑quality text‑to‑speech (TTS), and even clone a brand‑specific voice. All of this can be done with a few lines of Python and the powerful API from ElevenLabs. Item Reason Python 3.9+ Core language for the demo. requests library To call the ElevenLabs REST endpoints. Flask (or FastAPI) Lightweight web framework for the HTTP endpoint. OpenAI API key (or any LLM you like) Generates the textual answer to the user's query. ElevenLabs API key Powers the TTS and voice‑cloning features. Tip: If you don’t have an ElevenLabs account yet, sign up through the affiliate link above – you’ll get a free quota to experiment. Create an account at the link above. Navigate to the API dashboard and copy your API key. (Optional) Upload a short voice sample (30 s–2 min) of a brand spokesperson to create a custom voice model. The dashboard will give you a voice_id you can reuse in the code. User (phone/VOIP) ──► Speech‑to‑Text (STT) ──► LLM (generate answer) ──► ElevenLabs TTS ──► Audio response In this article we focus on the LLM → TTS leg. You can plug any STT service (Google Speech, Whisper, etc.) in front of it. import os import requests OPENAI_API_KEY = os.getenv("OPENAI_API_KEY") ELEVEN_API_KEY = os.getenv("ELEVEN_API_KEY") def get_answer(question: str) -> str: """Call OpenAI's chat completion endpoint to generate a support reply.""" headers = { "Authorization": f"Bearer {OPENAI_API_KEY}", "Content-Type": "application/json" } data = { "model": "gpt-4o-mini", "messages": [ {"role": "system", "content": "You are a friendly

IADev
Interesse
dev.to

🌿 Flora Scout: Offline Trail Flora & Plant Identifier

🌟 What I Built It runs an open-weight vision model locally on-device using WebGPU/Ollama, paired with an open-source agent framework (Mastra) to organize local trail findings, cross-reference native/invasive species databases locally, and log discovered flora. The app is built so that screen time is minimized to a quick 5-second snapshot, letting you get back to enjoying nature. 🍃 How It Gets People Outside ("Touch Grass") Fast Trail Identification: Snap a photo on the trail, get immediate identification and brief ecology insights, and immediately put the phone away. Zero Signal Needed: Designed specifically for dead zones in state parks and deep wilderness trails. Gamified Local Exploration: Keeps a offline journal of indigenous species spotted during hikes, encouraging users to hit new trails and discover local ecosystems. 🔓 Why Open Innovation Matters Here Privacy & Data Ownership: Your location data and hike photos remain strictly on your local device—never sent to cloud servers or used to train proprietary models. Zero Operating Cost: Running open-source models directly on hardware eliminates per-token API costs completely. 🛠️ Tech Stack & Partner Tools Used Agent Framework: Mastra for agent orchestration and tool routing. Database / Local Storage: MongoDB Atlas Edge / Local IndexedDB for caching plant taxonomy data offline. Deployment: Render for hosting the PWA distribution server. 📸 Field Test & Demo 🤖 Agent Session Record (DevRelay / Entire) You can view the full agent session log, prompts, and debugging workflow behind building Flora Scout

IADevMobile
Interesse
dev.to

ForgeZero and Gloria: Build Tooling for People Who Still Want to Know What Their CPU Is Doing

I'm Alex Voste, the person behind ForgeZero and its resident experimental language, Gloria. I'm not going to open with a mission statement. I'm going to open with the actual reason this exists: I got tired of trusting tools that refuse to tell me what they're doing. Modern tooling has a bad habit of treating "it worked" as a substitute for "I understand why it worked." Garbage collectors show up in your hot path uninvited. Build systems recompile the world because a timestamp looked at them funny. Compilers hide behind Makefiles that hide behind generators that hide behind more generators, until nobody on the team can actually explain what make is going to do before it does it. None of this is malicious. Most of it is genuinely convenient for most people. It is also, for anyone doing real systems work, a tax — paid in CPU cycles, paid in debugging hours, paid in that specific flavor of dread when a build fails and the error message is a lie by omission. So I built two things instead of complaining about one. In 1976 a Bell Labs engineer named Stuart Feldman got annoyed at a coworker who kept shipping broken binaries — editing a source file and forgetting to rebuild whatever depended on it. His fix became make, a tool built to answer one question correctly, every time: what actually needs rebuilding right now, and what doesn't? Fifty years later we're still answering that question badly, and most engineers have simply stopped noticing. Make's timestamp-and-phony-target model leaked complexity into anything bigger than a weekend project. Autotools buried that complexity under a generation-of-generators architecture that remains one of the most feared corners of open source. CMake showed up to generate other build systems instead of solving the underlying problem — which is either a clever abstraction or a quiet confession, depending on which decade of CMake broke your afternoon. Ninja, to its credit, went the other direction entirely: radically minimal, explicitly not

DevInfra
Interesse
dev.to

Scaling Early-Stage Tech: Iteration, Technical Debt, and Co-Building Architectures

𝗦𝗰𝗮𝗹𝗶𝗻𝗴 𝗘𝗮𝗿𝗹𝘆-𝗦𝘁𝗮𝗴𝗲 𝗧𝗲𝗰𝗵: 𝗜𝘁𝗲𝗿𝗮𝘁𝗶𝗼𝗻, 𝗧𝗲𝗰𝗵𝗻𝗶𝗰𝗮𝗹 𝗗𝗲𝗯𝘁, 𝗮𝗻𝗱 𝗖𝗼-𝗕𝘂𝗶𝗹𝗱𝗶𝗻𝗴 𝗔𝗿𝗰𝗵𝗶𝘁𝗲𝗰𝘁𝘂𝗿𝗲𝘀 Early-stage engineering teams have to move quickly. The challenge is shipping fast without creating an architecture that becomes difficult to maintain six months later. 𝗥𝗮𝗽𝗶𝗱 𝗣𝗿𝗼𝗱𝘂𝗰𝘁 𝗜𝘁𝗲𝗿𝗮𝘁𝗶𝗼𝗻 At the beginning, requirements change frequently. A feature that seems essential today may be replaced after a few customer conversations. A practical approach is to keep the architecture modular while avoiding unnecessary abstraction. Clear service boundaries, automated testing for critical paths, version-controlled infrastructure, and observable deployments can make frequent iteration safer. The goal isn't perfect architecture. It's an architecture that can evolve. 𝗠𝗮𝗻𝗮𝗴𝗶𝗻𝗴 𝗧𝗲𝗰𝗵𝗻𝗶𝗰𝗮𝗹 𝗗𝗲𝗯𝘁 Technical debt isn't automatically bad. Sometimes taking a shortcut is the right trade-off when validating a product or responding to users. The problem comes when temporary solutions become permanent infrastructure. Teams can manage this by documenting known compromises, tracking high-risk debt, and regularly allocating engineering capacity to address issues that are slowing development. Monitoring deployment failures, performance bottlenecks, and recurring bugs can also help identify where debt is becoming expensive. 𝗖𝗼-𝗕𝘂𝗶𝗹𝗱𝗶𝗻𝗴 𝗔𝗿𝗰𝗵𝗶𝘁𝗲𝗰𝘁𝘂𝗿𝗲 As a startup grows, the engineering challenge isn't always solved by hiring more developers. Teams may also need additional architecture experience, infrastructure expertise, or operational support. Co-building models provide another approach: an external technical partner works alongside the founding team while product and engineering capabilities mature. ''Aperture Venture Studio'' is one example of a venture studio using a co-building approach to support early-stage companies as they develop and scale. The important part is maintaining

Dev
Interesse
dev.to

Why search-and-replace is the wrong way to fix a trailing comma in JSON

A single comma can make a whole JSON file unusable: { "name": "ada", "roles": ["admin", "ops",], } # Python json.decoder.JSONDecodeError: Expecting value: line 3 column 28 (char 46) # Node / Chrome SyntaxError: Unexpected token ']', ..."n", "ops",], }" is not valid JSON Both parsers stop at the first problem, the comma inside the array. Fix that one, and the comma before the final } fails next with Expecting property name enclosed in double quotes (Python) or Expected double-quoted property name in JSON (Node). JSON (RFC 8259) has no trailing commas. JavaScript does, so these files usually come from config copied out of code, from templates that write item + ",", or from someone deleting the last key of an object and leaving the comma behind. re.sub(r",\s*([}\]])", r"\1", text) It works on the example above. Now try it on data that contains those characters inside a string: s = '{"note": "ends with ,}", "tags": ["a", "b",],}' print(re.sub(r",\s*([}\]])", r"\1", s)) # {"note": "ends with }", "tags": ["a", "b"]} The output parses, so nothing warns you, but the value of note has changed. That's worse than the original error, because now the corruption is silent. A comma can only be removed when it is outside a string and the next non-whitespace character closes an object or array. That means you have to know whether you're inside a string, and inside a string you have to watch for backslash escapes: def remove_trailing_commas(text: str) -> str: out, in_string, escaped = [], False, False for i, ch in enumerate(text): if in_string: out.append(ch) if escaped: escaped = False elif ch == "\\": escaped = True elif ch == '"': in_string = False continue if ch == '"': in_string = True elif ch == ",": j = i + 1 while j < len(text) and text[j].isspace(): j += 1 if j < len(text) and text[j] in "}]": continue # drop the trailing comma out.append(ch) return "".join(out) json.loads(remove_trailing_commas(s)) # {'note': 'ends with ,}', 'tags': ['a', 'b']} It's tempting to keep going a

Dev
Interesse
dev.to

Why your topological sort gives a different answer on every run

You have a few tasks, and some of them depend on others. You put them in a graph, sort it topologically, and print the order. Then you run the program again and get a different order. Both are correct, but your test that compares against an expected slice fails every few runs. And the file you generate from the order changes every time you rebuild it, even though nothing changed. This happened in gograph, the Go graph library I maintain, until version 0.8. This post explains where the randomness came from, how the library got rid of it without changing its API, and what to do when insertion order isn't enough. The pipeline from the next section is on gograph.dev, where you can step through the sort instead of only reading the code. Here's a small build pipeline. Four tasks can run in any order, and release has to wait for all of them: g := gograph.New[string](gograph.Acyclic()) release := g.AddVertexByLabel("release") for _, name := range []string{"lint", "vet", "test", "build"} { _, _ = g.AddEdge(g.AddVertexByLabel(name), release) } for i := 0; i < 5; i++ { order, _ := gograph.TopologySort(g) // print the labels } With gograph v0.7.2, five calls in the same process gave this: vet test build lint release lint vet test build release lint vet test build release test build lint vet release lint vet test build release A topological sort only promises that every vertex comes after the vertices it depends on. Whenever more than one vertex is ready at the same time, the algorithm has to pick one, and any choice is valid. Here, all four tasks are ready from the start. The graph stored its vertices in a map[T]*Vertex[T], and GetAllVertices built its result by ranging over it. TopologySort then counted the incoming edges of each vertex in another map and found the starting vertices by ranging over that one. The Go spec says the iteration order of a map "is not specified and is not guaranteed to be the same from one iteration to the next", and the runtime randomizes it on purp

Dev
Interesse
dev.to

SpecKit Companion

GitHub's spec-kit has been gaining serious traction — 46.7k stars and counting — and for good reason. It brings a solid methodology for using spec-driven development with the AI coding tool of your choice. But you might be asking: what is spec-driven development? It's the practice of defining what you want to build and why before asking AI to write code. Instead of vague prompts and hoping for the best, you write explicit specifications that become the AI's roadmap. Fewer misunderstandings, fewer iterations, better results. (If you want the full breakdown, check out Spec-Driven Development: Stop Vibe Coding.) Here's where SpecKit Companion enters. It's a VS Code extension that gives you a visual interface for spec-driven development — browse specs, track workflow progress, and manage your AI configuration, all without leaving your editor. When Kiro launched their IDE built around spec-driven development, something clicked for me. Seeing your specs, plans, and tasks laid out visually — not buried in markdown files — changes how you interact with them. It's easier to navigate. Easier to spot what's wrong. Easier to give feedback. Think about it: once you're working with specifications and plans, you want to see them. You want to add a comment on line 12 of a spec where the requirement is unclear. You want to look at the plan and say "this part doesn't match what I had in mind" and regenerate just that section. You want to view diagrams inline instead of switching to a markdown preview. That feedback loop — review, comment, regenerate — is what turns spec-driven development from a process into a conversation. Even creating a spec is better with a visual interface. You can write a detailed description, point to existing files for context, and attach screenshots — all in one place. But Kiro is a full IDE. I wanted that same visual experience for any AI coding assistant — Claude Code, GitHub Copilot, Gemini CLI — without leaving VS Code. SpecKit Companion was born from th

DevIA
Interesse
dev.to

GeeTest v3 solver in Python: from gt and challenge to a seccode the site accepts

A GeeTest v3 solver in Python takes four HTTP calls, and only the middle two talk to the solver. You get a fresh gt and challenge from the site's register endpoint. You send them to a solving API. You poll until it returns challenge, validate and seccode. Then you POST those three back to the site in the same session that fetched the challenge. When the solve works but the site still says no, the bug is almost always in the first or last call. Below are all four with runnable code, plus a check to run first: v3 and v4 are not interchangeable. You're automating a lookup form you're allowed to automate, and a GeeTest v3 slider sits in front of the submit button. The goal is plain requests, no browser, ending in an accepted form POST. Most GeeTest confusion online comes from mixing guides for the two versions. They take different parameters and hand the site different values. Open DevTools, reload, and compare: Signal GeeTest v3 GeeTest v4 Page init initGeetest({gt, challenge, ...}) initGeetest4({captchaId: ...}) What identifies it gt (32 hex chars) plus a one-time challenge captcha_id only Network api.geetest.com or api-na.geetest.com (gettype.php, get.php, ajax.php) gcaptcha4.geetest.com, static.geetest.com/v4/gt4.js What the site receives geetest_challenge, geetest_validate, geetest_seccode lot_number, captcha_output, pass_token, gen_time If you'd rather script it, this loads the page once and classifies it by network traffic (needs pip install playwright and playwright install chromium): import re from playwright.sync_api import sync_playwright def geetest_version(url: str) -> str: seen = [] with sync_playwright() as p: browser = p.chromium.launch() page = browser.new_page() page.on("request", lambda req: seen.append(req.url) if "geetest.com" in req.url else None) page.goto(url, wait_until="networkidle") browser.close() if any("gcaptcha4.geetest.com" in u or "/v4/" in u for u in seen): return "GeeTest v4 (captcha_id): this guide does not apply" if any(re.search(r"/

Dev
Interesse
dev.to

The Hidden Cost of MCP: More Context, More Tokens

We use AI agents to optimize cloud spending. Then we give them a very expensive bag of context. MCP can make FinOps agents more useful by giving them access to real cloud data, but additional tools and context can also increase token usage and AI costs. The goal is not maximum context, but the smallest relevant context that produces a useful result. Imagine asking an AI agent to investigate your AWS bill. You want it to look at your real costs, inspect your infrastructure, and explain what changed. A generic answer about oversized EC2 instances is no longer enough. This is where MCP starts to matter. The Model Context Protocol gives AI applications a standard way to connect to external tools and data. Anthropic introduced MCP, and OpenAI also supports remote MCP servers in its Responses API. More context makes the agent more useful. It can work with your environment instead of guessing from general knowledge. But that extra context also has a cost. An AI model already knows a lot about AWS. It can list common reasons for a sudden increase in EC2 spending. What it does not know is what happened inside your account yesterday. MCP can give the agent access to that missing information. It can work with cost data, infrastructure details, tags, and usage patterns. Now it has something concrete to investigate. The difference is important. Instead of asking what usually causes EC2 costs to rise, you can ask why your costs rose. The agent can inspect the environment and connect the change to real resources. This is one reason MCP is interesting for FinOps. The FinOps Foundation discusses use cases such as cost analysis, anomaly investigation, and connecting financial data with infrastructure decisions. Better context moves the agent from general advice toward answers about your actual environment. But there is a tradeoff. The model now has more information to process before it can give you that better answer. And that context is not free. Tools need descriptions so the model

IAInfraDev
Interesse
dev.to

How to Convert HEIC to JPG in the Browser (No Uploads, 100% Private)

What is HEIC, and why does it exist? HEIC (High Efficiency Image Container) is the default photo format on iPhones since iOS 11. Built on the HEVC/H.265 codec, it stores photos at roughly half the file size of JPEG at similar quality, and a single HEIC file can even hold live photos, bursts, and depth data. The problem is compatibility. Many Windows PCs, older Android phones, and plenty of web services still can't open HEIC files. Browser support is patchy as well: Safari handles HEIC natively, but Chrome and Firefox generally don't. So converting HEIC to JPG remains a daily chore for a lot of people. The cleanest pattern for an in-browser converter is a short pipeline: Let the user pick a file with an (accept .heic). Decode the HEIC bytes to a bitmap (with a WASM HEVC decoder, e.g. via a library like heic2any). Paint the bitmap onto a . Re-encode as JPEG with canvas.toBlob('image/jpeg', quality) and offer the download. async function convertHeicToJpg(file) { // 1. Decode HEIC to an ImageBitmap using your chosen decoder const bitmap = await decodeHeic(file); // 2. Paint it onto a canvas const canvas = document.createElement('canvas'); canvas.width = bitmap.width; canvas.height = bitmap.height; canvas.getContext('2d').drawImage(bitmap, 0, 0); // 3. Re-encode as JPEG at 90% quality return new Promise((resolve) => canvas.toBlob(resolve, 'image/jpeg', 0.9) ); } Because everything runs in the page, the photo never leaves the user's device: no uploads, no server-side copies, no waiting in an upload queue. If you just need a quick conversion rather than your own implementation, try its free HEIC to JPG converter: drop a photo on the homepage, convert it in the browser, and download the JPG. No signup and no uploads — files stay on your machine, exactly like the client-side pipeline above. That's the part worth remembering: whenever a tool can do the work locally in your browser, there's no reason to hand your photos to a server first.

Dev
Interesse
dev.to

How to Build a Secure Real-Time Chat System: Key Engineering Concepts

How to Build a Secure Real-Time Chat System: Key Engineering Concepts A chat application may look simple from the user's perspective. You type a message, press send, and the other person receives it almost instantly. Behind that simple experience is a combination of real-time networking, authentication, databases, security controls, notifications and message delivery systems. For developers interested in building messaging applications, understanding these components is extremely useful. Let's break down the major parts of a modern chat system. The Basic Architecture A simplified chat architecture can look like this: User A The actual production architecture can be much more complex, but this model helps explain the basic flow. The frontend handles the user interface. The backend handles authentication, authorization, message processing and business logic. The database stores information that needs to persist. The real-time communication layer helps deliver messages without requiring the user to constantly refresh the application. Why WebSockets Are Useful Traditional HTTP requests follow a request-response model. The client sends a request and the server responds. That works well for many applications, but chat applications need a more interactive communication model. WebSockets allow a persistent connection between the client and server. This makes it possible for the server to send information to a connected client when an event occurs. A simplified flow could be: Client connects This can provide a responsive real-time experience. Authentication Comes First Before allowing users to send or receive private messages, the system needs to know who they are. Authentication can use different approaches, including: • Email and password The exact approach depends on the application's requirements. Whatever method is selected, credentials must be handled securely. Authorization Is Equally Important A common mistake is assuming that authentication is enough. It isn't. Imag

Dev
Interesse
dev.to

Best Newsletter Platforms in 2026: Pricing, Hosting and SEO

Newsletter platforms split into thin email senders and full publishing systems with archives and memberships. That split decides hosting, SEO, and migration more than any editor does. This comparison covers Buttondown, EmailOctopus, beehiiv, Kit, Ghost, Substack, MailerLite, Brevo, and Sender. Prices are in USD, reflect the public pricing in October 2026, and normally rise as the mailing list grows on subscriber-based plans. Each platform section describes what the product actually does, its pricing tiers, and where the public archive lives. The closing sections cover the three archive ownership models, canonical URLs, sender authentication, and API publishing, because those decisions outlast any single vendor choice. Email-first services assume that another system owns the website and the content. Publishing-first services want the newsletter platform itself to become an important public destination. A few deliberately sit between those two models, and the architectural choice carries consequences for SEO, archives, and migration. flowchart TD A[Newsletter platforms] --> B[Email-first] A --> C[Publishing-first] A --> D[Hybrid] B --> B1[EmailOctopus] B --> B2[Brevo] B --> B3[Sender] B --> B4[MailerLite] C --> C1[Substack] C --> C2[beehiiv] C --> C3[Ghost] D --> D1[Buttondown] D --> D2[Kit] Platform Free plan Paid entry point Public archive External canonical support API Main model Buttondown 100 subscribers From $9/mo Yes Yes Yes Hybrid EmailOctopus 2,500 subscribers, 10,000 emails/mo $10/mo, or $9/mo annual Individual web copies No documented per-issue override Yes Email-first beehiiv 2,500 subscribers, unlimited sends From $43/mo annual Yes Limited for external-site workflows Yes Publishing-first Kit 10,000 subscribers, unlimited broadcasts From $33/mo annual Yes Limited Yes Hybrid Ghost(Pro) No permanent free hosted plan From $18/mo annual Yes Yes Yes Publishing-first Substack Unlimited free publishing 10% of paid revenue Yes Limited Limited Publishing-first Mail

Geral
Interesse
dev.to

Troubleshooting edge cache revalidation TTFB overhead on conditional GETs (HTTP/3 asset delivery)

Hey everyone, I've been diagnosing asset delivery latency across edge nodes and noticed an unexpected TTFB spike during conditional 304 revalidations compared to fresh direct HTTP/3 requests. Here is the DevTools network waterfall comparison for reference: https://files.media2url.com/free/be85ed185b1846.png While fresh asset fetches over HTTP/3 consistently complete sub-60ms, cache-lookup validation requests (Row 3) are introducing ~98ms of initial handshake overhead before confirming unmodified status. For those running edge caching or CDN reverse proxies with stale-while-revalidate headers: Is an edge POP revalidation roundtrip usually this pronounced on warm caches? Have you found better latency improvements by tuning stale-if-error vs letting client-side Cache-Control handle immutability directly? Curious to hear your setup experiences!

InfraDev
Interesse
dev.to

Yield Strategy Optimization Report: Veda

Yield Strategy Optimization Report: Veda Target Protocol: Veda (TVL: $1942.0M) Date: 5 Oct 2026 Prepared by: [Your Name], Senior DeFi Security Researcher & Smart‑Contract Auditor Veda is a high‑TVL ($1.94 B) yield‑aggregation platform operating on Ethereum and several L2 roll‑ups (Optimism, Arbitrum, zkSync). The protocol routes user deposits into a dynamic basket of underlying yield‑generating strategies (e.g., lending, staking, liquidity provision) and continuously re‑balances to capture the highest risk‑adjusted APR. Our audit focused on the core vault contracts, strategy adapters, governance & upgradeability mechanisms, price/oracle feeds, and cross‑chain bridge interactions. The codebase (≈ 150 k LOC) is written in Solidity 0.8.23, uses OpenZeppelin libraries for access control and upgradeability, and follows a modular “Strategy‑Adapter” pattern. Overall, Veda’s architecture is well‑structured and follows many industry best practices (checks‑effects‑interactions, immutable storage slots, circuit‑breaker pattern). However, the size of the TVL and the complexity of the re‑balancing engine introduce several non‑trivial attack surfaces that could be exploited by sophisticated adversaries, especially in the context of flash‑loan‑driven price manipulation and upgrade‑governance hijacking. Key Findings # Category Severity Brief Description 1 Re‑balancing Oracle Manipulation High (9/10) The StrategyRouter relies on a single on‑chain price oracle (Chainlink) for APR calculations. A coordinated flash‑loan attack can temporarily skew the oracle feed, causing the router to allocate excessive capital to a low‑quality strategy that can be drained. 2 Upgradeability & Governance Centralisation High (8/10) The ProxyAdmin is owned by a multi‑sig wallet (3‑of‑5) but the same wallet also holds the TIMELOCK_ADMIN_ROLE. A compromised signer can push a malicious implementation without a proper delay, bypassing community oversight. 3 Cross‑Chain Bridge Re‑entrancy Medium‑High (7/10) T

SegurançaDev
Interesse
dev.to

RemoveMacAI: apaga Apple Intelligence y libera espacio en disco

Apple Intelligence sigue ocupando espacio en tu Mac incluso después de que apagues cada una de sus funciones desde Ajustes del Sistema. macOS 27 eliminó el interruptor único que apagaba todo junto, y los modelos descargados (desde el modelo base hasta el que genera Genmoji) se quedan en disco hasta que el sistema decide borrarlos por su cuenta, algo que puede tardar días. RemoveMacAI, una herramienta de línea de comandos publicada en GitHub, resuelve ese problema con un solo comando reversible: apaga cada función, borra los modelos ya descargados y bloquea que macOS los vuelva a bajar solo. RemoveMacAI apaga por completo las funciones de IA de Apple y borra sus modelos on-device con un solo comando reversible en macOS 27.- removemacai status lista cada función y si su modelo sigue descargado en disco.- Un perfil de configuración bloquea la redescarga automática de los modelos después de borrarlos.- removemacai off --keep siri apaga todo menos Siri, sin perder esa función puntual.- removemacai revert restaura los ajustes originales y deja que macOS vuelva a descargar lo que necesite. Apple Intelligence es el conjunto de funciones de inteligencia artificial que Apple integró en macOS, iOS y iPadOS desde 2024, compuesto por modelos de lenguaje que corren on-device (en el propio equipo) y otros que se ejecutan en Private Cloud Compute, usados para resumir texto, generar imágenes, reescribir con Writing Tools y potenciar Siri. La lista de funciones es larga: Siri (incluido el ícono de la barra de menú y "Hey Siri"), Writing Tools para reescribir texto, Genmoji para crear emojis personalizados, Image Playground para generar imágenes, resúmenes automáticos en Mail, Mensajes, Safari, Notas y notificaciones, respuestas inteligentes en Mail, predicción de texto en línea, Spatial Photos, la limpieza automática de Fotos y el autocompletado predictivo de Xcode. Cada una de estas funciones depende de al menos un modelo que macOS descarga y guarda en disco la primera vez que la ac

IA
Interesse
dev.to

We shipped Spare for Mac: describe a plugin in one sentence and it gets built and installed

Hi DEV, we're a small team in Montreal, and we just shipped Spare for Mac: a desktop app where you describe a little tool or toy in one sentence, and Spare builds it and installs it as a plugin on your Mac. Codex and Claude Code can already write a menu-bar timer or a clipboard finder for you. But you still have to build it, package it, figure out where it lives and how to run it, and then explain to a friend how to install it. For small personal things, that last mile is usually where the fun dies. So Spare does the last mile: the plugin shows up in My Plugins, you click it, it runs. A menu-bar Pomodoro timer that reminds you to stand up A desktop pet that gets hungry, wants attention, and grows the longer you care for it A clipboard history plugin that searches your last 50 items A lunch wheel that decides what you eat One-click share: send a plugin to a friend; they open it in Spare and it's installed. Community works: games, desk pets and small tools other people published, each with its license shown (most are MIT). Install in one click. GPT-5.6 is free to use (fair-use limits apply), covered by the Spare open-source community. Pro is $9.9/month and unlocks GPT-6. macOS 14+ on Apple silicon: spare.cool/mac On first launch, double-click Spare once, then go to System Settings > Privacy & Security > Open Anyway. What would you build first? Tell us in the comments and we'll try making it. This post was drafted with AI assistance and reviewed by the Spare team.

IA
Interesse
dev.to

IntelliJ Java Version Mismatch: Project SDK, Gradle JVM, and JAVA_HOME Explained

IntelliJ Java Version Mismatch: Project SDK, Gradle JVM, and JAVA_HOME Explained I recently set up a new development laptop from scratch. JDK 17 was installed. The terminal looked fine. java -version It returned the version I expected. That should mean my Java environment is ready, right? Not necessarily. While setting up IntelliJ again, I was reminded of something that is easy to forget once a development machine has been configured for years: The Java version shown in your terminal is not always the Java version IntelliJ or Gradle is actually using. There are several places where Java versions can be configured, and they do not automatically mean the same thing. The first thing I check is still the simplest one. java -version I also check the compiler version. javac -version On Windows, you can also inspect JAVA_HOME. echo %JAVA_HOME% $env:JAVA_HOME And if multiple JDKs have been installed before, it is useful to check which Java executable is actually being resolved. where java Get-Command java This tells you what your terminal sees. But this is only the first layer. In IntelliJ IDEA, check: File → Project Structure → Project → SDK This is the JDK configured for the project inside IntelliJ. A common assumption is: java -version = 17 therefore: IntelliJ Project SDK = 17 But those are separate settings. Your system may use one JDK while IntelliJ points to another. That is why checking only the terminal can be misleading. For Gradle projects, there is another setting that is easy to overlook. Settings → Build, Execution, Deployment → Build Tools → Gradle → Gradle JVM The important distinction is: Project SDK → JDK configured for the IntelliJ project Gradle JVM → JVM used to run Gradle So this configuration is completely possible: System Java: 17 Project SDK: 17 Gradle JVM: 11 At first glance, everything looks like a Java 17 project. Then the Gradle build starts behaving differently. That is usually the point where the setup becomes confusing. Project SDK and Gradle

Dev
Interesse
dev.to

Gas Optimization Audit: Crypto-com

Gas Optimization Audit: Crypto-com Target Protocol: Crypto-com (TVL: $2610.6M) Date: 4 Oct 2026 Auditor: [Your Name], Senior DeFi Security Researcher & Smart‑Contract Auditor Scope: Full‑stack gas‑efficiency review of Crypto‑com’s core contracts on Ethereum L1 and its L2 roll‑up (Arbitrum/Optimism). The audit covers the main token (CRO), the staking/vault contracts, the bridge adapters, and the on‑chain market‑making modules (Liquidity Pools, AMM, and Order Router). Crypto‑com manages a $2.61 B TVL across Ethereum and L2, making gas costs a material factor for both end‑users and the protocol’s profitability. Our audit identified 23 distinct gas‑inefficiencies ranging from low‑impact storage layout issues to high‑impact algorithmic choices that can increase transaction costs by up to 45 % per call. Key findings include: # Category Approx. Gas Savings (per call) Severity* 1 Storage packing & layout – 8 % saving on StakingInfo structs 8 % Medium 2 Unchecked arithmetic in loops (safe only under invariant) – 12 % saving 12 % Low 3 Calldata vs memory for external array inputs – 15 % saving on router swaps 15 % Medium 4 Batch‑processing & merkle‑proof aggregation – up to 45 % saving on multi‑deposit/withdraw 45 % High 5 Immutable / constant variables – 3 % saving on fee‑rate reads 3 % Low 6 Custom errors instead of require(..., "string") – 2 % saving on revert paths 2 % Low 7 EIP‑2929 / warm‑storage optimization – 5 % saving on repeated token transfers 5 % Medium 8 Assembly‑level bit‑masking for fee‑rate encoding – 4 % saving 4 % Low 9 L2‑specific calldata compression – 10 % saving on bridge messages 10 % Medium 10 Avoiding redundant external calls – 7 % saving on router → pool → token flow 7 % Medium *Severity reflects the combined impact on user cost and protocol economics (High ≥ 30 % gas reduction, Medium 15‑30 %, Low // New struct function claimMultiple(Claim[] calldata claims) external { for (uint i=0;i function swapExactTokensForTokens(uint256 amountIn, uint256[] ca

SegurançaDev
Interesse
dev.to

Ditching Web UIs: Building a Terminal-Native Kubernetes Monitor with Local AI

This is a submission for the Hacktoberfest Weekend Challenge: Build for a Friend I built KubeSense, a high-density, terminal-based Kubernetes monitoring dashboard. The project is publicly available at: https://github.com/Joydeep2005Banik/KubeSense KubeSense is built entirely in Python, utilizing a decoupled architecture driven by a central PodMonitor engine. Here is a high-level look at the architecture: graph TD subgraph UI Layer A[Terminal UI] end subgraph Core Logic B[Monitor Engine] end subgraph Data Sources C[K8s API] D[SSH Fallback] end subgraph AI Processing E[Log Optimizer] F[LLM Providers] end B |State Updates| A B -->|Fetch Metrics| C B -->|Fallback| D B -->|Raw Logs| E E -->|Clean Context| F F -->|Alerts| A Here is a breakdown of the core systems: I used the Textual framework to build the dashboard. Instead of relying on heavy "while-true" redraw loops, the UI uses Textual's event-driven reactive properties. When the Monitor Engine pushes new metrics, only the changed widgets redraw, ensuring a lightning-fast, zero-overhead experience without screen tearing. flowchart LR A[Monitor Engine] -->|Sends updated Metrics Object| B(Reactive Variable) B -->|Triggers Auto-Update| C[UI Node / Widget] C -->|Only redraws changed region| D[Terminal Display] The tool primarily connects to the cluster using the official kubernetes Python client to fetch live status and log streams. However, if the cluster's K8s Metrics Server goes down, KubeSense intelligently engages a graceful fallback mechanism to connect directly to the underlying cluster nodes via asyncssh. sequenceDiagram participant M as Monitor participant K as K8s Metrics API participant S as SSH Fallback participant N as Node Shell M->>K: Fetch Pod CPU/Mem alt Metrics Server Unavailable K-->>M: HTTP 404 / Error M->>S: Engage Fallback (asyncssh) S->>N: Connect to Node via SSH N-->>S: Execute `top` & parse usage S-->>M: Return hardware metrics else Success K-->>M: Standard API Metrics end Logs can be incredibly n

InfraDev
Interesse
Simon Willison

Gemini 3.8 TTS Playground

Tool: Gemini 3.8 TTS Playground Google released two new Gemini text-to-speech models today - gemini-3.8-flash-tts and gemini-3.8-flash-lite-tts . They come with a library of over 2,000 voices, plus the ability to create a custom voice with "just a 30-second audio sample of your voice or a voice you have the rights to use". I vibe coded this bring-your-own-key playground interface with GPT-6 Astra, taking advantage of the open CORS policy of the underlying Gemini API. A notable feature of the API is that it makes it easy to define a full conversation between multiple characters, each with different voices and voice style instructions. Here's a short demo clip of a conversation between two pelicans debating if they should move to the Pacifica Pier . I had Claude 4.5 Opus write the script and generate a URL to render it using the tool . Your browser does not support the audio element. It took ~20 seconds to generate 1m 18s of audio using Gemini 3.8 Flash TTS (not the cheaper Flash-Lite), at a cost of 2.74 cents. Tags: text-to-speech , gemini

IADev
Interesse
Hacker News

Show HN: Stream live open data in two commands

A service and open source tool to get open data streams in two commands. No sign up needed for subscribing. Streams to try: - https://hypermass.io/stream/_J0fm450s - extreme UV images of the sun from SOHO - visual data - https://hypermass.io/stream/_ATtCoEK - GDACS live disaster data (filtered to just the ongoing items) The CLI (Apache 2.0, https://github.com/hypermass-io/hypermass-cli) tool allows you to subscribe to multiple live streams of files, with the files arriving in a local folder. The filenames are ULIDs so they can be easily sorted into time order in scripts and code. Publishing works similarly - drop files into a folder and they get read, published and deleted locally. The idea is that by being highly opinionated about the shape of the data (files, delivered in sequence, in real time) a bunch of the logic and edge cases get handled well in one place (things like ordering, retries, hash verification, reconnection, etc) - rather than requiring every subscriber to implement it themselves for every source. A high-speed version for things like departure boards, train positions is in the pipeline. Background: About 10 years ago, I worked for a few years supporting and developing some of the UK Rail Open Data systems. As a developer I was frustrated at how fragmented the open data space was, and how every open data system was designed as a blank-page exercise. I realised that a lot of data falls into an odd middle ground, too infrequent to economically poll on a large scale, too large for messaging protocols, but in some sense still real time. For example transport schedules, periodic solar imagery, disaster alerts - real-time but infrequent. Fairly often I just wanted a "just give me the data" option when the solutions I found were static catalogues with no nod towards real-time use, bespoke APIs, analytics systems and other things I didn't need. I couldn't find a simple approach that leaned into what I saw as the data's strengths (simple files, delivered in

Dev
Interesse