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

标签:#web

找到 2934 篇相关文章

开发者

How to Find What Is Filling Up Disk Space on a Linux Server

Disk full alerts at 2am? Learn the exact commands to find what's eating your Linux server's disk space and fix it fast. You get the alert: disk usage at 94%. Your app starts throwing errors, logs stop writing, and databases refuse to accept new rows. Finding the culprit fast matters — but on a server with millions of files, knowing where to look is half the battle. Here's a systematic approach to track down disk hogs in minutes, not hours. Start With the Big Picture: df Before you dig into directories, confirm which filesystem is actually full. Run: df -h — shows all mounted filesystems with human-readable sizes df -h / — focus on the root filesystem df -i — check inode usage (a filesystem can be 'full' even with free space if inodes are exhausted) Pay attention to the 'Use%' column. If you see 100% on /var or /home but not /, that tells you exactly which mount point to investigate. Inode exhaustion — df -i showing 100% — is easy to miss and causes the same symptoms as a full disk, so always check both. Drill Down With du Once you know which mount point is full, use du to find the largest directories. Start from the top of that mount point and work down: du -sh /* 2>/dev/null — sizes of every top-level directory, errors suppressed du -sh /var/* 2>/dev/null — drill into /var if that's the culprit du -ah /var | sort -rh | head -20 — list the 20 largest files and folders inside /var The pattern is always the same: run du -sh on the suspicious directory, find the largest subdirectory, repeat one level deeper. You'll usually hit the real culprit within three or four iterations. Common offenders are /var/log (runaway logs), /var/lib/docker (unused images and volumes), and /tmp (applications that don't clean up after themselves). Find Large Files Directly With find Sometimes a single enormous file is the problem — a core dump, a forgotten database export, or a log that rotated incorrectly. Use find to surface files above a size threshold: find / -xdev -size +500M -ls 2>/de

2026-09-04 原文 →
AI 资讯

uilding a Preview-First Background Noise Remover for Audio and Video

A background noise removal workflow is easy to describe and much harder to make trustworthy. The superficial version is: upload a file, run processing, download the result. The harder version is product design: what does a person need to know before committing to a result, paying for an export, or spending a limited processing allowance? A preview-first workflow answers that question by making uncertainty a first-class part of the system. Instead of asking people to trust a long-running operation, it gives them a bounded way to hear a representative outcome before they choose what happens next. This article lays out the design principles behind that approach for stored audio or video uploads. It is not a call-time or capture-time filter. The central workflow is: upload → compatibility check → preview → same segment before/after → export choice That sequence looks simple, but each boundary carries product and engineering consequences. Start with a decision, not a processing feature A preview should help a user make one specific decision: “Is this result useful enough for me to continue?” That framing prevents a common mistake: treating a preview as a small free version of the full product. A useful preview is not merely a shorter job. It needs to be comparable, understandable, and tied to the next action. For background noise removal, the most defensible comparison is a matched segment: The source and processed audio use the same time range. Playback controls make the comparison obvious. The user can choose whether to continue only after hearing that bounded example. If the before and after samples use different moments, the product is asking the user to infer too much. A quieter section in one clip can appear better even when the processing change was minor. Matching the segment removes that ambiguity and keeps the decision grounded in what the user actually heard. Put compatibility before expectation Compatibility belongs near the beginning of the workflow, before

2026-09-04 原文 →
AI 资讯

Twenty Years of jQuery: How a Little Library Rewired Web Development

jQuery, created by John Resig and released in 2006, is a JavaScript library that simplifies HTML manipulation, event handling, animation, and Ajax. It enabled easier web development by providing an accessible API across browsers. While its use has declined with the rise of modern frameworks, jQuery remains prevalent on a significant portion of websites today. By Daniel Curtis

2026-09-04 原文 →
AI 资讯

Protótipos: como a herança realmente funciona no JavaScript

