今日已更新 184 条资讯 | 累计 37433 条内容
关于我们

标签:#X

找到 1273 篇相关文章

AI 资讯

Buildroot for Embedded Linux — Part 1: Your First Buildroot Root Filesystem

Buildroot builds a cross-compiler, a Linux kernel and a complete root filesystem from source, driven by one Kconfig-style configuration file. Starting from the qemu_arm_vexpress_defconfig that ships with Buildroot 2026.05.1, two commands produce a bootable ARM system you can run under QEMU. The images you ship are the ones in output/images/ ; output/target/ looks like a root filesystem but must never be copied to a device. This post starts a new hands-on series on Buildroot for embedded Linux. By the end of this part you will have built a working Buildroot root filesystem for an ARM target, booted it under QEMU, and understood which generated directories are safe to ship. Later parts add your own packages, a BR2_EXTERNAL tree, kernel and bootloader integration, and reproducible image output. If the choice between build systems is still open, our earlier Yocto vs Buildroot comparison covers it; this series assumes the decision is made. What you need A Linux host, several gigabytes of free disk space, and a network connection. No development board is needed for this part; QEMU stands in for the hardware. On a Debian or Ubuntu host, this covers the mandatory packages the manual lists, plus the ncurses development files that menuconfig needs: raghu@techveda.org:~$ sudo apt install build-essential diffutils patch gzip bzip2 perl tar cpio unzip rsync file bc findutils gawk wget libncurses-dev One rule from the manual is worth stating plainly: build everything as a normal user. Buildroot never needs root, and running it as root exposes your host to any package that misbehaves during installation. The command above is the only one in this post that uses sudo . Getting Buildroot and choosing a target Download and unpack the current stable release — 2026.05.1 at the time of writing — from buildroot.org/downloads , and work from that directory. Buildroot ships ready-made configurations for many boards and emulated machines, one file each in configs/ , and make list-defconfigs

2026-08-23 原文 →
AI 资讯

My Experience Running a Homelab on Oracle Cloud’s Free VPS

It’s been a while since I wrote a blog post. Recently, I decided to get back into writing and document something I’ve been playing around with: setting up a small homelab environment on an Oracle Cloud Free Tier VPS. As a software engineer, I’ve always been interested in what happens behind the scenes when an application moves from my laptop to an actual server. Things like networking, deployment, Linux, containers, firewalls, and DNS are all areas I’ve wanted to understand better through actual hands-on experience rather than just reading about them. The fact that I could do all of this on a free VPS made it even better. Why I Started This Experiment I initially set up an Oracle Cloud Free Tier VPS running Ubuntu with: 1 GB RAM 1 vCPU Ubuntu Linux A public IP address I wasn't planning to host anything serious on it. The main goal was simply to use it as a small playground where I could experiment with infrastructure and improve my Linux and system administration skills. Interestingly, the last time I regularly worked with a VPS was probably around seven years ago. Back then, a few friends and I used to rent servers and set up Call of Duty 4 multiplayer servers. We'd spend hours messing around with the server configuration and, of course, playing on it afterwards. Things have changed quite a bit since then. These days, I'm much more interested in software engineering, DevOps, infrastructure, and homelabbing. So I thought it would be fun to take a free VPS and see how much I could actually do with it. First Challenge: K3s on 1 GB of RAM One of the first things I wanted to try was K3s, the lightweight Kubernetes distribution. I wanted to get a basic Kubernetes environment running and use it to experiment with container orchestration. That plan didn't last very long. After installing K3s and starting the server, I noticed the memory usage climbing pretty quickly. With only 1 GB of RAM, there wasn't much room left for anything else. Once I started thinking about running

2026-08-23 原文 →
开发者

why some people use neovim

