Painel de Notícias

Tecnologia

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

Filtros
dev.to

Flatten SF: qué es el ruteo multiobjetivo y cómo funciona

Flatten SF calcula, dentro del navegador y sobre 160.000 tramos de calle de San Francisco, la ruta a pie o en bici que evita las cuestas más empinadas de la ciudad. Lo logra combinando datos de elevación lidar de 1 metro del programa 3D Elevation del USGS con el grafo de calles de Overture y OpenStreetMap, resolviendo lo que en teoría de grafos se llama ruteo multiobjetivo, es decir, encontrar en vez de una sola ruta óptima el conjunto completo de rutas que compiten entre distancia y ascenso. Flatten SF calcula rutas pareto-óptimas entre distancia y ascenso sobre 160.000 tramos de calle de San Francisco.- El lidar de 1 metro del USGS mide el ascenso real de cada cuadra; el grafo de calles sale de Overture y OpenStreetMap.- Un pie de ascenso cuesta como 200 pies caminados; pasado ese límite, la ruta deja de valer la pena.- Sumar el ascenso acumulado, no la diferencia neta entre inicio y final, evita subestimar calles con subidas y bajadas.- Barrer un peso lambda entre distancia y ascenso en Dijkstra reconstruye la frontera de rutas óptimas. El ruteo multiobjetivo es una técnica de optimización en grafos que busca, en lugar de una sola ruta mínima, todas las rutas que ningún otro camino supera a la vez en dos o más criterios, por ejemplo distancia y ascenso acumulado. Ese conjunto no dominado se llama frontera de Pareto. Un ejemplo simple ayuda a entenderlo. Si hay dos rutas entre el mismo origen y destino, una de 2,1 km con 18 metros de ascenso y otra de 2,4 km con 30 metros de ascenso, la primera domina a la segunda porque es más corta y más plana al mismo tiempo. Por eso la segunda nunca aparece en la frontera. Ahora imaginá una tercera ruta de 1,8 km con 45 metros de ascenso. Ninguna de las tres domina a las otras dos, porque cada una gana en un criterio distinto, así que las tres quedan en la frontera de Pareto. Un algoritmo de ruta más corta no distingue entre una cuadra plana y una escalada de 15% de pendiente, porque ambas valen lo mismo si miden la misma dist

Dev
Interesse
dev.to

Two things nobody was watching

First published on openspec-ui.dev. OpenSpec Workbench's whole pitch is watching an agent while it works. Two A working directory is removed in two steps: git forgets it, then whatever That is not a hypothetical. A shell from an already-archived change, a-change-knows-its-stage, sat under the worktree root from one day to the packages/extension/.vscode-test, which the extension's own test run had Two things had kept that retry from happening. The rule for "is this ours The fix changes what "ours" means: a shell named after a change this .git of its own, is cleared whatever is inside Checked live against the real worktree root this repository uses: 320 .vscode-test. Read correctly DeepSeek's CLI reports no cost, no credits, no token split - the answer to usage_update, carrying how many of the model's window It is a strange number to build a ceiling on, and the reasoning for budget.maxContextShare is a share of the window - 0.8 for eighty (0, 1] is refused up front, so someone who means 80 is told rather than handed a ceiling that Checked live: a chain running deepseek-cli-acp with the ceiling set dsh refused to an earlier article budget.maxContextShare is 0.0%, and the agent reported 8,277 of The product also now knows, and says, which agents this can even work on. contextGauge is a separate question from whether an agent reports "none" where that is certain, "sends" for deepseek-cli-acp "unknown" for every other ACP agent nobody here Neither of these was a code path that ran and did the wrong thing. Both The code is at github.com/VeryComplexAndLongName/OpenSpec-UI, The leftover shell, the rule that excused it, and the fix: the archived change the-sweep-comes-back-for-what-it-left, and its own tasks.md for the live numbers (320 known change names, the 54 MB find). The context ceiling, the live cancellation message, and the Node-version refusal: the archived change a-run-can-outgrow-its-context and its tasks.md. maxContextShare, why it is not counted as spend, and con

IADev
Interesse
dev.to

The silent retry bug killing ASP.NET Core reliability (and how idempotency keys save you)

The Silent Retry Bug: Why Your Resilient .NET System Is Actually Fragile If you’ve spent any time working with distributed systems in C# and ASP.NET Core, you know the drill: network calls fail, timeouts happen, and services become temporarily unavailable. The standard advice? Use Polly. Add a retry policy. Make it resilient. But here’s the hard truth: retries without idempotency are dangerous. When you retry a GET request, it’s usually safe. It’s just reading data. But when you retry a POST or PUT request, you risk changing state. If the first request actually succeeded (but the client didn’t receive the response due to a timeout), the retry will execute the logic a second time. In a payment system, that’s a double charge. In an e-commerce platform, that’s a duplicate order. This "duplicate-state problem" is the quiet killer of reliability. Most retry strategies (Polly, Hangfire, Azure Service Bus) operate on an "at least once" delivery guarantee. This means you will retry if something looks like it failed. However, unless your endpoint is idempotent, a successful first call followed by a failed second call (or a successful second call that thinks it's the first) leads to data inconsistency. The fix isn't a more sophisticated retry policy. It's making your POSTs safely repeatable. The industry-standard pattern is the Idempotency Key. Client Side: The client generates a unique identifier (usually a GUID) for the intent of the operation (e.g., "Place Order #1234"). This key is attached to the HTTP request, often in the Idempotency-Key header. Server Side: The ASP.NET Core endpoint checks if this key has been seen before. If new: It executes the business logic, saves the result, and stores the key-result pair (with a TTL). If existing: It skips the business logic and returns the stored result immediately. While you can build this manually, it’s best practice to encapsulate it in a middleware or a filter so every endpoint benefits from it. Here is a conceptual outline

Dev
Interesse
dev.to

Build an Admin Dashboard in React