Introdução Muitas linguagens como C#, Java, entre outras são descritas como orientadas a objeto, possibilitando o paradigma Programação Orientada a Objeto (POO). No entanto, quando falamos de JS, sabemos que por mais que existam objetos, ela é dita como uma linguagem orientada a protótipos, mas o que de fato isso significa, qual problema isso resolve e como muda a maneira como programamos? O problema Tanto a orientação a objeto quanto a orientação a protótipo lidam, entre outras coisas, com a questão de como a herança vai funcionar em determinada linguagem e é justamente nesse ponto que as duas abordagens mais se diferem. Em linguagens orientadas a objetos as classes de fato existem, contendo propriedades, métodos e servem como molde para a criação de objetos. Com isso, todo objeto criado a partir de uma classe herda suas propriedades e métodos ficando acessíveis para uso. Como não existem Classes de fato em JavaScript, a herança ocorre de maneira diferente, de objeto para objeto, ligados através da propriedade [[Prototype]] que possui uma referência ao seu protótipo, fazendo com que determinado objeto herde de seu protótipo propriedades e métodos que nunca foram definidos nele. Exemplo com array Quando criamos um array, seja de forma literal com [], ou de forma explícita com new Array(), o resultado final é o mesmo: um array cujo [[Prototype]] aponta para o Array.prototype. Essa propriedade .prototype possui um objeto contendo todas as propriedades e métodos que o [[Prototype]] referencia, possibilitando que todos os arrays possam usar métodos como push, pop, map, filter… Com isso, se irmos além e conferirmos o [[Prototype]] do Array.prototype vamos perceber que ele aponta para o Object.prototype que contém propriedades e métodos também disponível em todo essa cadeia que chamamos de prototype chain . Por fim, se tentarmos visualizar o protótipo do Object.prototype veremos que é null, pois ele representa o último elo dessa cadeia. Teste o código abaixo para ver na p

2026-09-04 原文 →
AI 资讯

I pulled Roblox's public API every day for a week to watch one game go vertical

Late August I kept seeing the name Dungeon Lootr in places it hadn't been before. I wanted to know whether the game was actually growing or whether I was just noticing it more. Turns out Roblox exposes enough public data to answer that without an API key, so I started pulling it every day. The endpoint is boring in the best way: curl "https://games.roblox.com/v1/games?universeIds=9656201728" You get back visits , playing , favoritedCount , updated and a few other fields. A second call to /v1/games/votes?universeIds=... gives you up and down votes. No auth, no rate-limit drama at once-a-day volume. Here is what a week of that looks like for this one game: Date Total visits Playing right now Favorites Approval Sep 2 4.83M — 25.5k 96% Sep 3 5.39M 10.8k 29.8k 96.1% Sep 4 6.85M 11.4k 38.6k 96.1% That is about 1.4 million more visits than when I checked yesterday, and favorites jumped by almost nine thousand. The updated timestamp moved twice in two days (Sep 2 23:06 UTC and Sep 4 00:56 UTC), so the developers are shipping while the curve is climbing rather than sitting on it. The part that surprised me: the game was created on January 31, 2026. It sat there for seven months doing nothing visible, then flipped in the last week of August. I do not have a clean explanation. No single creator video I can point to, no front-page placement I noticed. It just started compounding. I wrapped the two calls into a tiny CLI so I would stop retyping the universe ID: https://github.com/jackzhouqd/roblox-game-stats — plain Python, no dependencies. Point it at any universe ID and it prints the same table. A few caveats before anyone reads too much into this: visits is cumulative and not deduplicated. It counts sessions, not people. playing is a snapshot at the moment you call it. Hit it at 3am and you will get a different number than at 8pm. One day of movement means nothing on its own. A week of movement in the same direction is when I start paying attention. What I am doing with it: I

2026-09-04 原文 →
开发者

I built a browser game that asks your microphone to imitate a robot