I'm use neovim in cli like in my home but im not use Ide before in my live my first try pc is arch linux and neovim So I think I'm the best person to ask what is special in neovim 1: is so lightweight use ram is just 50-20 mb ram 2: you can config anything in lua language 3: open into terminal ssh protocol edit in code into server 4: vim keybinding like Vim / Neovim Keybindings Cheat Sheet Navigation (Normal Mode) h / j / k / l : Move Left / Down / Up / Right w / b : Jump forward / backward by word e / ge : Jump to end of current / previous word 0 / ^ / $ : Go to start of line / first non-blank char / end of line gg / G : Go to first line / last line of file { / } : Jump to previous / next paragraph Ctrl + u / d : Scroll Half-page Up / Down Ctrl + b / f : Scroll Full-page Up / Down Editing & Insert Mode i / I : Insert before cursor / at start of line a / A : Append after cursor / at end of line o / O : Open new line below / above current line u : Undo Ctrl + r : Redo . : Repeat last editing command Cutting, Copying & Pasting x : Delete character under cursor dw : Delete word dd : Delete (cut) line d$ / D : Delete from cursor to end of line yy / Y : Yank (copy) line yw : Yank word p / P : Paste after / before cursor Search & Replace /pattern : Search forward for pattern ?pattern : Search backward for pattern n / N : Jump to next / previous match * / # : Search word under cursor forward / backward :%s/old/new/g : Replace all occurrences in file :%s/old/new/gc : Replace all occurrences with confirmation prompt Visual Mode v : Character-wise visual mode V : Line-wise visual mode Ctrl + v : Block-wise visual mode y : Yank selection d : Delete selection > / < : Indent / Outdent selection Text Objects (Inside / Around) ci" : Change inside quotes ( "..." ) ca" : Change around quotes (includes quotes) di( : Delete inside parentheses da( : Delete around parentheses yi{ : Yank inside curly braces Buffers, Windows & Tabs :w : Save file :q : Quit buffer :wq / :x : Save and quit

2026-08-23 原文 →
AI 资讯

I Could Measure Claude and Codex Usage. I Still Couldn't Honestly Assign It to a Task.

Once you use Claude Code or Codex for real work, a total usage number stops being enough. You want to know which change consumed it. I did not build agent-cost because I had missed the existing token and cost trackers. I knew about multi-agent reporting CLIs, local dashboards, and OpenTelemetry-style observability stacks. I had even built a similar view in Notion before. The problem appeared when I tried to use that kind of reporting in an operational workflow. I needed agent logs to stay on the machine. I wanted a small runtime dependency surface, custom metrics I could audit, and a machine-readable result that another tool could consume. Most importantly, I needed session measurement and task attribution to remain two different claims. I did not need another universal dashboard. I needed a boundary underneath the dashboard that could answer: is this number supported well enough to enter task accounting? A measurement layer below the UI Different tools optimize for different jobs. A broad CLI such as ccusage is useful when coverage across agents matters. Local interfaces such as token-tracker or AgentMeter are a better fit for visual exploration of projects, sessions, subagents, and tools. An OpenTelemetry stack is the natural choice for fleet-level metrics, logs, and traces. Those are not inferior versions of agent-cost . They serve different use cases and trust models. The layer I wanted looked like this: local observations -> auditable normalized facts -> explicit pricing status -> caller-selected sessions -> task-attribution policy -> optional dashboard / Notion / spec-lane agent-cost reads logs that Claude Code and Codex CLI have already written locally. It normalizes each usage event into a fact with a model, token kind, timestamp, and count. At runtime it makes no network calls and declares no Python runtime dependencies. Its price catalog has a version and SHA-256 digest, both carried into machine-readable output. That “zero-network” claim is deliberately l

2026-08-23 原文 →
AI 资讯

Building a 9-Language Fan Site with Next.js 15 and next-intl (No Middleware)

