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

开发者

编程技术、框架工具、最佳实践

7156
篇文章

共 7156 篇 · 第 197/358 页

Reddit r/programming

RuView WiFi Repo Scam?

Found this YouTube video of these kids demoing the densepose repo. However, I believe there was a huge fuss about this being vibe-coded slop and not actually running. This video also seems super suspect as the wifi is only detecting him and not the cameraman or anything else. Has anyone got this Repo up and running? submitted by /u/Wonderful-Bass-8993 [link] [留言]

/u/Wonderful-Bass-8993 2026-06-25 20:46 👁 5 查看原文 →
Dev.to

Type-Safe Env Vars Without Zod

Most TypeScript projects treat environment variables like second-class citizens. They're string | undefined everywhere, asserted with ! and parsed with parseInt() . TypeScript can't help because process.env is typed as Record<string, string | undefined> . Schema-based validation fixes this. But most solutions bring zod, which adds 50 KB to your bundle. CtroEnv does it with zero dependencies and 6.5 KB gzipped. How Inference Works The type system reads each validator's configuration at compile time: type InferredValue < V > = V extends Validator < infer T > ? V [ " metadata " ] extends { hasDefault : true } ? T // .default() → non-nullable : V [ " metadata " ] extends { optional : true } ? T | undefined // .optional() → nullable : T // required → guaranteed present : never This means the schema defines the type: const env = defineEnv ({ PORT : number (). port (). default ( 3000 ), // ^? number — default makes it always present DB_URL : string (). url (), // ^? string — required DEBUG : boolean (). optional (), // ^? boolean | undefined — optional NODE_ENV : pick ([ " dev " , " prod " , " staging " ] as const ), // ^? "dev" | "prod" | "staging" — exact union }) No interface Env { ... } . No z.infer<typeof Schema> . Add a new validator, and the type updates automatically. Default vs Optional vs Required The three states and their types: Declaration Type Runtime behavior string() string Required — throws if missing string().optional() `string \ undefined` string().default("x") string Falls back to "x" string().optional().default("x") string Default overrides optional TypeScript reflects this exactly. Optional gives you | undefined . Default removes it. The as const Requirement pick() needs as const to preserve literal types: pick ([ " dev " , " prod " ]) // type: string — widened pick ([ " dev " , " prod " ] as const ) // type: "dev" | "prod" — exact union Without as const , TypeScript widens the array to string[] and you lose the union. Exhaustive Checking With exact l

Odejobi Abiola Samuel 2026-06-25 20:41 👁 5 查看原文 →
InfoQ

Building a European Cloud Orchestration Platform within an Enterprise

Modern cloud deployments involve many tools with different lifecycles, creating a heavy burden on engineers. The Kubernetes ecosystem offers a unified Control Plane approach. Sharing best practices through tech talks and inner-source collaboration can create an engaged community and drive adoption. By Ben Linders

Ben Linders 2026-06-25 19:06 👁 6 查看原文 →
Product Hunt

Social Fetch

Social media scraper API for every major platform Discussion | Link

Chris Messina 2026-06-25 18:17 👁 2 查看原文 →
InfoQ

Cloudflare Ships Agent Skills for Zero Trust Deployment and Migration

Cloudflare released the Cloudflare One stack, an open-source library of agent skills for planning, deploying, and managing Zero Trust environments. The skills include automated migration logic for Zscaler and Palo Alto Networks, the same logic used in Cloudflare's Descaler program that has moved enterprise customers in hours rather than months. By Steef-Jan Wiggers

Steef-Jan Wiggers 2026-06-25 17:27 👁 10 查看原文 →