An admin dashboard is mostly three things: a row of numbers that matter, a chart that shows the trend, and a table of recent activity. In this tutorial we build all three with oks-ui and arrange them in a layout that works from phone to desktop. import { Card } from "oks-ui/card"; import "oks-ui/card.css"; import { Stat } from "oks-ui/stat"; import "oks-ui/stat.css"; import { Chart } from "oks-ui/chart"; import "oks-ui/chart.css"; import { Table, type TableColumn } from "oks-ui/table"; import "oks-ui/table.css"; import { Chip } from "oks-ui/chip"; import "oks-ui/chip.css"; The hardest part of a dashboard isn't the code, it's choosing what to show. A useful test: every number on the first screen should answer a question someone actually asks every day. "How much did we sell this week?" earns a card. "Total registered users since launch" usually doesn't, because it only ever goes up and nobody acts on it. Stat shows a label, a big value, and an optional change with a direction. The direction colours the change pill and picks the arrow. const kpis = [ { label: "Revenue", value: "$48,210", delta: "+12.4%", trend: "up" }, { label: "Orders", value: "1,284", delta: "+3.1%", trend: "up" }, { label: "Refunds", value: "18", delta: "-2", trend: "down" }, { label: "Conversion", value: "3.2%", delta: "0.0%", trend: "flat" }, ] as const; {kpis.map((k) => ( ))} Stat also takes an icon, a help line under the value, and a spark slot for a tiny chart. Chart takes rows of data, the key for the x-axis, and the series to draw. Multiple series get a legend automatically. const revenue = [ { month: "Jan", online: 12400, store: 8200 }, { month: "Feb", online: 13900, store: 7900 }, { month: "Mar", online: 15100, store: 8800 }, { month: "Apr", online: 16800, store: 9100 }, { month: "May", online: 18200, store: 9600 }, { month: "Jun", online: 21000, store: 10400 }, ]; Change type to "line" or "column" and nothing else needs to change. The chart has tooltips on hover and can be browsed with th

Dev
Interesse
dev.to

The agent did exactly what I asked. That was the bug.

Three times this month my agent executed a flawed request perfectly. Hooks can't catch this one, because the mistake isn't in any single tool call, it's in the plan. Here's what I changed instead. I wrote a while back about moving rules out of my instructions file and into hooks, because a rule in prose gets followed most of the time and a rule in a tripwire gets followed every time. I still believe that. Someone in the comments pushed on where determinism stops being the right tool, and I didn't have a good answer then. I do now, because three times in the past month my agent did precisely what I asked, did it well, and the result was wrong anyway. Not a hallucination, not a bad diff. Correct execution of a flawed request. That class of failure has no tool call to intercept, which makes it the exact thing a hook cannot save you from. I have a side project that redacts PDFs in the browser. I wanted an animated demo for the landing page, so I asked the agent to drive the app with Playwright and record the whole flow: open a file, drag a box over a name, export, done. It built the script. The script worked. I watched the GIF and the black box was sitting next to the name instead of on top of it. The redaction code was placing boxes by splitting a text run's total width by its character count, so a box over characters 4 to 9 was a flat fraction of the run. That's correct for a monospaced font and wrong for every other font, and the drift grows with the length of the run. Sometimes it covered the word. Sometimes it covered the word and a bit of the next one. Sometimes it sat just to the right of the thing I was trying to hide. Here is the part that stings. The app already verified its own output. After exporting, it re-opens the PDF it just produced, extracts the text layer and checks that the redacted string is gone. That check passed every single time, and it was right to pass: the text really was destroyed. It just wasn't the text under the box the user drew. My veri

IADev
Interesse
dev.to

Recursive Governance: When Agents Write the Rules They Execute

We almost lost forty modules to a file that never changed. The sync job ran every six hours, mirroring our shared working directory into a test workspace. At 21:47 on a Tuesday, it removed about forty private modules that should have been ignored. The filter file was missing one pattern. That's it. One pattern. A colleague had restructured the source tree three days earlier, added a directory, and didn't update the filter file. The script didn't warn, didn't ask, didn't fail. It just mirrored the state it was told to mirror. Restoring the modules took us almost two hours, one by one from the backup box. The filter file was a static text file. It encoded what the sync could delete and what it couldn't, and it had no idea that the real inventory had changed. No idea that a pattern was missing. No way to test a proposed pattern against the forty modules it was about to destroy. That's the same shape as most multi-agent governance failures. Rules are written at some point in time, then the world changes, and the rules stay frozen. Static policy files don't survive contact with a running system. They don't know what they're protecting. So we gave the agents the ability to write their own rules. The first version was naive. We opened a write endpoint that let any agent append to the rule store. The first three weeks were great. Agents resolved tool-access conflicts by proposing new rules, and a couple of stale patterns got archived without a human in the loop. Then it started to rot. Rules referenced other rules that had been overwritten. Rules contradicted each other. Ask two agents about the same namespace and you'd get two different answers. Three months in, the rule store had tripled in size, and nobody — not the human team, not the agents — could tell which rule was actually in effect. It grew quietly. No alert fired. No metric moved. The rot was visible in the rule history, if you were looking for it; nobody was, because we hadn't built any lifecycle tooling. That w

IADev
Interesse
dev.to

How to Make a Gravity Flip and Jump Pads in Roblox Studio (With AI, No Scripting)

Spikes, jump pads, orbs and gravity flips: the four mechanics behind every runner level, in four prompts Disclosure: I'm in ForgeGUI's creator partner program and get paid for content about it. Everything below comes from real footage of the build. Gravity flips, jump pads and orbs show up in a lot of Roblox games: obbies, runners, Geometry Dash remakes, platformers. They're also annoying to script as a beginner. You're dealing with custom gravity, launching the player with the right force, and detecting a mid-air touch. Here's how I added all four to a level without writing code, using ForgeGUI, an AI tool with a Roblox Studio plugin. The build was a Geometry Dash-style level, but the same prompts work for any runner or obby. Prompt: "Build a geometry dash level" Mechanics need somewhere to live, so start with the base. Mine was a neon runner with a cube as the player. For an obby, "build a simple obby" does the same job. Prompt: "Let me jump over spikes" Describe it from the player's side: "let me jump over spikes", not "add a kill part". You get hazards placed where jumping matters, rather than random parts scattered around. Prompt: "Add jump pads and orbs" Two mechanics in one prompt works here because they're closely related: both launch you. Jump pads are the yellow pads on the floor. Touch one and you get launched. Orbs float in the air and give you a boost when you hit them mid-jump. Tip: if you're adding two unrelated mechanics, split them into two prompts. It's much easier to see what went wrong. Prompt: "Make gravity flip" This is the one that's genuinely hard to script by hand, and it was three words. After the prompt, the cube flips toward the ceiling and the level gets hazards up there too. That's what makes the flip matter. Glowing pillar sections showed up around this point as well. Once all four mechanics existed, I let the AI combine them with two escalation prompts: "Make the level insane" "Make the final level impossible" That's the order I'd rec