I wanted a microphone project with a very small brief: hear a sound, copy it, and see how close you got. That became Mimic Party Online , a browser game where each round gives you a short sound cue and one recording attempt. The cue might be a meme clip, an animal call, a machine noise, or something that is hard to describe without making the sound yourself. It looks like a toy, and it is. It also turned into a useful little audio problem. A score based only on volume would be boring, so the game needs to compare the shape of two sounds while staying fast enough to run in a browser. The round is intentionally simple The player does five things: Choose a sound pack. Listen to the reference. Record one take. Listen to the take. Read the score. The replay is important. People tend to remember the sound they meant to make. The recording tells them what actually came out. A convincing robot alarm can turn into a tired bicycle horn pretty quickly. Quick mode runs for four rounds. Survival mode gives the player three Mic lives and keeps the run going until those lives are gone. The game also has different routes, so a player can protect a streak or accept a shorter recording window for more points. The browser does the audio work The recording stays in the browser. The game uses the microphone stream, converts the take to mono PCM at 16 kHz, and extracts the values needed for scoring. The audio does not travel to a scoring server. For each take, the extractor looks at signals such as: pitch contour timing and active duration attack and energy rhythm and onset positions spectral shape The game does not use every signal for every sound. A pitched cue cares more about contour, while a machine noise depends more on its shape and attack. A rhythmic sound needs the hits to arrive at roughly the right moments. This is also why the score is more useful when it has labels. A result of 68 is not very instructive by itself. "Timing: 74" gives you something to work on in the next atte

2026-09-04 原文 →
AI 资讯

Safely parsing email files in the browser

An email file is not just text plus a few attachments. It can contain HTML, nested MIME parts, misleading filenames, inline resources, remote tracking pixels, malformed encodings, and enough data to exhaust a browser tab. Moving parsing into the browser removes an upload from the architecture, but it does not automatically make the viewer safe. It changes the security job: untrusted content is now being interpreted next to the user’s active web session. This is the checklist I use for a local EML and winmail.dat/TNEF reader. Treat every parsed field as untrusted The sender, subject, recipient, filename, MIME type, and message body all came from a file. Render headers and filenames as text, never by concatenating HTML. The same applies to errors. A parser exception can include a filename or fragment of malformed input. Showing that message verbatim may leak data into logs or turn it into markup. Map parser failures to stable error categories, then display a controlled explanation. Normalize into one internal model EML and TNEF have different container structures, but the UI should not contain two independent security implementations. Both parsers can produce a common message model: subject, sender, to, cc, date, plain body, sanitized HTML candidate, attachments[] { safe filename, MIME type, bytes, inline flag, content ID, content location } The normalization layer is the right place to enforce per-source limits and reject unsupported structures. The viewer and download code then work against the same constrained data regardless of input format. Sanitize HTML as hostile input Email HTML was designed for mail clients, not for direct insertion into an application DOM. A conservative policy removes: scripts and event handlers; forms and interactive controls; iframe , object , and embed elements; styles and CSS URLs; unsafe protocols; executable or unexpected embedded content. Use a maintained sanitizer with a pinned version, but do not stop at its default configuration.

2026-09-04 原文 →
AI 资讯

Cross-Chain Bridge Risk Assessment: Hyperliquid Bridge

Cross-Chain Bridge Risk Assessment: Hyperliquid Bridge Target Protocol : Hyperliquid Bridge (TVL: $6572.1M) Hyperliquid Bridge – Cross‑Chain Bridge Risk Assessment Date: 3 September 2026 Prepared by: [Your Name] – Senior DeFi Security Researcher & Smart‑Contract Auditor 1. Executive Summary Hyperliquid Bridge is a high‑value, permissioned cross‑chain bridge that enables the transfer of ERC‑20, ERC‑721 and custom “Hyper‑Tokens” between Ethereum L1 and a suite of L2 roll‑ups (Optimism, Arbitrum, zkSync, StarkNet). As of the latest snapshot, the bridge holds ≈ $6.57 B in total value locked (TVL) across its liquidity pools and custodial vaults, making it one of the most capital‑intensive bridges in the ecosystem. Our assessment focuses on the on‑chain smart‑contract layer , the off‑chain validator/guardian infrastructure , and the governance/upgrade mechanisms that together enforce the bridge’s security guarantees. The analysis draws on publicly available contract code (verified on Etherscan), the bridge’s technical white‑paper, audit reports from Q3 2024, and a series of targeted static‑ and dynamic‑analysis tests performed on a forked mainnet environment. Key Findings Category Severity Summary Validator/Guardian Collusion Critical The bridge relies on a 7‑of‑11 multi‑signature (M‑of‑N) guardian set that is partially centralized (4 of 11 are operated by a single entity). A coordinated compromise of these keys can authorize arbitrary asset releases. Smart‑Contract Re‑entrancy & State‑Machine Bugs High The BridgeRouter contract contains a legacy call.value pattern in the releaseTokens path that can be re‑entered via a malicious ERC‑777 token, potentially allowing double‑spend of the same proof. Insufficient Proof Verification High The Merkle‑Proof verification logic does not enforce a strict monotonicity check on the nonce field, opening the door to replay attacks on older proofs if the bridge’s state is rolled back (e.g., after a chain reorg). Upgradeability via Proxy M

