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

标签:#webdev

找到 1518 篇相关文章

AI 资讯

React Compiler in 2026: What It Actually Memoizes (And What It Doesn't)

Headline: React Compiler — formerly React Forget — shipped stable with React 19 and automatically memoizes components, hooks, and callbacks by analyzing data flow at build time. No dependency arrays to write; the compiler infers them. Here is what it handles, when it opts out, and whether you should delete your useMemo calls. Key takeaways React Compiler inserts useMemo , useCallback , and React.memo automatically at build time — no dependency arrays to maintain. Enable it in Next.js 15/16 with experimental.reactCompiler: true in next.config.ts . The compiler is conservative: if it cannot prove memoization is safe, it emits the component unchanged. "use no memo" is the escape hatch for functions the compiler should not touch. Run npx react-compiler-healthcheck@latest before enabling to see coverage and violations. What does React Compiler actually do? React Compiler transforms component and hook code at build time to insert memoization automatically. Instead of useMemo(() => expensiveCalc(a, b), [a, b]) , the compiler analyzes data flow, determines which values are stable across renders, and emits equivalent memoized code. The compiled output uses React's memo infrastructure at runtime. The compiler is babel-plugin-react-compiler — it works with any Babel-based build pipeline. How do I enable it in Next.js? // next.config.ts const nextConfig = { experimental : { reactCompiler : true , }, }; export default nextConfig ; Before enabling, run the healthcheck: npx react-compiler-healthcheck@latest The healthcheck reports optimizable component count, files with violations, and blocking patterns. Fix violations first for more coverage on day one. What does the compiler memoize? Components — equivalent to React.memo ; re-renders only when props change. Values — equivalent to useMemo ; computed results, derived arrays, objects. Callbacks — equivalent to useCallback : event handlers, functions passed as props. Dependencies are inferred from escape analysis — n

2026-07-12 原文 →
AI 资讯

Partial Prerendering in Next.js: The Static Shell + Dynamic Stream Model

Headline: Partial Prerendering (PPR) in Next.js serves a static HTML shell from the CDN edge instantly, then streams Suspense-wrapped dynamic children from the origin in the same HTTP response. No full-page ISR staleness, no full-page origin latency. I shipped it on two production routes — here is the model. Key takeaways PPR serves a static HTML shell from the CDN edge , then streams dynamic Suspense children from the origin in the same response. The static shell is built at build time — outside <Suspense> renders statically; inside renders dynamically per request. PPR replaces the ISR vs. dynamic tradeoff for pages that are mostly static with isolated personalized sections. No changes to Server Components or Suspense — just experimental.ppr: 'incremental' in config and export const experimental_ppr = true per route. PPR and use cache are complementary : CDN delivery for the shell, origin memoization for dynamic islands. What does PPR actually do? PPR splits a page into two rendering phases within the same HTTP response. At build time, Next.js freezes everything that does not read dynamic request data into a static HTML shell on the CDN edge. At request time, the CDN delivers the shell at edge latency while the origin streams each <Suspense> boundary's content into the same response. On a product page: navigation, title, and description arrive at CDN speed. The in-stock badge and personalized recommendations stream from the origin a fraction of a second later. The user sees a nearly-complete page immediately. How is PPR different from ISR and streaming Suspense? Strategy First byte Dynamic freshness Staleness ISR (revalidate: N) CDN edge Whole page up to N seconds stale Full page Dynamic rendering Origin 100% fresh; waits for slowest query None Streaming Suspense (no PPR) Origin Fresh; TTFB includes origin latency None PPR CDN edge Dynamic islands 100% fresh Static shell only How do I enable PPR? // next.config.ts export default { experimental : { ppr : ' inc

2026-07-12 原文 →
AI 资讯

Migrating Off OpenAI: A Backend Engineer's Notes From Production

Check this out: migrating Off OpenAI: A Backend Engineer's Notes From Production I still remember the morning I opened our team's monthly invoice and nearly spilled cold brew on my mechanical keyboard. We were burning through OpenAI credits like it was nobody's business — specifically, north of $500/month for what amounted to a chat-completion endpoint and some embedding lookups. As the backend engineer who had inherited the LLM integration six months prior, I felt personally responsible. So I did what any self-respecting engineer does at 2 AM with too much caffeine: I benchmarked alternatives. What I found annoyed me. DeepSeek V4 Flash was sitting there at $0.25/M output tokens while GPT-4o charges $10.00/M. That's a 40× price difference for output that, in my blind tests, 80% of users couldn't distinguish. The $500/month bill could plausibly become $12.50. My CFO would weep tears of joy. This post is the migration journal I wish I'd had before I started. fwiw, I've already done the swap across three production services. Here's what worked, what didn't, and exactly how much coffee I drank. The Math That Made Me Pick Up a Keyboard Before I show you code, let's talk numbers — because if you're going to convince your team or your boss, you'll need a slide that fits on one screen. I pulled together the pricing for the models I actually considered routing traffic through. All figures are per million tokens, USD: Model Provider Input $/M Output $/M Relative to GPT-4o GPT-4o OpenAI $2.50 $10.00 1× (baseline) GPT-4o-mini OpenAI $0.15 $0.60 16.7× cheaper DeepSeek V4 Flash Global API $0.18 $0.25 40× cheaper Qwen3-32B Global API $0.18 $0.28 35.7× cheaper DeepSeek V4 Pro Global API $0.57 $0.78 12.8× cheaper GLM-5 Global API $0.73 $1.92 5.2× cheaper Kimi K2.5 Global API $0.59 $3.00 3.3× cheaper Let me be clear about something: those numbers come straight from the provider's pricing pages at the time I ran the analysis. I have not invented, rounded up, or "adjusted" anything her

2026-07-12 原文 →
AI 资讯

Tailwind CSS v4: What Actually Changed and How I Migrated Two Projects

Headline: Tailwind v4 is the most significant rewrite since the framework launched — CSS-first config, Lightning CSS under the hood, container queries built-in, and no more tailwind.config.js . I migrated two production projects and here's what actually broke and what the upgrade tool misses. Tailwind CSS v4 arrived with a steeper upgrade curve than most version bumps in the JS ecosystem. The configuration story changed completely. The build engine changed. Several features that previously required plugins are now built-in. The headline change: no more tailwind.config.js In v3, configuration lived in a JavaScript file — theme extensions, plugins, content paths. In v4, it moves into your CSS: @import "tailwindcss" ; @theme { --color-brand : #6366f1 ; --spacing-18 : 4.5rem ; } Theme tokens become CSS custom properties under @theme , and Tailwind generates utility classes automatically. The content array is gone — v4 detects source files automatically. The new engine: Lightning CSS Tailwind v4 ships with Lightning CSS replacing PostCSS as the default: Build times drop significantly (cold rebuild went from ~8s to under 3s on the dashboard) CSS nesting works natively without a plugin Modern CSS features like color-mix() , @starting-style , oklch are transpiled automatically autoprefixer is no longer needed New features built-in Container queries — native in v4, no plugin needed: <div class= "@container" > <div class= "grid grid-cols-1 @sm:grid-cols-2" > ... </div> </div> 3D transforms — rotate-x-45 , rotate-y-12 , perspective-1000 for card flip effects without inline styles. Dynamic spacing — p-13 , mt-22 work without explicit definition. Migration: the upgrade tool and what it misses npx @tailwindcss/upgrade@next The codemod handles the mechanical parts. What it missed: Custom plugins — the JS plugin API changed; non-trivial v3 plugins need a rewrite to the new @plugin / @utility API theme() calls in CSS — replace theme('colors.zinc.900') with var(--color-zinc-900) ; gr

2026-07-12 原文 →
AI 资讯

Offline Sync in the Browser Without a Framework

I've been building apps with IndexedDB for years. The local part works fine — store data, query it, show it on screen. The hard part is keeping that data in sync with a server when the network comes and goes. Most tutorials show you how to build an offline app with a framework. Firebase, RxDB, WatermelonDB. Those work, but they bring their own abstractions, their own sync protocols, their own opinions. I wanted something simpler. A database with a sync API that doesn't dictate how my backend works. Here's the setup I landed on. npm: npm install ctrodb Docs: ctrodb.vercel.app/docs/sync/overview What We're Building A notes app that works offline. Create and edit notes on the train, in a tunnel, on a plane. When the network comes back, everything syncs automatically. The database is ctrodb (zero-dependency, browser-based). The backend is anything that speaks HTTP. Step 1: Database Setup import { Database , syncPlugin , HttpTransport } from " ctrodb " const db = new Database ({ name : " notes-app " , schema : { version : 1 , collections : { notes : { fields : { title : { type : " string " , required : true }, body : { type : " string " }, updatedAt : { type : " string " , default : () => new Date (). toISOString () }, }, indexes : [{ field : " updatedAt " }], }, }, }, }) await db . connect () Every collection you want to sync needs a timestamp field. The sync engine uses it to order changes and detect conflicts. Plugins are passed in the Database constructor via plugins array: const transport = new HttpTransport ({ url : " https://api.myapp.com/sync " , }) const db = new Database ({ name : " notes-app " , schema : { ... }, plugins : [ syncPlugin ({ transport })], }) await db . connect () The transport takes a single base URL and appends /push and /pull automatically. The sync plugin hooks into every write operation and records it in the change log. The plugin exposes devtools that take the database instance as their first argument: import { inspectSyncQueue , retryFaile

2026-07-12 原文 →
AI 资讯

Model Kombat: The LLM Fighting Game!

Ever wondered what would happen if the world's leading Large Language Models settled their benchmark disputes in a 2D cybercity arena? It's easy to look at model performance on standardized benchmarks (like MMLU, MATH, or HumanEval). It is much more fun to visualize their underlying architectures, parameter scales, and hardware constraints as a retro-cyber fighting game. So, we built Model Kombat (Mixture of Experts Edition)! 🕹️ Play Directly Here 🎮 Launch Game in Full Screen 🧬 Playable ML Concepts Explained This isn't just a basic stick-figure fighting game. Every mechanic—from rendering complexity to the speed at which characters recover—is a direct, playable representation of real-world Large Language Model engineering. 1. 📐 Parameter Scaling vs. Render Tiers A model's representation capacity (intelligence) scales with its parameter count. In Model Kombat, a fighter's visual complexity, joint detail, and rendering fidelity directly reflect its real-world parameter size: Tier 1 (< 5B Parameters - Gemma 2B, Llama 3.2 3B) - Primitive Capsules : Drawn as simple, single-color flat limbs with low joint segmentation. This visualizes the limited representation capacity and coarse output resolution of small edge models. Tier 2 (7B - 14B Parameters - Mistral 7B, Claude Haiku) - Simple Vectors : Structured as thin skeletal wireframe vectors. Tier 3 (14B - 35B Parameters - Gemini Flash, Mixtral) - Two-Tone Vectors : Rendered as dual-color, layered vector limbs. Tier 4 (35B - 100B Parameters - Llama 8B, Claude Sonnet) - Cyborg Shading : Rendered as detailed vector cylinders with dynamic code particle streams flowing along their limbs. Tier 5 (> 100B Parameters - o3, GPT-4o, Claude Opus) - Quantum Vectors : Rendered as glowing vector limbs with digital matrix code particles, soft drop-shadow depth buffers, and real-time afterimage motion trails. 2. ⚡ Reasoning Tokens & KV-Cache Overcharging Instead of arbitrary "mana" or "stamina," fighters charge a Ki bar representing interna

2026-07-12 原文 →
AI 资讯

Scaling a Static Site to 4,400 Pages Without Breaking Google

I built Luxury Hotel Offers , a fully static site with 3,400+ listings that generates 4,400 HTML pages at build time. No SSR, no database at runtime. Here are the four hardest scaling problems I hit. 1. Googlebot's 2 MB HTML Limit With 3,400 hotels on one listing page, the naive approach (render all cards in HTML) produced a 9 MB page. Googlebot truncates at 2 MB and ignores the rest. The fix: cap the initial HTML at 400 cards. The remaining 2,500+ cards are generated as a separate HTML fragment file at a predictable URL ( /data/cards/{slug}-remaining/ ). A "Load More" button injects 48 cards at a time from the fragment. The first search or filter interaction loads the entire fragment so all cards are available for client-side filtering. This keeps every page under 2 MB for crawlers while giving users access to everything. 2. Content-Aware Lastmod with Cascading A site with 4,400 pages can't update every lastmod on every build. Search engines treat that as spam, and IndexNow has rate implications. Instead, the build hashes each hotel's SEO-relevant fields and compares against a persisted store. Only pages with actual content changes get their lastmod bumped. The interesting part is cascading: when a hotel in Paris changes, the Paris city page, France country page, and Europe region page all get their dates updated too, since their content changed (they list that hotel). Changed URLs feed into IndexNow so only genuinely modified pages get pushed to search engines. 3. DOM Filtering Breaks on Mobile at Scale The site started with pure DOM filtering: every card has data-* attributes for region, country, brand, and perks. JavaScript reads attributes and toggles visibility. Zero network requests, instant results. Great on desktop. On a mid-range phone with 2,500+ cards in the DOM, filtering took 2-3 seconds per interaction. textContent traversal across 20-40 nodes per card means ~60,000 DOM visits per keystroke. Layout thrashing with 10,000+ nodes made every show/hide cyc

2026-07-12 原文 →
AI 资讯

I Built a Browser From Scratch, and It Finally Renders the World's First Website Like Chrome Does

A while back I set myself a slightly unhinged goal: build a web browser from scratch in Node.js and Electron no external HTML/CSS/layout libraries, everything hand-rolled. URL parser, TCP/TLS socket, HTTP pipeline, HTML tokenizer, DOM builder, CSS tokenizer, CSS parser, style matcher, layout engine, canvas renderer. All of it, from zero. so,I called it Courage Browser . This week, after dozens of daily sessions, I hit a milestone that felt disproportionately satisfying: Courage now renders info.cern.ch the very first website ever put on the internet almost pixel-for-pixel identical to real Chrome. It sounds small. It is not small. Getting there meant chasing down bugs across nearly every layer of the browser. Why info.cern.ch If you haven't seen it, info.cern.ch is CERN's preserved copy of Tim Berners-Lee's original website. It's about as simple as HTML gets — one heading, a paragraph, a bulleted list of links. No CSS file, no JavaScript, no styling of any kind beyond what a browser applies by default. Which is exactly why it's a great test case. If your browser can't get a page with zero author CSS to look right, it has no business trying to render anything more complex. Default styling headings being bold, links being blue and underlined, bullets showing up in the right place has to work before anything else does. The bugs I found by just... comparing screenshots I put a screenshot of Courage's render side-by-side with Chrome's and started listing differences. Two jumped out immediately: The <h1> wasn't bold in Courage, even though it clearly should be. The links had underlines but weren't blue , they were rendering in the default text color. Neither of these had anything to do with what I was originally working on that day (CSS attribute selectors, for an upcoming GitHub-rendering push). But they were visible, they were wrong, and they were small enough to fix in one sitting. So I did. Bug #1: styles computed before they were applied Courage has a defaultRules ar

2026-07-12 原文 →
开发者

The Key That Unlocks Everything: Prototype Pollution in JavaScript

Imagine a hotel where every room key is cut from a master template. When a guest checks in, the front desk hands them a key that opens only their room. Simple enough. Now imagine a guest who, during check-in, sneaks a tiny modification into the key-cutting machine itself — changing the template so that every new key cut from that moment on also opens the manager's office, the safe, and the server room. The guest didn't break a lock. They didn't clone anyone's key. They changed the factory that makes all keys. That factory is JavaScript's Object.prototype . And the attack is called Prototype Pollution .

2026-07-12 原文 →
AI 资讯

What a Refinery Taught Me About CI Pipelines

I’m currently relearning the Core Three — HTML, CSS, and JavaScript — as I work toward becoming a full-stack JavaScript developer. Before I came back to learning software, I spent 22 years working industrial turnarounds. One lesson from that world has followed me into software engineering: Never trust a single point of failure. In industrial maintenance, there’s a safety practice called double block-and-bleed . Instead of trusting one isolation valve, you use two independent valves with a bleed point between them. If one valve leaks, you know immediately. The entire system assumes individual components can fail. Safety doesn’t come from perfect parts. It comes from independent layers of protection. That idea completely changed how I think about CI pipelines. When I first started relearning web development, my mindset was simple: Run Lighthouse. Everything green? Great. 100 across the board locally? Even better. Ship it. Different results after deployment? Uh-oh. Now I see Lighthouse as one checkpoint — not the finish line. A fast website can still have accessibility issues. An accessible site can still have broken metadata. Good SEO won’t catch rendering bugs. Passing unit tests won’t tell you if the generated HTML is malformed. Every tool has blind spots. No single tool should get the final vote. So instead of asking: “Did my tests pass?” I ask: “What kinds of failures could still slip through?” That question naturally leads to layered validation. Formatting Linting Type checking Accessibility checks Performance audits HTML validation SEO analysis Manual review None of these tools is perfect. Together, they’re much stronger than any one of them alone. The more I learn about software, the more I find myself applying lessons from heavy industry. Different environment. Different risks. The same engineering mindset. Assume components will fail. Design systems that fail safely. That’s becoming the philosophy behind every test matrix and CI pipeline I’m designing. What’s

2026-07-11 原文 →
AI 资讯

The Ultimate Claude Masterclass: 13 Power Features Changing the AI Game

The Ultimate Claude Masterclass: 13 Power Features Changing the AI Game Artificial Intelligence is no longer just about asking questions and getting text answers. Anthropic’s Claude has evolved from a simple chatbot into a fully autonomous, visual, and connected AI ecosystem. If you are still using it just to draft emails, you are barely scratching the surface. Whether you are a developer, content creator, or business professional, here is your definitive guide to the 13 powerhouse features of Claude, packed with practical examples, formatted specifically for Dev.to. 🧩 Part 1: Smart Onboarding & Personalization 1. Introduction to Claude Claude stands out in the crowded AI landscape because of its advanced reasoning, high emotional intelligence, and natural, human-like writing style. From parsing complex codebases to writing creative narratives, Claude feels less like a machine and more like a brilliant colleague. 2. Import Memory From ChatGPT To Claude Switching platforms shouldn't mean losing your progress. With this feature, you can instantly migrate your entire persona, past context, and custom instructions from ChatGPT straight into Claude with a single click. Example: If ChatGPT already knows your coding style or specific brand rules, importing it means Claude hits the ground running without you having to re-explain everything. 3. Add User Preferences Tired of typing "Act as a Senior Developer" or "Keep it casual" in every single prompt? User Preferences lets you set permanent system-level instructions that Claude remembers across all new conversations. Example: You can set a preference like: I manage a technology brand. Always keep explanations direct, modular, and optimized for scalability. 🎨 Part 2: Visuals, Coding & Apps 4. Create Apps & Artifacts Using Claude For Free Claude’s Artifacts feature opens a dedicated, interactive window right next to your chat. When you ask Claude to write code, a webpage, or a game, it doesn't just show you lines of text—it re

2026-07-11 原文 →
AI 资讯

How to Thrive (Not Just Survive) as a Developer in the Age of AI

The narrative around Artificial Intelligence and software engineering has shifted dramatically. We are no longer asking if AI will change development, but rather how we change with it. If your value as a developer is tied solely to how fast you can churn out boilerplate code, write standard API endpoints, or memorize syntax, the landscape is becoming challenging. AI can do those things in seconds. However, this isn't a death sentence for the engineering career—it is an evolution. The industry is moving away from pure "code generation" and shifting toward system architecture, integration, and governance. To remain indispensable, you need to know exactly where to direct your energy and what pitfalls to avoid. Where to Focus Your Energy To stay relevant, you must position yourself in the areas where AI struggles: high-level abstraction, complex contextual reasoning, and human leadership. 1. System Design and Enterprise Architecture AI is excellent at writing isolated functions, but it struggles with massive, interconnected systems. Focus on how components interact at scale. Understanding how to slice a monolithic application into resilient microservices, orchestrate microfrontends, or design cloud-native solutions is where the high-value work lies. 2. Code Governance and Quality Assurance With AI generating code at unprecedented speeds, codebases are expanding faster than ever. The world doesn't just need people who can create code; it needs gatekeepers who can validate it. Your role will increasingly focus on setting quality standards, establishing robust CI/CD pipelines, and ensuring that AI-generated code adheres to strict security, compliance, and performance metrics. 3. Mentorship and Team Leadership The influx of AI tools means junior engineers can produce code much earlier in their careers, but they often lack the foundational experience to spot subtle architectural flaws or security vulnerabilities. Senior developers must step up as leaders, guiding less experi

2026-07-11 原文 →
AI 资讯

Designing the data model for a trading journal

Every trader I know starts journaling in a spreadsheet, and every one of them abandons it within a month. Not because journaling is useless, but because the spreadsheet can't answer the questions that actually matter: "which of my rules costs me the most money?" or "am I cutting winners too early?" A flat sheet of rows can't tell you. Tools like RizeTrade solve this with a proper data model, and in this post I'll walk through how to design one yourself. The problem is almost always the data model. If you design the schema well up front, the hard reports fall out of it for free. Here's how I'd structure it. * Start with the trade, but don't overload it * The instinct is to make one giant trades table with fifty columns. Resist it. A trade has a small core of facts: CREATE TABLE trades ( id BIGSERIAL PRIMARY KEY , symbol TEXT NOT NULL , side TEXT NOT NULL CHECK ( side IN ( 'long' , 'short' )), entry_price NUMERIC NOT NULL , exit_price NUMERIC , quantity NUMERIC NOT NULL , entry_at TIMESTAMPTZ NOT NULL , exit_at TIMESTAMPTZ , stop_loss NUMERIC , take_profit NUMERIC , commission NUMERIC DEFAULT 0 , strategy_id BIGINT REFERENCES strategies ( id ) ); Everything else (emotions, notes, screenshots, rule checks) hangs off this in separate tables. That separation is what lets you slice the data later without schema migrations every time you want a new report. * R multiples belong in the model, not the UI * The single most useful number in trading isn't dollar P&L. It's the R multiple: profit or loss expressed in units of the risk you planned to take. A +2R win and a +2R win are comparable across a $500 account and a $50,000 account; two dollar figures aren't. Planned risk is defined the moment you enter, by your stop: planned_risk_per_unit = |entry_price - stop_loss| planned_R = (exit_price - entry_price) / planned_risk_per_unit (for longs) Store the stop at entry time. If you only record the realized exit, you lose the ability to detect stop loss violations, which is the who

2026-07-11 原文 →
AI 资讯

Invisible DevTools: Why the Best Tools Disappear

The best developer tools share one quality: you forget you are using them. Think about it. Your IDE fades into the background when you are in flow. Your terminal becomes muscle memory. These tools are invisible because they match your mental model so perfectly that there is zero friction between thought and action. This is exactly what online developer utilities should aspire to. The Problem with Fragmented DevTools Most developers have a bookmarks folder full of single-purpose websites: One for JSON formatting One for timestamp conversion One for Base64 encoding One for URL decoding Every switch between these tabs is a context loss. Every tool has a slightly different UI, different copy-paste format, different quirks. The Invisible Toolkit Opennomos Json (opennomos.com/en/project/01KJ850Z7PNGXHXESBM68HE12Y) consolidates timestamp conversion, JSON formatting, and Base64 encoding into a single workspace. No install. No accounts. No pricing tiers. Just open a tab and work. This is the north star for developer tools: make them so simple that the user never has to think about the tool itself — they only think about their actual task. The Trend Is Clear We have seen this pattern across the dev ecosystem: GitHub Codespaces made local IDE setup invisible Vercel made deployment invisible Replit made runtime environment invisible The next frontier is utility tools. The sooner they become invisible, the better. Try it: opennomos.com/en/project/01KJ850Z7PNGXHXESBM68HE12Y Part of the Nomos Build-in-Public series.

2026-07-11 原文 →
AI 资讯

Browsershot Alternatives: HTML to Image in Laravel Without Puppeteer

Cross-posted from the HTML to Image blog , where the original lives. Browsershot is the package most Laravel developers reach for when they need to turn HTML into an image. It wraps Puppeteer, drives real Chrome and produces pixel-accurate output. On your machine it works first time. Then you deploy, and the first render throws Failed to launch the browser process! . The problem is not Browsershot's code. The problem is what it demands from the machine it runs on. What Browsershot actually asks of your server Browsershot is a PHP package with a second runtime hiding inside it. To run it in production you need Node.js, the Puppeteer npm package, a Chrome or Chromium binary, the long tail of shared libraries Chrome links against ( libnss3 , libatk , libgbm and friends on a slim Debian image) and a font set wide enough to cover whatever your templates contain, emoji included. That is manageable on a full VPS you control. It falls apart in the places Laravel apps increasingly run: Laravel Vapor and serverless. The PHP Lambda runtime ships neither Node nor Chrome, and you cannot apt-get your way out of a Lambda. The Puppeteer on Lambda guide covers just how deep that particular hole goes. Shared and managed hosting. No root, no system packages, no browser binary. Browsershot is simply off the table. Slim Docker images. php:8.3-fpm-alpine carries none of Chrome's dependencies. Adding Chromium, its libraries and fonts costs a few hundred megabytes and a permanent maintenance line in your Dockerfile. CI pipelines , where every job downloads a browser before your test suite can touch a render. The dependency does not stay contained either. Even Spatie's newer packages inherit it: spatie/laravel-og-image renders through laravel-screenshot , which drives Browsershot underneath, so the Node and Chrome requirement follows the whole family wherever it goes. The usual workarounds The first workaround is the fat container: bake Chromium, the shared libraries and a font stack into y

2026-07-11 原文 →
AI 资讯

How to Hunt a Bug at 10 PM 🌙

The Story: Picture this: It is 10 PM. I was eating my dinner while adding one final touch to my social media app, Vlox. It should just say "Processing..." while generating a card. Simple, right? See the nightmare. 🔥 The Nightmare Scenario 📉 Suddenly, my "Download Card" button broke. htmlToImage started spitting out completely empty 0b images. The hunt was on. Failed Mission Log 🛰️ Attempt 1: Swap to html2canvas 🔄 Result: Error stating the element was not found in the cloned iframe. Verdict: The parent container was completely lost. Attempt 2: Use CoolAlertJS Toast 🍞 Result: It looked ugly and meant loading two different alert libraries for the same job? Not my game. Verdict: Total waste of bundle size. Attempt 3: Append to body + display: none 🙈 Result: The canvas process failed entirely. Verdict: Canvas snapshot engines completely ignore hidden elements. The "Aha!" Moment 💡 Why did the element vanish? Because the card generator lives entirely inside a Swal popup. When you click the download/confirm button, Swal instantly destroys that entire popup DOM tree. You cannot snapshot an element that no longer exists. 👻 The Ultimate Fix 🚀 Inside the new "Processing" popup, I appended the #card-generator-image-preview directly into the new alert container. The element stays alive in the active DOM. The snapshot succeeds perfectly. Clean code. Happy developer. Delicious dinner. Want to see the exact JavaScript code block that fixed it? Drop a comment below or check Vlox on Github .

2026-07-11 原文 →
开源项目

Markdown to HTML: The Fastest Way to Convert Markdown Online

Markdown to HTML: The Fastest Way to Convert Markdown Online Markdown is one of the easiest ways to write documentation, blog posts, README files, and notes. The only problem is that many platforms require HTML instead of Markdown. Instead of installing software or using complicated editors, you can convert Markdown directly in your browser. I built MDConvertHub to make this simple. It lets you: Convert Markdown to HTML instantly Preview the output before copying Work completely in your browser No signup required Free to use I started building MDConvertHub because I wanted a collection of small Markdown tools in one place instead of visiting different websites for every task. The project now includes multiple Markdown utilities, and I'm continuously adding new tools based on real use cases. If you'd like to try it, I'd love your feedback. 👉 https://mdconverthub.com/markdown-to-html What Markdown tool do you use most often? Feedback and suggestions are always welcome. I'm building MDConvertHub one tool at a time.

2026-07-11 原文 →
AI 资讯

FoundrGeeks Is Live: Find Your Co-Founder the Intelligent Way

Finding a co-founder is one of the hardest parts of building a startup, and most platforms weren't built for it. LinkedIn is a professional directory, not a matching network. Reddit threads are noisy and unstructured. Cold outreach is a gamble. FoundrGeeks is built specifically for this problem . It's an AI-powered co-founder and team matching platform that connects builders based on what they're building, what skills they bring, and what gaps they need to fill, not just their job title or who they already know. The problem with finding a co-founder most builders looking for a co-founder face the same wall: the people they need aren't in their network, and the platforms that exist weren't designed for this specific search. You're not just looking for someone with the right skills. You need someone at the same stage, with the same intensity, who fills exactly the gaps you have right now. And you need to know that before spending three hours on discovery calls. That's the gap FoundrGeeks fills. How FoundrGeeks works When you create a profile, you describe what you're building, what you bring to the table, and what you need. You set your stage, idea, MVP, or funded, and your weekly availability. From there, the AI takes over. It surfaces people whose strengths complement your gaps, scores each match as Strong, Good, or Potential, and generates a plain-English explanation of why each person fits what you're building right now. Three features stand out at launch: Complementary matching: the engine looks for people who fill your gaps, not mirror your background Scored matches with explanations, every match tells you exactly why, before you reach out Stage-aware feeds, as you move from idea to MVP to funded, your matches reshuffle automatically You also control your visibility, go public and let talent find you, or stay private and let the AI work quietly on your behalf. Why we built this This platform exists because of a project that never got finished. I had an idea I wa

2026-07-11 原文 →
AI 资讯

Stop Asking. Start Delegating: How I Actually Use AI On My Site

AI is not a smarter Google I am convinced most people are using AI in the worst possible way. They treat it like a slightly magical search bar. Type question. Get answer. Copy. Paste. Forget. I think that mindset is holding a lot of people back. Developers. Designers. Knowledge workers. Even my baseball kids who ask ChatGPT for homework help. AI is not a better Q&A machine. It is a delegation machine. You do not "ask" AI. You give it a job. This post is me making that shift concrete. I just shipped six AI gallery pages on my site, built entirely around that idea. Not as a gimmick. As infrastructure for how I work, learn, and build. Why I stopped asking AI questions The turning point was basically frustration. My workflow looked like this for months: Open ChatGPT Ask something like "How do I X in Astro / Svelte / Next" Skim the answer Try the snippet Debug for 30 minutes anyway The answers were fine. Sometimes even useful. But nothing stuck. I would ask the same class of questions over and over. Same concepts. Same patterns. Same gotchas. No real accumulation of knowledge. Just one-off transactions. Then I noticed something: the few times I actually got huge value from AI, I was not asking. I was delegating. "Rebuild this layout using CSS grid, but keep these class names." "Refactor this component, keep the same API, and annotate the performance tradeoffs in comments." "Act like my annoying senior engineer and poke holes in this data model." That felt different. Less like search. More like a teammate who does legwork while I keep steering. Delegation > questions So I made a decision: treat AI like a junior colleague with unlimited patience and questionable taste. That means: I do not ask "How do I do X". I say "You are responsible for X. Here is context. Here are constraints. Here is the definition of done." The shift sounds subtle. It is not. When you ask a question, the model guesses what you want. When you delegate a job, you tell it what you want and where it fit

2026-07-11 原文 →