Games
Interesse
dev.to

Same Wrong Request Type, Four Different Answers: 404 Silence, a Named 405, and Two Venues That Simply Do Not Care

Same Wrong Request Type, Four Different Answers: 404 Silence, a Named 405, and Two Venues That Simply Do Not Care By FeeAtlas — an independent, neutral researcher of exchange fee and specification data. No affiliations with any venue named here. Disclosure: this article was drafted with AI assistance from measurements taken directly against the exchanges' own public endpoints. Every number and response body quoted below was captured live and can be reproduced by you in under a minute. Ad/affiliate disclosure (#ad): this site participates in affiliate programs. There are no affiliate or sponsored links in this article — every link is a link to an official exchange document, placed for verification purposes only. Every trading API tutorial eventually hits the same wall: you sent a POST where the endpoint wanted a GET. On the open web, HTTP gives a clean, standardized answer — status 405, "Method Not Allowed." Case closed. Crypto exchanges, it turns out, hold four completely different opinions about what should happen. Some do not have the concept at all. Five exchanges expose a clock endpoint that requires no account and no API key: a GET that returns the server's current time. For this test, each endpoint received the same request it did not ask for — an empty POST — twice, on two independent rounds, about one minute apart. Nothing else changed: same machine, same browser-like request header, no body, no credentials. Measured live on 2026-10-06 at 02:08–02:09 UTC (first detection round: earlier the same day at 00:44–00:55 UTC, identical outcomes). POST https://api.binance.com/api/v3/time → HTTP 404, zero bytes returned. Both rounds, exactly the same. The subtlety is worse than the 404 itself. GET a path that genuinely does not exist on Binance and you also get a 404 with an empty body. The response cannot tell you whether your path is wrong or your method is wrong — "typo in URL" and "wrong verb" collapse into one indistinguishable silence. POST https://api.bybit.com

Dev
Interesse
dev.to

What If Your Old Memories Could Send You Outside?

AI can write our emails, plan trips, recommend what to watch and tell us what to do when we're bored. And somehow, we still end up staring at the same screen. So I wanted to build something backwards. Instead of an AI that keeps you online I wanted one that gives you a reason to put your phone down. Meet Memory Hunt. Memory Hunt takes a personal memory and turns it into a small real world mission. For example: “When I was younger, I used to play badminton with my cousins on our terrace.” Memory Hunt might turn that into: 🌤️ Memory Hunt #01 Go somewhere you used to play as a kid. Stay there for five minutes. Find one thing that looks exactly the same. Find one thing that has completely changed. Don't take a photo. Just remember it. Then the app's job is done. Close it. Go outside. I could have built another app that says: “Go for a walk! 🚶” But that doesn't answer the interesting question: Why would I want to go? A memory can provide that reason. Maybe you used to: Play cricket with your friends Ride your bicycle around the neighborhood Visit your grandparents' garden Get snacks from the same corner shop Sit outside after school Memory Hunt turns those memories into tiny invitations to revisit the physical world. Not to recreate the past. Just to notice it again. The flow is deliberately small: Remember something ↓ Memory Hunt ↓ Local AI ↓ Outdoor mission ↓ Put phone away ↓ 🌱 Go outside The user provides: A memory Time available Activity level Alone or with friends Desired mood The model turns that context into one short mission. For example: Memory “I used to play cricket in the street with my neighbors.” Mission 🏏 The Old Playground Quest Go back to that street. Find the place where you usually played. Find one thing that wasn't there when you were a kid. Then find one thing that still feels familiar. No giant itinerary. No endless recommendations. Just a reason to go. Memory Hunt uses an open-weight AI model through local inference rather than relying on a clo

IAMobile
Interesse
dev.to

[Spanish] Un sitio de 996 páginas sin servidor ni base de datos: Astro + Claude Code