2026-09-04 原文 →
AI 资讯

GPT-6 Astra Costs 2.5x More Than GPT-5.6 Sol and Scores About the Same

Book: AI That Ships The series: AI in TypeScript — 5 books, from your first LLM call to agents in production — all five here My project: Hermes IDE | GitHub — an IDE for developers who ship with Claude Code and other AI coding tools Me: xgabriel.com | GitHub A new model lands. Someone on your team opens a pull request that changes one string in one config file, the model id. The diff is green in five minutes. Evals look fine, maybe a point better on the suite you happen to have. It ships. Three weeks later the invoice arrives and it is a different shape than the one before it. Nobody wrote a bad loop. Nobody shipped a prompt-injection. The system does exactly what it did last month. It just costs more to do it, because a one-line diff moved every request from $2 and $10 per million tokens to $10 and $50. OpenAI announced GPT-6 Astra on 3 September 2026. OpenAI calls it the most capable model it has shipped. That is the company's claim and I am not going to argue with it. But "most capable model available" and "the model your service should call by default" are two different questions, and the distance between them shows up on your infrastructure bill. What the launch numbers say The API list price at launch, per OpenAI: Standard tier: $10 per 1M input tokens, $50 per 1M output tokens Fast tier: $20 per 1M input tokens, $100 per 1M output tokens Astra takes text and image input and returns text only, with a 1M token context window. It went first to a limited set of organisations under OpenAI's Daybreak Access programme, with wider access to the paid ChatGPT tiers and the API announced as planned for the days after launch. It is also listed on AWS Bedrock and Microsoft Azure. Now the third-party read. Artificial Analysis runs its own evaluations independently of the vendors. On its Intelligence Index, Astra scores 60 , which puts it #14 of the 202 models the site tracks. Its cost per Intelligence Index task comes out at $0.96 . The median model in that set scores 36 a

2026-09-04 原文 →
AI 资讯

Why `zarazhangrui/follow-builders` Is Trending on GitHub

zarazhangrui/follow-builders is gaining attention for a simple reason: it focuses on the people building AI systems, not just the influencers discussing them. With 84 new stars today, the project is positioned as an AI builders digest that monitors notable creators across X and YouTube podcasts, then remixes their ideas into shorter, easier-to-scan summaries. That workflow addresses a real productivity problem. AI research and engineering conversations are scattered across long videos, fast-moving social feeds, and repeated announcements. A focused digest can reduce the time spent collecting links while preserving the practical signal: architectural decisions, implementation lessons, tools, and emerging patterns. A sensible first step is to inspect the repository locally before deciding how deeply it fits your workflow: git clone https://github.com/zarazhangrui/follow-builders.git cd follow-builders # Inspect the setup instructions and available scripts ls -la find . -maxdepth 2 -type f | sort | head -80 For an AI-assisted workflow, I would pair the project with a small review loop: Collect the generated digest. Extract claims, links, and mentioned tools. Open the original source before acting on important technical advice. Save durable findings in a project notes file or knowledge base. This keeps summaries useful without treating them as authoritative research. It also makes the tool a good companion for developers using Cursor or another AI IDE: the digest supplies discovery, while the IDE helps turn validated ideas into experiments and code. Before production use, watch for two trade-offs: Summary fidelity: compressed content can lose context, caveats, or disagreements from the original conversation. Source coverage: ranking “top builders” may introduce selection bias, so important perspectives can be missed. The strongest use case is not replacing primary sources. It is building a high-signal starting queue for developers who want to follow AI progress without