I recently built a multilingual fan site for The Duskbloods , an upcoming FromSoftware game. The challenge: 9 languages (English, Japanese, Korean, Chinese, Spanish, French, German, Italian, Portuguese), static generation , and no middleware — all deployed on Cloudflare Workers. Here's how I did it and what I learned. The Architecture The site uses Next.js 15 App Router with next-intl v4 for internationalization. The key constraint: I wanted to avoid middleware to keep Cloudflare Worker costs down. src/ ├── app/ │ ├── (root)/ # English at / │ │ ├── gameplay/ │ │ ├── characters/ │ │ └── ... │ └── [locale]/ # Other languages at /zh, /ja, /ko... │ ├── gameplay/ │ ├── characters/ │ └── ... ├── messages/ # Translation files │ ├── en.json │ ├── ja.json │ ├── zh.json │ └── ... └── components/ # Shared components └── views/ Route Groups for Language Separation Instead of using middleware to detect locale, I use route groups : (root) — English content at the root path / [locale] — Other languages at /zh , /ja , /ko , etc. This means English gets clean URLs ( /gameplay ) while other languages get prefixed URLs ( /zh/gameplay ). Good for SEO — English is the default, and other languages have clear URL signals. Why No Middleware? Cloudflare Workers charge per request. Middleware runs on every request. For a static site with 9 languages, that's 9x the middleware invocations for every page load. By handling locale in the route, I skip middleware entirely. // src/app/[locale]/layout.tsx export async function generateStaticParams () { return [ ' ja ' , ' zh ' , ' ko ' , ' es ' , ' fr ' , ' de ' , ' it ' , ' pt ' ]. map ( locale => ({ locale })); } This pre-generates all locale variants at build time. Zero runtime locale detection. The Translation System Message Files Each locale has a JSON message file: // src/messages/zh.json { "gameplay" : { "intro" : { "eyebrow" : "玩法介绍" , "title" : "游戏机制" , "lead" : "深入了黄昏征讨的核心机制。" }, "virtue" : { "title" : "美德" , "types" : [ { "title" : "讨伐之美德

2026-08-22 原文 →
AI 资讯

Tailscale Kernel TUN in Unprivileged LXC: Direct SSH Without Userspace Networking