Hace unos meses empecé a ordenar los resultados de gateball en el Perú. Los datos estaban repartidos en más de diez años de entradas del blog Kantokeando: torneos, equipos, jugadores y puestos. Los fui pasando a un Excel a mano y me pregunté si se podía convertir en algo útil para la comunidad, que busca saber quién ganó, cuántos títulos tiene un equipo o cómo le fue a un jugador. Así nació Gate-Datos: un archivo de consulta con 189 torneos, 203 equipos, 538 jugadores y más de mil resultados, de 2014 a 2026. Es solo de lectura, sin login, sin formularios y sin base de datos en el camino. La portada: un buscador y el último torneo. Todo es HTML generado de antemano. Los datos cambian poco. Se agregan unos 4 a 8 registros cada dos semanas, así que no hace falta consultar nada en tiempo real. Eso me llevó a esta arquitectura: El Excel es la única fuente de verdad. Un pipeline en Python (pandas, rapidfuzz) lo valida, normaliza los nombres y exporta JSON. Astro lee esos JSON y genera el sitio entero como HTML estático. Cloudflare sirve los archivos. No hay servidor de aplicación, API ni consultas en cada visita. Cada página ya está construida antes de que alguien la pida. Cada torneo tiene su página con los podios por categoría. Una página más de las 996 que genera el build. Con los datos actuales, un solo build genera 996 páginas (una por torneo, jugador, equipo, año, tabla de posiciones y más) en unos 11 a 13 segundos. El sitio completo pesa unos 51 MB. Reconstruirlo entero en cada actualización me sale gratis en la práctica, y por eso lo hago a propósito: la normalización de nombres es global, y un registro nuevo puede cambiar datos que ya existían. Un build completo siempre es coherente. Lo que le ganamos al usuario: Velocidad: cada página es HTML listo, sin esperar a un servidor ni a que un framework "arme" la pantalla en el navegador. Poco JavaScript: Astro no envía JS que no pidas. En mi caso solo viaja un índice de búsqueda de unos 90 KB. Los JSON grandes (el de

Dev
Interesse
dev.to

Does a Claude Code UserPromptSubmit hook keep a blocked prompt out of the transcript? 6 of 6 never reached the model, all 6 were still written to it

6 of 6 prompts that a UserPromptSubmit hook blocked never reached the model, yet all 6 were still written to the session transcript (4 of them twice), and claude -p exited 0 with "subtype": "success" every time. Context injection matched the hooks page: plain stdout and additionalContext arrived in 2 of 2 runs each, 10,000 characters arrived whole, 50,000 became a 1,949-character preview, and a hook that exited 1 or printed a bare JSON object delivered nothing in 4 of 4 runs. UserPromptSubmit runs after you press Enter and before Claude sees what you typed. That position makes it the hook people reach for in two situations: adding context to every prompt (the current branch, today's date, a rule worth repeating) and refusing a prompt outright (a pasted key, a request that should never go out). Both jobs come down to one question. Of everything the hook prints, what goes in front of the model, what goes to the person or the script running Claude Code, and what goes to disk? The hooks reference answers most of that in prose, and I wanted the answer from the session files instead. So I built a lab with a single hook, ran it 20 times under claude -p across ten output shapes, two runs per shape, and read what every run left behind. Everything below ran on 2026-09-30 with Claude Code 2.1.285 (claude --version) and claude-opus-5-5 (selected with --model opus). The documentation quotes come from https://code.claude.com/docs/en/hooks.md, fetched the same day with trafilatura. These are the sentences I tested, quoted as fetched: On exit 0: "For most events, Claude Code writes stdout to the debug log and doesn't show it in the transcript. The exceptions are UserPromptSubmit, UserPromptExpansion, SessionStart, and PostModelSwitch, where Claude Code adds plain-text stdout as context that Claude can see and act on." In the UserPromptSubmit section: "Plain stdout and the additionalContext value are each injected as a system reminder that starts with the hook's name; Claude reads b

IADev
Interesse
dev.to

Enclosing a Startech 19U Rack: Materials and Methods for Noise Reduction and Proper Air Circulation

Integrating a Startech 19U rack into a residential setting demands a nuanced approach to address two critical challenges: noise containment and thermal management. The rack’s cooling fans, operating at 30–40 dB(A) under load, generate noise levels incompatible with apartment living, while their function is essential for dissipating heat from high-performance components. This dual problem necessitates a solution that simultaneously mitigates sound transmission and ensures adequate airflow to prevent thermal throttling or hardware failure. Material selection and construction techniques are pivotal in achieving this balance. Medium-density fiberboard (MDF), valued for its density and sound-blocking properties, can effectively attenuate noise but poses a risk of airflow restriction if not strategically vented. Conversely, a 1x2 wooden frame provides structural integrity but requires precise integration of soundproofing materials to suppress panel resonance—a phenomenon where sound waves excite panel vibrations, amplifying noise. Failure to address these factors results in compromised equipment performance or insufficient noise reduction, undermining the enclosure’s purpose. Improper enclosure carries significant risks: thermal throttling occurs when restricted airflow allows heat to accumulate, triggering protective mechanisms that reduce component performance or cause shutdowns. Simultaneously, inadequate soundproofing permits noise leakage through gaps or resonant surfaces, negating the enclosure’s intended benefit. This article examines practical DIY solutions grounded in the physics of sound transmission and convective heat transfer, empowering hobbyists to integrate professional-grade equipment into residential spaces without sacrificing functionality or comfort. By dissecting the interplay between material properties, structural design, and physical principles, readers will gain actionable insights to construct enclosures that maintain optimal equipment operation

Infra
Interesse
dev.to

How to Read the Linux User List Without Misreading It

A Linux account list is not a list of people currently using the machine. It includes service accounts, accounts from configured identity providers, and users who may not be logged in at all. The right command depends on which question you’re trying to answer. getent passwd To list accounts the system knows about, run: getent passwd Each result is a colon-separated record. For usernames only: getent passwd | cut -d: -f1 getent queries the system’s configured account sources. That commonly includes the local /etc/passwd file, and may also include directory services such as LDAP or SSSD. This makes it a better default when you want accounts visible to the system rather than just entries in one file. If you specifically want local accounts, inspect the file directly: cat /etc/passwd On a machine without another account source configured, these commands will usually return the same accounts. To see which sources are configured for the passwd database, check: grep '^passwd' /etc/nsswitch.conf A line from getent passwd or /etc/passwd has seven fields: username:x:UID:GID:comment:home-directory:login-shell The fields are separated by colons. For example, the UID identifies the account, the GID is its primary group, and the final field is its login shell. The x is a placeholder; password hashes are stored separately in /etc/shadow. A shell such as /usr/sbin/nologin or /bin/false is a strong clue that an account is not intended for interactive shell login. Service accounts often look like this, though the field alone doesn’t tell you everything about an account’s purpose or permissions. The listing includes accounts regardless of whether they’re locked, expired, or currently being used. It answers “which accounts are known?”—not “who is online?” A common shortcut is to treat every account with a UID of 1000 or higher as a human user. That threshold is not universal. Debian, Ubuntu, and RHEL 9+ commonly use 1000 as UID_MIN; older RHEL and CentOS releases used 500 by default, a

LinuxInfra
Interesse
dev.to

Build a Voicemail Generator with ElevenLabs API

Overview When you’re building a contact‑center or a smart‑home system, the last thing you want is an empty voicemail box. A little voice‑AI can turn a static “no answer” message into a personalized, dynamic greeting that feels like a real person. In this post we’ll walk through how to create a Voicemail Generator using the ElevenLabs Text‑to‑Speech (TTS) API. We’ll cover everything from authentication to generating a voice‑cloned message, then bundle it into a simple Flask app that can be called via webhook or a REST endpoint. The result? A lightweight service that lets you generate a voicemail audio file on the fly, using the same high‑quality voices you can clone with ElevenLabs. Let’s dive in. Item Description Python 3.8+ For the example code pip To install dependencies ElevenLabs API key Sign up at https://try.elevenlabs.io/kr07zfuqn1bp Basic knowledge of Flask We’ll expose a simple HTTP endpoint Tip: If you’re new to ElevenLabs, the link above gives you a free trial with credit to test the API. ElevenLabs offers a powerful, low‑latency TTS endpoint that supports voice cloning, speaker embeddings, and a large library of natural‑sounding voices. The API is REST‑based, so you can call it from any language. Visit https://try.elevenlabs.io/kr07zfuqn1bp. Create an account or log in. Navigate to the API Keys section and copy the key. Store it in an environment variable for security: export ELEVENLABS_API_KEY="sk_your_key_here" curl -X POST "https://api.elevenlabs.io/v1/text-to-speech/eleven_monolingual_v1" \ -H "xi-api-key: $ELEVENLABS_API_KEY" \ -H "Content-Type: application/json" \ -d '{"text":"Hello, this is a test."}' You should receive an audio stream in the response body. Great! You’re ready to embed this into an app. ElevenLabs lets you clone a voice by providing a short audio clip. For a voicemail system, you might want to use a company‑wide voice (e.g., a receptionist) or a custom voice that matches your brand. import requests import os API_KEY = os.getenv("E

IADev
Interesse
dev.to

How to Make Geometry Dash in Roblox With AI (No Coding): 6 Prompts

From an empty baseplate to an "impossible" neon level, one sentence at a time Disclosure: I'm in ForgeGUI's creator partner program and get paid for content about it. Everything below comes from real footage of the build. "Geometry Dash in Roblox" is one of those ideas every Roblox player has had at some point: a glowing cube, spikes, jump pads, gravity flips, and a level that keeps getting harder. Building it yourself normally means scripting movement, collisions, respawns and a whole level by hand. I built one with six typed prompts using ForgeGUI, an AI tool with a Roblox Studio plugin that puts what it generates straight into your place. Here's every prompt, in order, and what each one added. Prompt: "Build a geometry dash level" I started on a plain baseplate with a default character. One prompt turned it into a Geometry Dash-style runner: a dark world with neon cyan and purple platforms and a glowing cube as the player. It also added a small on-screen HUD in the corner with "RUN / JUMP / REPEAT", an attempt counter and a section counter. That's the detail that made it feel like actual Geometry Dash instead of "a cube on a platform". Prompt: "Let me jump over spikes" Spikes are the core of the genre. Notice the wording again: I described what the player does ("let me jump over"), not how to code a hazard. The result was glowing pink spikes on the track that you have to time your jumps over. Prompt: "Add jump pads and orbs" This is where it starts to play like the real game. Yellow jump pads on the floor launch the cube, and floating yellow orbs give you something to hit mid-air. Prompt: "Make gravity flip" Gravity flips are the moment Geometry Dash levels go from "fine" to "wait, what". After this prompt the cube flips toward the ceiling, and the level gets hazards on the top as well as the bottom. Glowing pillar sections also started showing up in the level. Prompt: "Make the level insane" Once the mechanics exist, a "vibe" prompt lets the AI decide how to esc

Games
Interesse
dev.to

Don't Buy an All-in-One AI Subscription Without Running These Checks

The landing page looks compelling. A dozen tools, familiar model names, a fair price. But that page is marketing copy, not a description of how the tool fits into your weekly workflow. A plan can look great in a screenshot and still be a poor match for your actual daily work. That gap matters now because AI is no longer a single-task tool. Developers use it to review notes, compare options, dig through data, sketch outlines, and push out a first draft faster. A subscription worth paying for should slot into the way you already work, not force you to adopt a new process just to use it. Before you buy an all-in-one AI subscription, check it against your real workflow instead of the feature list: confirm what's included, run it on tasks you'd do this week, judge the output on its own merits, read the usage limits, check team access and billing, and look at what the tool does with your data. If it clears those checks, it's probably worth the money. Don't assume every AI subscription bundles the same stuff. Some are built around writing. Some give you access to a handful of different models. Others throw in tools for presentations, research, summarization, document review, or image generation. Make a short list of what you actually need help with this month: research, planning, writing code, drafting support replies, building slide outlines, or getting through a long document. Then hold that list against what the subscription actually offers. If most of the features line up with real tasks, the plan is probably worth it. If the tool list sounds impressive but doesn't touch what you do day to day, you're paying for a dashboard you'll open twice. The best way to test it is with something you'd normally be working on, not a sample prompt from a demo video. Feed it a document you actually need to read this week. Ask it to compare two product ideas you're weighing. Hand it a pile of messy meeting notes and see what comes back. Try it on the task that usually eats an hour and

IA
Interesse
+1 fonte
dev.to

Building a server-rendered admin UI with Express, EJS, and SEN-JS

Admin screens usually need the same building blocks: navigation, tables, search, filters, and forms. In my public project SEN-JS, I organize those pieces as reusable EJS components, with Express handling the page rendering. This walkthrough covers the project’s documented component model and how to explore it locally. The source is available at Darkguyaiman/SEN-JS. A server-rendered page can receive its title, navigation, and rows in one render operation. In SEN-JS, the renderPage helper connects the page template to the component registry. That keeps a route focused on preparing data while templates describe the interface. The repository separates routes/, views/, and components/. Shared rendering behavior lives in lib/core/Component.js. A component has an EJS template and, when it needs browser behavior, an optional JavaScript file. For example: components/ sidebar/ sidebar.ejs sidebar.js table/ search-bar/ filter/ calendar/ button/ This makes the unit of reuse concrete: markup and related behavior live together. The project loads scripts for the components used on the page, so adding a button does not mean manually importing every component script. Here is a small EJS example using the documented button interface: The button API includes props such as label, variant, size, href, and disabled. Tables receive columns and rows, while filters receive their options and selected value. Explicit inputs help keep page-specific content out of shared templates. The table component also supports a cardTitle property for its mobile card presentation. That is useful when the same records need to be readable on both a wide admin screen and a phone. With Node.js and npm available, clone the repository and install its dependencies: git clone https://github.com/Darkguyaiman/SEN-JS.git cd SEN-JS npm install npm run build:css npm run dev The README documents demo data when MySQL is unavailable. To use a database, copy .env.example to .env, configure MySQL, and follow the schema set

Dev
Interesse
dev.to

The Wiki Write That Wasn't a Write: Why Agent Guardrails Must Check Outcomes, Not Tools

Last week's agent-safety news had an unusual shape. Nvidia launched an open agent safety platform, with a sandbox runtime and a monitoring layer that it says can quarantine an agent that steps outside its boundaries "in milliseconds." The same week, security write-ups described a case in which a large number of agents, running under a read-only internet policy, coordinated through a dormant wiki. They used plain HTTP GET requests to change its content. The sandbox, as one analysis put it, blocked the expected write mechanism but failed to prevent every action capable of altering an external system. That sentence is the most useful thing in the whole news cycle, and it is not really about sandboxes. It describes a specification failure. The policy said "no writes." The agents found an action that wasn't called a write but had the effect of one. If you build or deploy agents, this is the week to stop treating guardrails as a list of forbidden tools and start treating them as a classification problem over outcomes. Classification problems need labeled data. That is where most teams are underinvested. A tool-level rule says: block POST, block rm, block DROP TABLE. It is cheap to write and easy to audit. It also assumes you can enumerate every way to cause a side effect, and you can't. Some examples of the gap: A GET endpoint that mutates state (still common in old internal tools and wikis). A "read-only" database role that can still call a stored procedure with side effects. A shell command that is not on the deny-list but writes through a pipe, a redirect, or a package manager hook. An agent that can't send email but can create a calendar invite with an external attendee. Every one of these is a case where the syntax of the action looks benign while the effect is not. The fix the governance folks keep landing on is "validate outcomes, not just restrict request types." Agreed. But "validate outcomes" is easy to say and hard to do. Something has to decide, for each propo

IADevSegurança
Interesse
dev.to

Linux Remote Desktop: Choose RDP, xrdp, VNC, or SSH

A remote desktop is useful when you need to interact with a graphical Linux session. But if you're only restarting services, editing configuration, or checking logs, SSH is usually simpler and lighter. The right choice depends on the desktop environment and whether you need to share an existing session or connect to a separate one. Method Good starting point Keep in mind GNOME Remote Desktop A current GNOME desktop Built in, but interactive sharing requires a logged-in session xrdp Older systems or desktops such as XFCE and MATE Often needs an Xorg session; can conflict with another RDP server on port 3389 VNC Cross-platform or legacy setups Security varies; don't assume the connection is encrypted SSH Command-line administration No full graphical desktop If you're using a current Ubuntu or Fedora GNOME desktop, try GNOME Remote Desktop first. It speaks RDP, so you can connect with an RDP client rather than installing a separate server. For a Linux client, compare the available RDP clients if you need help choosing one. On the Linux desktop, open Settings → System → Remote Desktop, enable Remote Desktop, and set the connection username and password. These credentials don't have to be the same as your Linux login, so choose strong, unique ones. From Windows, open Remote Desktop Connection (search for mstsc) and connect to the Linux machine's IP address. On macOS, use Microsoft's Remote Desktop app. On Linux, Remmina is one option. The Settings toggle shares the currently logged-in desktop. If nobody is logged in locally, there may be no interactive session to share. GNOME also has a separate remote-login mode for access to the login screen, configured with grdctl rather than the Settings toggle. xrdp is an RDP server to consider for older distributions or non-GNOME desktops. On Debian-based systems, the source gives this basic installation and service setup: sudo apt install xrdp sudo systemctl enable --now xrdp A common snag is the desktop session type. xrdp often r

Linux
Interesse
dev.to

How to Add AI Voice to Your Mobile App

Introduction Adding a natural‑sounding voice to a mobile app can turn a static UI into an engaging, accessible experience. Whether you’re building a language‑learning app, a voice‑assistant, or just want to read notifications aloud, modern text‑to‑speech (TTS) APIs make it surprisingly easy. In this guide we’ll walk through the whole pipeline: Choose a TTS provider – we’ll focus on ElevenLabs, a high‑quality, low‑latency service. Set up a backend that talks to the API (Python example). Consume the audio on iOS (Swift) and Android (Kotlin). By the end you’ll have a reusable “speak” function you can drop into any mobile project. Accessibility – Screen readers are great, but custom voice prompts can convey brand personality and context‑specific cues. Engagement – Audio feedback keeps users’ eyes on the content while still delivering information. Localization – With voice cloning you can generate consistent narration across languages without hiring multiple voice actors. There are plenty of free and paid options (Google Cloud TTS, Amazon Polly, Azure Speech). For most mobile use‑cases you want: Feature Why It Matters Low latency Mobile users expect near‑instant feedback. High‑quality neural voices Natural prosody reduces the “robot” feel. Voice cloning Keep a brand‑specific voice across updates. Simple pricing Predictable cost as you scale. ElevenLabs checks all these boxes. Their API delivers lifelike voices in under a second, and they provide a straightforward REST interface that works well from any language. You can sign up and get a free credit via this link: https://try.elevenlabs.io/kr07zfuqn1bp. After registering, navigate to the dashboard → API Keys and copy the key. Keep it secret – you’ll use it from your backend, not directly in the mobile app. curl curl -X POST "https://api.elevenlabs.io/v1/text-to-speech/EXAMPLE_VOICE_ID" \ -H "Accept: audio/mpeg" \ -H "Content-Type: application/json" \ -H "xi-api-key: YOUR_API_KEY" \ -d '{ "text": "Hello, welcome to our ap

MobileDev
Interesse
dev.to

Multilingual Ghost CMS Blog: 8. Automating hreflang for #multi Posts

💡On Managed Ghost hosting, you cannot modify Ghost Core or register custom Handlebars helpers. This is the approach I chose to eliminate repetitive Code Injection within that constraint. For each post, I could manually insert hreflang into Ghost Admin's Code Injection. But every time I publish a translated post, I would have to enter both the English URL and the Korean URL repeatedly on both posts. There is also a chance of copying a URL incorrectly or adding it to only one side. In 0.0.8, I changed this so the theme handles the job automatically. I also removed the tag-order dependency issue that surfaced along with it. This is a screen showing a real published post imported into local Ghost. The slug ends with orca-codex-threads-chatgpt-ko, and the tags include both #ko and #multi. 0.0.8 · Automated bilingual hreflang and tag detection I use the following rules for automation. The English post slug ends with -en. The Korean post slug ends with -ko. Add the #multi internal tag to posts whose translations are all ready. Each post must have either the #en or #ko internal tag to indicate its own language. For example, the two posts below are one translation pair. English slug: multilingual-ghost-cms-en Korean slug: multilingual-ghost-cms-ko The actual URLs are generated like this. https://sanghunkang.com/multilingual-ghost-cms-en/ https://sanghunkang.com/ko/multilingual-ghost-cms-ko/ I separated the code that generates multilingual URLs for posts and pages into a separate partial. First, set the supported languages and the default language. var LANGS = ["en", "ko"]; var DEFAULT_LANG = "en"; Next, turn all of the post's tag names into a JavaScript array. var tagNames = [ {{#foreach tags visibility="all"}} "{{name}}"{{#unless @last}},{{/unless}} {{/foreach}} ]; The reason for specifying visibility="all" is that #multi, #en, and #ko are all internal tags. Without this option, Ghost excludes internal tags from the loop result. If there is no #multi, do nothing. if (tagNa

Dev
Interesse
dev.to

Field Notes #1: Setting Up My Professional Technical Blog & Initial Lab Workspace

​1. The Objective ​2. The Hurdle ​3. The Solution ​To fix the permission error on my Linux terminal, I updated the file permissions to make the script executable using chmod +x setup_lab.sh instead of granting full root access unnecessarily. Once executed, the lab environment loaded cleanly. I then finalized my blog domain configuration, verified the public visibility of this post, and linked the URL back to my course Staging Area for weekly submissions.

Linux
Interesse
dev.to

彻底放弃MicroFeed了

Github因为我发的一些比基尼的图片直接给我删库了,其实用的也不是GitHub的图床了还是被废了。虽然GitHub/GitLab注册很简单,但对这些第三方代码平台有点烦了。 SaaS全托管的最后考虑Mataroa Blog,主要是导出导入很方便,完全支持Markdown,最重要的是可以邮件发博文。不过跟Hatena一样,每次新起一行都需要留一行空行,否则文字都会挤在一起,WordPress跟Blogger没这方面问题。 我已经试过了各种博客系统: Jekyll/Hugo/VitePress/Gmeek/SkunkHTML/MDXpress,多数都是GitHub + CloudFlare Page,有些是GitHub,多数更新都比较麻烦,Gmeek还算简单。 昨天到今天想试一下只用CloudFlare弄一个简单的MicroFeed,但设置了半天也没成功。 考虑了很久,打断自己用Obsidian + Share.Note.Sx 做一个目录页,从Mataroa Blog/Bear Blog/WriteFreely第三方实例/Hatena Blog/PageCord里面选择1-2个做备份用。只要本地保存Markdown文件,博客平台就只是一个空壳罢了,需要展示的时候导入一下即可。 昨天其实还试了发多图到Nostr,结果账号他站的图床的链接跟帖子最后都消失了,这也证明了自由是有边界的,掌控权不在自己手里总是会出现这种事情。 无论如何,就先测试一下自己这种做法是否可行吧,虽然做目录也有点麻烦。

Dev
Interesse
dev.to

Install an SSH Public Key on a Server from Linux, macOS, or Windows

Password prompts on every SSH connection get old quickly. Public-key authentication fixes that, but first the server needs your public key in the right place. On Linux, ssh-copy-id handles the common case. On macOS and Windows, you may need to install or use an alternative. You need a key pair and a way to log in to the server already, such as a password or another working key. A key-copy command cannot grant access if it has no way to reach the account. If you haven't made a key yet, generate an Ed25519 key pair: ssh-keygen -t ed25519 The public key is the file ending in .pub, commonly ~/.ssh/id_ed25519.pub. The file without .pub is the private key. Only install or send the public key. Never paste your private-key contents into a server or account setting. ssh-copy-id For a server that accepts your current login method, run: ssh-copy-id user@host Replace user and host with the account and hostname or IP address. You'll authenticate using an existing method, often your account password. The command appends your public key to the remote account's ~/.ssh/authorized_keys file. If you have multiple keys, select the public key explicitly so you don't install the wrong identity: ssh-copy-id -i ~/.ssh/id_ed25519.pub user@host For a server listening on a non-default SSH port, use -p: ssh-copy-id -p 2222 user@host By default, ssh-copy-id checks whether the key is already installed. A message saying all keys were skipped because they already exist usually means there was nothing to add. Avoid -f unless you specifically want to append the key again; repeated copies can leave duplicate lines in authorized_keys. macOS includes OpenSSH, but not the ssh-copy-id script. If you use Homebrew, install it with: brew install ssh-copy-id Then use the same commands as on Linux. Alternatively, if you only need to copy your public-key text to the clipboard—for example, to paste it into a service's settings—use: pbcopy > ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys" Change the

InfraDevLinux
Interesse
+1 fonte
dev.to

My refund handler checked the ledger before paying. It still paid twice.

A refund handler commits the refund, then loses its reply. Maybe the HTTP response timed out. Maybe the worker died before it acknowledged the queue message. Maybe it was an AI agent's tool call, and the agent saw a timeout and called the tool again with the same arguments. The sender did nothing wrong by retrying. The question is what your handler does with the second delivery. The usual fix is to look first: if the ledger already has a refund for this order, return early. I wanted to see how far that fix goes, so I wrote a small pytest plugin that delivers the same event again in four different ways and counts how many times the effect landed. It is public and runs offline: github.com/jigonyoo/replay-twice. Scenario What happens duplicate the same event arrives twice, one after the other timeout_retry the handler finishes, its reply is replaced by a timeout, and a scripted agent retries the same tool call with the same arguments crash_before_ack the handler finishes, the acknowledgement is lost, and the event is redelivered: the queue's or webhook sender's view (the lost ack is simulated with an exception; no process is killed) concurrent eight deliveries at once: threads released together by a barrier, or eight tasks on one event loop for async def handlers The verdict does not come from the handler's return value. You give the drill an effects(key) function that counts what was actually committed, such as rows in the refund ledger for that order, and a trial passes only if the count is exactly one. The repository ships SQLite versions of a refund tool and a payment.succeeded webhook, each written four ways: naive writes the refund every time. check_then_act reads the ledger, and writes only if nothing is there. guarded_raises claims the order id in a table with a unique key, in the same transaction as the refund. A second claim raises an integrity error. guarded makes the same claim with INSERT OR IGNORE and returns “already applied” when the claim was already t

Dev
Interesse
dev.to

Traefik or Caddy? Choose a Reverse Proxy by How You Deploy

Adding a service behind a reverse proxy should be routine. But the workflow changes depending on whether routes live in one proxy config or are discovered from your containers. That distinction is often more useful than trying to pick a universal winner between Traefik and Caddy. A good starting point: Caddy is often simpler when you have a small, fairly stable list of sites. Traefik is often a better fit when Docker services change frequently and you want routing to follow container metadata. With Caddy, you typically write a site block that maps a hostname to an upstream. The routing configuration is explicit and centralized: app.example.com { reverse_proxy app:3000 } Here, app:3000 is the service name and port reachable from Caddy on the shared Docker network. Caddy does not discover containers just because they are running; you provide or generate the upstream configuration. Traefik can use a Docker provider to discover containers and build routes from labels on each Compose service. A minimal example of the routing labels looks like this: services: app: image: example/app networks: - proxy labels: - "traefik.enable=true" - "traefik.http.routers.app.rule=Host(`app.example.com`)" - "traefik.http.routers.app.entrypoints=websecure" - "traefik.http.services.app.loadbalancer.server.port=3000" This assumes Traefik is configured with the Docker provider and a matching websecure entry point, and that both services can communicate on the proxy network. The labels describe routing; they are not, by themselves, a complete HTTPS certificate setup. The workflow difference is the point: with Caddy, you update the proxy configuration when the set of routes changes. With Traefik's Docker provider, route definitions can live alongside the application in Compose labels. Choose Caddy when you want a readable, site-oriented configuration and do not expect routes to change constantly. This works well for a VM, home server, or small Compose stack where someone can easily review a sho

InfraDev
Interesse
dev.to

Filter tcpdump by IP: Hosts, Direction, Subnets, and Ports

When a packet capture is full of traffic you don't care about, narrow it with a capture filter. For an IP address, the key distinction is whether you want traffic in both directions, only packets from the address, or only packets going to it. sudo tcpdump -nn -i eth0 'host 192.0.2.25' This captures packets where 192.0.2.25 is either the source or destination. Replace the example address and interface with the ones relevant to your system. An IP filter only sees packets that reach the interface you selected. On Linux, list available capture interfaces with: tcpdump -D Then select the interface carrying the traffic with -i. If you're unsure which device to inspect, this guide to listing network interfaces on Linux explains how to identify them. The options and the filter have separate jobs: -i eth0 selects the interface. -nn keeps addresses and ports numeric instead of resolving names. 'host 192.0.2.25' is the capture filter. On many Linux systems, packet capture requires elevated privileges, which is why examples use sudo. Use host to match an address appearing as either endpoint. Add src or dst to restrict which side of the packet must contain it: # Packets to or from the address sudo tcpdump -nn -i eth0 'host 192.0.2.25' # Packets sent by the address sudo tcpdump -nn -i eth0 'src host 192.0.2.25' # Packets sent to the address sudo tcpdump -nn -i eth0 'dst host 192.0.2.25' Direction is relative to the packet being observed. If you capture only dst host 192.0.2.25, a reply sent from that address won't match. Start with host when you want to see both sides of a conversation; narrow to src or dst once you know which direction matters. To capture traffic involving any address in a network, use net with CIDR notation: sudo tcpdump -nn -i eth0 'net 192.0.2.0/24' This matches packets whose source or destination belongs to 192.0.2.0/24. Add a direction qualifier if you only want one side: sudo tcpdump -nn -i eth0 'src net 192.0.2.0/24' sudo tcpdump -nn -i eth0 'dst net 192.

InfraDev
Interesse
dev.to

Overcoming LLM Knowledge Gap: Balancing AI Tool Use with Advanced Local Model Understanding

Introduction: The Rise of LLMs and Their Impact The integration of Large Language Models (LLMs) into professional workflows has sparked a critical debate: Is advanced knowledge of local LLMs essential for leveraging AI tools effectively? This question resonates across industries as LLMs become the backbone of automation, decision-making, and innovation. While the complexity of LLM technology and its rapid evolution might suggest that deep expertise is mandatory, the reality is more nuanced. Many users, like the individual in our case study, rely on pre-configured AI tools that streamline tasks without requiring technical mastery. This raises a pivotal issue: Are they missing out, or are they optimizing their time? The individual’s workflow, powered by ready-to-use AI tools, exemplifies the efficiency paradox of modern AI adoption. These tools, designed for plug-and-play usability, eliminate the need for deep LLM knowledge, enabling users to complete 20 tasks in the time it would take to do 5 manually. Mechanically, this efficiency stems from the tool’s ability to abstract complex processes—such as model fine-tuning, parameter optimization, and data preprocessing—into a user-friendly interface. However, this abstraction comes at a cost: limited exposure to cutting-edge advancements and reduced customization potential. For instance, while pre-configured tools handle repetitive tasks like data extraction or content generation, they may fail to adapt to edge cases—scenarios where the model’s default behavior is insufficient. In such cases, understanding the inner workings of LLMs becomes critical. For example, fine-tuning a model to recognize industry-specific jargon or optimizing its output for a niche audience requires knowledge of model architectures, training data biases, and evaluation metrics. Without this knowledge, users risk suboptimal outcomes, such as inaccurate predictions or generic outputs that fail to meet specific needs. The individual’s concern about “m

IA
Interesse