2026-09-04 原文 →
AI 资讯

LLMs Don't Have to Generate One Token at a Time: How Medusa and Multi-Token Prediction Cheat Autoregression

Hello, I'm Shrijith Venkatramana, and I'm building LiveReview — a blast-radius aware AI code review built for your business-critical systems. Star us to help devs discover the project, give it a try, and share your feedback to help improve the product. A modern LLM can contain hundreds of billions of parameters, run on extremely expensive accelerators, and still spend most of its inference time doing something that looks embarrassingly sequential: token 1 -> token 2 -> token 3 -> token 4 -> token 5 -> ... That is the awkward part of autoregressive generation. The model may process a whole prompt in parallel during the initial prefill, but once generation starts, the next token depends on the previous token. So generating 100 tokens looks conceptually like running the model 100 times. And for many serving workloads, that is exactly where the money goes. A family of techniques tries to break this bottleneck by asking a deceptively simple question: What if the model could predict several future tokens at once, then verify them in parallel? That idea leads to speculative decoding, Medusa-style multiple decoding heads, and the broader multi-token prediction approach used during training. The interesting part is that these are not merely "optimization tricks." They change the computational structure of decoding. This article develops that idea from first principles and then gets into the engineering details. 1. The problem: your GPU is doing an expensive sequential loop Consider ordinary autoregressive decoding. Given a prompt: The capital of France is the model predicts: Paris Then it feeds the new sequence back through the model: The capital of France is Paris and predicts the next token. Then again: The capital of France is Paris . and so on. Formally, the model factorizes the probability of a sequence as: P(x1, x2, ..., xT) = product over t of P(xt | x1, ..., x(t-1)) That conditional dependence is what makes language modeling so useful. It is also what makes decoding

2026-09-04 原文 →
AI 资讯

AI Code Tools for Legacy System Modernization (2026 Guide)

Originally published at nlocoding.com 92%of IT leaders say legacy systems slow digital transformation (IBM, 2026) Every minute, a bank somewhere spends $1,200 just keeping 1970s code alive. Not replacing it, just making sure it doesn’t explode. A senior developer at Citi told McKinsey in January 2026: “We spend 53% of our engineering budget patching COBOL.” Legacy code isn’t a quirky artifact anymore. It’s a financial anchor chained to your cloud ambitions... Why AI Code Tools for Legacy System Modernization Matter in 2026 AI code tools have redefined how companies approach system upgrades. In 2026, 61% of modernization projects fail due to manual errors or missed dependencies (Gartner, 2026). You can’t afford human error when one typo in ancient assembler code can cost $500,000 in downtime. The rise of generative AI for code refactoring is the only thing standing between you and a multi-million dollar rewrite. AI Code Tools Are Slashing Modernization Timelines by 63% AI code tools for legacy system modernization have cut modernization project timelines by 63% on average (Accenture, 2026). Manual migration can take 18 months—AI-powered tools like IBM watsonx Code Assistant and Google Gemini Advanced do it in under 7 months. This isn’t a hypothetical. Banco do Brasil migrated 2.8 million lines of COBOL to Java in 2025 with Cognizant’s AI tool; downtime: 14 hours. Average cost per line dropped from $3.60 (human) to $1.15 (AI-assisted). 💡 Pro Tip: Start with small pilot modules (1000-5000 lines). Measure defect rates before scaling. AI-Assisted Code Understanding Reduces Failure Rates Code comprehension is the single biggest risk in legacy system modernization. 47% of failures in 2026 were due to “unknown dependencies” (Forrester, 2026). AI code tools now map data flows, detect dead code, and generate architectural diagrams from raw source. Microsoft’s Copilot for Azure can parse 1.5 million lines in two days and flag 96% of “code rot” blocks. One insurance company in

2026-09-04 原文 →
AI 资讯

Refactoring Safely: A Step-by-Step Guide