tailscale up --tun=userspace-networking gets you a green dot in the admin console and almost nothing else. The node appears in your tailnet, tailscale status looks healthy, and then you try to SSH into that container from your laptop and the connection hangs until TCP gives up. Two lines in the LXC config file fix it, and the container stays unprivileged. That's the whole post, really. But those two lines only make sense once you understand why every guide pushes you toward userspace mode in the first place, and what you're giving up by staying there. Who should care Anyone running services in unprivileged LXC containers on Proxmox who wants those containers to be real tailnet members with their own 100.64.0.0/10 address. Not reachable through something else. Reachable directly, over WireGuard, with a kernel network interface that ip addr can see. If you're already routing everything through a subnet router, you have a working setup and this is an optional upgrade. I covered that pattern in Tailscale Subnet Routers . Treat this as the next rung on the ladder: instead of one node advertising routes on behalf of everyone else, each container carries its own identity, its own ACL surface, and its own direct path to peers. What userspace networking actually costs you Every LXC-and-Tailscale guide I've read lands on the same instruction: pass --tun=userspace-networking and move on. It works because it sidesteps the problem entirely. Rather than asking the kernel for a TUN device, tailscaled runs a userspace TCP/IP stack (gVisor's netstack) inside its own process and never opens /dev/net/tun . Those costs stay invisible until you trip over one. Outbound traffic needs a proxy. In userspace mode, tailscaled exposes SOCKS5 and HTTP proxies on a local port. Nothing on the system routes to 100.64.0.0/10 automatically, because there is no interface and no route. Every client has to be told about the proxy: # userspace mode: this is the only way out export ALL_PROXY = socks5://l

2026-08-22 原文 →
AI 资讯

How AI Models Can Leak the Data They Were Trained On

There is a comforting story about how AI models handle the enormous quantities of text and images they are trained on: they do not store any of it, they merely learn general patterns, and once training is done the original data is gone in any meaningful sense. It is a reassuring account, and it is not quite true. Large models memorise fragments of their training data — verbatim, recoverable fragments — and a decade of research has produced reliable ways to detect and extract them. The answer-first version: if your data was in a model’s training set, the model may have memorised identifiable pieces of it, and those pieces can leak. Two families of attack make this concrete. Membership inference works out whether a specific record was in the training data at all. Data extraction pulls memorised content back out word-for-word. Neither is exotic; both are well documented against production systems. This is the mechanism underneath both the newspaper lawsuits alleging near-verbatim reproduction of their articles and the quieter privacy research showing that models leak the people in their training sets. Understanding it is the difference between trusting the comforting story and knowing its limits. Memorisation is a feature of the maths, not a bug Start with why models memorise at all. A large neural network has an enormous number of parameters — enough capacity to do more than compress general patterns. During training it is rewarded for predicting its training data accurately, and one very effective way to predict a specific example accurately is to memorise it. For data that appears once in an unusual form, or many times in an identical form, memorisation is often the path of least resistance for the optimiser. This is measurable. Researchers can show that a model assigns systematically higher confidence, and lower prediction error, to examples it was trained on than to otherwise-similar examples it has never seen. The size of that gap grows with the size of the model

2026-08-22 原文 →
AI 资讯

is-agentic Scored Promptway 74. Here Is What I Changed

I ran npx is-agentic promptway.com and the report came back 74 out of 100 . Essential was 59 of 80. Recommended 12.6 of 20. A 2.4-point bonus. The label was "Ready with a few material gaps." Earlier this week I did the same work on my personal site and wrote it up there ( I fixed my site for agents by hand. Then Vercel shipped a scoreboard ). Promptway is the publication I want agents to cite, so I pointed the grader at this host next. We already shipped the eight-layer stack I described in Optimizing Your Site for AI Agents and LLMs : robots allowlist, sitemap, llms.txt, llms-full.txt, JSON-LD, feeds, article markdown siblings. The scoreboard still found holes. Most of them were ordinary web hygiene. A couple were "developer resources" checks that assume you are a SaaS. I fixed the first group and refused to fake the second. What 74 was made of is-agentic.com wraps Ora 's agent-readiness research. Essential checks share 80 points, recommended share 20, and a small bonus can add up to 5. Checks that do not apply get excluded. The methodology page is worth reading before you argue with a number. Reports cache for six hours, so a re-scan right after a deploy can lie to you. The CLI is the useful interface: npx is-agentic promptway.com npx is-agentic promptway.com --json It returns a stored report if one exists, or starts a scan and waits. --json is the shape an agent wants. The failures that mattered on this site, in the order the report ranked them: Agent-friendly 404s. HTTP 404 already, but the body was a styled dead end. Partial credit until the 404 points at llms.txt, the sitemap, and a next step. Content without JavaScript. The homepage had an H1 and enough characters. The outline was flat, because the only nested headings lived inside card links, which the grader did not count. Markdown content negotiation. Accept: text/markdown returned text/html . Vary had the Next.js RSC list and no Accept . Failed. Developer resource discoverability. An agent searched for "p

2026-08-22 原文 →
AI 资讯

Four places ffmpeg.wasm fails silently in a Next.js app (and the fixes)

I shipped four browser-only video tools with ffmpeg.wasm: trim, compress, video-to-GIF and MP3 extraction. Files never leave the browser, nothing to install. Trim · Compress · GIF · MP3 (Korean UI, but the buttons are obvious) Getting there, I hit four walls. Every one of them surfaced as a single "conversion failed" line in the UI and nothing in the console . Writing them down for the next person. Stack: Next.js App Router + webpack, @ffmpeg/ffmpeg 0.12, self-hosted core. 1. webpack hijacks the dynamic import inside the worker @ffmpeg/ffmpeg spawns its worker like this: new Worker ( new URL ( " ./worker.js " , import . meta . url ), { type : " module " }); webpack recognises the pattern and bundles the worker. Fine. But it also rewrites the import(coreURL) inside that worker to go through its own module loader. The core URL arrives at runtime as a blob: URL, which webpack's loader has never heard of, so it dies with Cannot find module 'blob:...' . The error is thrown inside the worker, so the main-thread console stays empty. Fix: keep the worker out of the bundle. Copy node_modules/@ffmpeg/ffmpeg/dist/esm/worker.js to public/ffmpeg/<version>/lib/ and pass it via classWorkerURL in load() . Now the untouched worker runs. 2. classWorkerURL needs the origin Passing a path like /ffmpeg/0.12.x/lib/worker.js is not enough. The library resolves it with new URL(classWorkerURL, import.meta.url) , and inside the bundle import.meta.url is a build-time file:///C:/... path. So it goes looking for file:///C:/ffmpeg/... and fails. const BASE = `/ffmpeg/ ${ FFMPEG_VERSION } ` ; await ffmpeg . load ({ coreURL : ` ${ location . origin }${ BASE } /core/ffmpeg-core.js` , wasmURL : ` ${ location . origin }${ BASE } /core/ffmpeg-core.wasm` , classWorkerURL : ` ${ location . origin }${ BASE } /lib/worker.js` , }); Prefix location.origin and it works. 3. You cannot build a GIF palette with -vf For decent GIF quality you run palettegen first and paletteuse second. Doing it in one pass needs

2026-08-22 原文 →