Refactoring Safely: A Step-by-Step Guide We all know that feeling: a function that's 200 lines long, a class that does too many things, or a variable named data2 . Refactoring is the cure, but doing it recklessly can break your app and your confidence. Here's how I approach refactoring safely, step by step. 1. Start with a Safety Net Before touching any code, make sure you have tests. If your project lacks tests, write a few key ones first. Focus on the behavior you're about to change. The goal is to have a safety net that tells you when you've broken something. # example test for a function we'll refactor import unittest from mymodule import calculate_total class TestCalculateTotal ( unittest . TestCase ): def test_with_discount ( self ): self . assertEqual ( calculate_total ( 100 , discount = 0.1 ), 90 ) If tests aren't feasible, at least have a manual checklist. But automated tests are worth the effort. 2. Make Small, Atomic Changes Don't try to refactor everything at once. Pick one logical change. For instance, extract a method or rename a variable. Each change should be small enough that if it breaks, you know exactly what caused it. // before function processOrder ( order ) { const total = order . items . reduce (( sum , item ) => sum + item . price , 0 ); const tax = total * 0.08 ; const final = total + tax ; return final ; } // after step 1: extract tax calculation function processOrder ( order ) { const total = order . items . reduce (( sum , item ) => sum + item . price , 0 ); const final = total + calculateTax ( total ); return final ; } function calculateTax ( amount ) { return amount * 0.08 ; } Run your tests after each tiny step. If they pass, move on. If they fail, you know the last change caused it. 3. Use Your IDE's Refactoring Tools Modern IDEs can rename variables, extract methods, and change signatures safely. They update all references automatically. This reduces human error. For example, in VS Code, right-click a function and choose "Extract to

2026-09-04 原文 →
AI 资讯

`sponsors/ibelick`: A Practical Look at Skills for Design Engineers

Design engineers increasingly work across two systems: the visual language of a product and the implementation details that make it usable. Skills for Design Engineers from ibelick focuses on that overlap, packaging practical guidance for building interfaces with stronger visual quality, clearer interaction patterns, and more consistent engineering decisions. The project is attracting attention, with +46 stars today . That momentum makes sense: design-focused AI workflows are moving quickly, but many generated interfaces still need human judgment around spacing, typography, responsive behavior, accessibility, and component reuse. The useful way to approach this project is not as a drop-in framework. Treat it as a reference layer for your development workflow. Read the relevant skill instructions, adapt them to your stack, and keep the resulting guidance close to the codebase so it can be applied consistently during implementation and review. A lightweight local setup might look like this: mkdir -p .ai/skills/design-engineering curl -L https://github.com/sponsors/ibelick \ -o .ai/skills/design-engineering/reference.html For a real team workflow, I would convert the useful parts into a checked-in Markdown file: .ai/ └── skills/ └── design-engineering/ ├── interface-quality.md ├── responsive-layouts.md └── review-checklist.md This keeps the process portable across editors and AI assistants instead of tying it to one tool. It also makes design decisions reviewable in pull requests, which is more valuable than keeping them inside an undocumented prompt. Before using the approach in production, watch for: Context drift: generic design guidance can conflict with an existing design system, so define project-specific tokens and component rules first. AI overconfidence: generated UI still requires manual checks for accessibility, keyboard navigation, mobile behavior, and performance. The strongest ROI comes from using these skills as repeatable engineering standards—not as a

2026-09-03 原文 →
AI 资讯

Dogfood 2026: Build the Platform That Will Judge You

Most hackathons ask you to build whatever you want. Dogfood 2026 does the opposite. Everyone builds the same thing: a submission and judging platform for hackathons. The challenge is simple: Build the platform that will judge you. And there is a reason this is more interesting than it sounds. Hackathon Raptors has run 35 hackathons across 85+ countries since 2023. They have seen the same problems appear again and again: registrations, teams, submissions, judge assignments, scoring, normalization, results, certificates, and exports all becoming separate pieces of an increasingly messy workflow. Now they want to build the platform they actually wish they had. That is what Dogfood is about. About the Hackathon Dogfood 2026 is a 72-hour online hackathon organized by Hackathon Raptors . The event runs from September 25 to September 28, 2026 . At a glance 🌍 Online and global ⏳ 72 hours 💰 $2,500 prize pool 👥 Solo or teams of up to 4 💸 Free to participate 🔓 Open source 🐳 Self-hosted 🛠️ Build with the stack of your choice But this is not a normal platform-building challenge. The winning project is intended to be forked, self-hosted, and used for actual Hackathon Raptors events. So instead of building a demo that gets abandoned after the weekend, you are building something that could become real infrastructure. Why Build Another Hackathon Platform? Hackathon platforms already have most of the features organizers expect. Registration. Team formation. Project submissions. Public galleries. Judge scoring. Community voting. Organizer dashboards. CSV exports. So what is missing? The difficult part is not building another CRUD application. The difficult part is making the entire system reliable when real people start using it. Consider judging. Two judges can look at the same project and give completely different scores. One might give almost everything a 4 or 5. Another might rarely give anything above a 3. Simply averaging those scores can produce a ranking that reflects the judg

2026-09-03 原文 →
AI 资讯

How to Handle Anti-Bot Measures When Taking Screenshots Programmatically

How to Handle Anti-Bot Measures When Taking Screenshots Programmatically You send a request. The page loads. The screenshot comes back blank, or shows a CAPTCHA, or captures a "Please verify you're human" wall. This is one of the most common problems when building any screenshot pipeline. Here's what's actually happening and how to deal with it. Why headless browsers get flagged Bot detection works by looking for patterns that differ from real users. Headless Chrome has several tells: navigator.webdriver returns true by default Missing Chrome-specific properties like window.chrome Inconsistent screen dimensions (no monitor attached means no GPU info) Mouse events fire at pixel-perfect coordinates with no jitter Font fingerprints differ from headed browsers Modern detection services (Cloudflare, Akamai, Datadome) look for combinations of these signals, not individual flags. Spoofing one without the others often makes the fingerprint more suspicious, not less. The practical spectrum of detection Most sites fall into one of three categories: No active detection — a basic bot check via User-Agent string at most. Simple fix: set a realistic UA. Passive fingerprinting — loads a detection script, collects signals, blocks on second or third visit. You'll see this on news sites, e-commerce, media platforms. Active challenges — Cloudflare Turnstile, hCaptcha, reCAPTCHA v3 score-based. These require real interaction or a solving service. Know which category your target falls into before spending time on it. Fixes that work for most cases 1. Use a stealth plugin For Playwright, playwright-extra with puppeteer-extra-plugin-stealth patches the most common fingerprinting vectors: npm install playwright-extra puppeteer-extra-plugin-stealth import { chromium } from 'playwright-extra'; import StealthPlugin from 'puppeteer-extra-plugin-stealth'; chromium.use(StealthPlugin()); const browser = await chromium.launch(); This handles navigator.webdriver , window.chrome , and several other

2026-09-03 原文 →
AI 资讯

I built a live webcam atlas with 7,000+ streams from 100+ countries — here's what watching the world taught me

Ever wondered what's happening right now on a beach in Mexico, in Red Square, or at a harbor in Norway? I run Cam-World — a free live webcam aggregator that pulls together 7,000+ public streams from 100+ countries into one searchable place. No registration, no paywall. Here's a tour of what's inside and a few things I learned along the way. 🗺 The world map is the product The heart of the site is a dark globe where every green dot is a live camera. Click a cluster, zoom into a city, open a stream — you never leave the map. Watching it for a while teaches you something: the planet has a rhythm. Webcams go online with the morning sun, and the "online" wave rolls west around the clock. 📊 Honest uptime — you can tell a dead cam from a live one Aggregators usually show you a thumbnail and pray. We check every camera automatically and show a statistics widget: the last 24 hours and 30 days as color-coded slots (online / outage / offline / no data) plus an uptime percentage. The lesson here: webcams are ephemeral. Streams die, hotels turn off cameras, storms break them. Honest stats became our most-loved feature — users check reliability before clicking play. 🔎 Search, cities, collections Search works by name, city, country and tags. There are dedicated hubs for countries and cities, and themed collections: beaches, traffic, mountains, northern lights. 🌙 Small things that matter Dark & light themes (night couch-travel vs daytime browsing), 20 interface languages, "Near me" sorting by distance, live online/offline badges on every card. Try it 🗺 World map — pick a dot, watch live 🔎 Search — find a place you love 🏠 Home feed — a rotating mix of live cameras It's free, works on mobile, and there's always something happening somewhere. What would you check first — a beach, a mountain, or your own hometown square? 👇

2026-09-03 原文 →
AI 资讯

Dynamic Rendering in Angular Is Easy. Trusting Dynamic UI Is Not.

Dynamic rendering in Angular sounds like a fairly narrow technical problem: “I don't know which component I need until runtime.” Angular already gives us several good tools for that. But there is a big difference between dynamically choosing a component and dynamically constructing an entire UI from a runtime specification. And that difference becomes especially important with Server-Driven UI and Generative UI. 1. ngComponentOutlet : when the problem is really just component selection For simple cases Angular already gives us: <ng-container *ngComponentOutlet= "componentType" /> This works very well when the application already knows its possible components and runtime logic only decides which one to display. componentType = condition ? UserCardComponent : AdminCardComponent ; The advantages are obvious: very little infrastructure, normal Angular lifecycle, AOT-compatible components and a relatively declarative template. But this approach starts becoming uncomfortable when the runtime input is no longer: UserCardComponent and instead becomes: { "type" : "Card" , "children" : [ { "type" : "Input" , "props" : { "label" : "Name" } } ] } Now we are no longer selecting a component. We are interpreting a UI description. 2. ViewContainerRef.createComponent() : more control, more responsibility Angular also allows components to be instantiated programmatically: const ref = viewContainerRef . createComponent ( componentType ); ref . setInput ( ' label ' , ' Name ' ); This is a powerful primitive. We control where the component is created, which component is used, how inputs are assigned and when the component is destroyed. For relatively contained dynamic behavior, this can be exactly what we need. But once a runtime specification controls many components, application code often starts evolving into something like: switch ( node . type ) { case ' input ' : ... case ' select ' : ... case ' button ' : ... case ' dialog ' : ... } Then we add input mapping. Then events. Then ne

2026-09-03 原文 →
AI 资讯

Deploying Next.js on a VPS: The 12 Things Nobody Tells You

Moving a Next.js app off Vercel and onto a plain Ubuntu VPS usually starts with a painful realization: either your serverless functions are timing out on background jobs, or your client just handed you a strict "you must host this on our infrastructure" requirement. Deploying the app itself is easy. What trips people up (and what cost me hours of debugging and locking myself out of my own server) is everything around the app. Here are the 12 things that actually break when you leave the serverless ecosystem, in the order you'll hit them. 1. Next.js needs a process manager, not just npm start Running npm start in a terminal dies the moment you disconnect. You need something that keeps the process alive, restarts it on crash, and survives a reboot. PM2 is the simplest option for a single-server Node deploy. npm install -g pm2 // ecosystem.config.js module . exports = { apps : [{ name : " my-app " , script : " node_modules/.bin/next " , args : " start " , cwd : " /var/www/my-app " , instances : 1 , exec_mode : " fork " , autorestart : true , max_memory_restart : " 512M " , env : { NODE_ENV : " production " , PORT : 3000 }, }], }; cd /var/www/my-app && pm2 start ecosystem.config.js pm2 save pm2 startup systemd -u YOUR_USER --hp /home/YOUR_USER That last line is the one people forget - without it, PM2's process list doesn't survive a server reboot. 2. Nginx needs to proxy to the port, not serve the files Next.js is not a static site (unless you've explicitly exported it as one). Nginx's job is to forward requests to the Node process, not serve files from disk: upstream nextjs_upstream { server 127.0.0.1 : 3000 ; keepalive 64 ; } server { listen 80 ; server_name example.com www.example.com ; location / { proxy_pass http://nextjs_upstream ; proxy_set_header Host $host ; proxy_set_header X-Real-IP $remote_addr ; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for ; proxy_set_header X-Forwarded-Proto $scheme ; # WebSocket support - required for HMR and any realtime f

2026-09-03 原文 →