Conversations linking to GitHub, newest first. Times are UTC.
Mentions by source
Nov 27, 04:00Nov 28, 04:00
Nov 27, 06:00Nov 28, 06:00
Nov 27, 05:00Nov 28, 05:00
Nov 27, 05:00Nov 28, 05:00
Nov 27, 06:00Nov 28, 06:00
Nov 27, 06:00Nov 28, 06:00
Nov 27, 05:00Nov 28, 05:00
Nov 27, 07:00Nov 28, 07:00
Oct 14, 21:00Oct 15, 21:00
Delayed · data through Oct 15, 21:00 UTC
Nov 27, 06:00Nov 28, 06:00
Nov 27, 06:00Nov 28, 06:00
Nov 26, 21:00Nov 27, 21:00
Delayed · data through Nov 27, 21:00 UTC
Nov 27, 06:00Nov 28, 06:00
Oct 28, 01:00Oct 29, 01:00
Delayed · data through Oct 29, 01:00 UTC
Nov 8, 11:00Nov 9, 11:00
Delayed · data through Nov 9, 11:00 UTC
Nov 27, 06:00Nov 28, 06:00
Latest posts
Adafruit NeoPixel (1.15.6) by Adafruit ➡️ adafruit/Adafruit_NeoPixel Arduino library for controlling single-wire-based LED pixels and strip. #ArduinoLibs #ArduinoLibraries
Posting Reels every day means writing hooks, scripts and captions, and AI drafts sound like AI. 13 free Claude skills. Give it an idea and it writes a Reel with scored hooks, a script and caption. A humanizer strips AI phrasing. 9.9K stars. Jakeschincariol/instagram-agent-skill
Detroit Michigan Real Estate Dataset 4722 Listings, Excel File (2026-11-25) I have created an Excel dataset containing real estate data for Detroit, Michigan. The data was collected on 2026-11-25, and includes 4722 listings. File details: - Rows: 4722 (one for each listing) - Coverage: 12 neighborhoods and suburbs, including Detroit, Redford, Highland Park, and Harper Woods. ZIP codes range from MI 48127 to MI 48240. - Price reductions: Present in approximately 29% of the listings. - Property types: Single Family Residence, Land, Multi Family, etc. - Columns: Address, neighborhood, ZIP code, price, price reduction, number of bedrooms, number of bathrooms, square footage, property type, year built, MLS number, estimated monthly payment, link to the listing, and all other information from the listing. You can download the complete Excel file for free via the links below Download: - GitHub: Detroit Release, November 25, 2026
My thing arrdem/lowball
What Is an Embedding? Two Models Rated “Boris Paid Anna” Closer Than the Right Answer An embedding turns text into a list of numbers so that texts with similar meaning get similar numbers. I tested two open embedding models on my laptop with 55 pairs of sentences. Both knew what a sentence was about. Neither reliably knew what it said. An embedding is a list of numbers that a model makes from a piece of text, so that texts with similar meaning get similar numbers. It is how a search engine finds a document that answers your question in different words, and how a RAG system decides what to put in front of a language model. I tested two open embedding models on my laptop with 55 pairs of sentences. Both of them scored a sentence with the roles swapped, such as "Boris paid Anna 100 dollars" for "Anna paid Boris 100 dollars", as closer to the original than a correct paraphrase. That happened in all 10 sentences I tried, in English and in Russian. What an embedding is Take the sentence "The payment went through." An embedding model turns it into 768 numbers. The first eight, from the model I used, are: -0.2049, 0.0160, 0.0154, 0.0234, 0.0126, 0.0933, -0.0754, -0.0305 No single number means anything on its own. What matters is where the whole list points. The model was trained so that sentences with similar meaning point in similar directions, and unrelated sentences point in different ones. A list of numbers like this is also called a vector, which is why the databases that store them are called vector databases. The idea is older than chatbots. In 2013 word2vec learned one vector per word from large amounts of text, so that words used in similar contexts got similar vectors. Language models still start the same way: their first layer, the embedding layer, turns each token of your text into a vector before any other computation happens. I described tokens in an earlier test. An embedding model goes one step further and turns a whole sentence or document into one vector. The same idea works beyond text. Images, audio and code can all be turned into vectors. On November 17, 2026 Google described EmbeddingGemma 2 and its technical report: an open model that puts text, images, audio and video into one shared space of 768-number vectors, so that a photo of a dog and the words "a dog" land near each other. How similarity is measured Two embeddings are compared with cosine similarity. It gives one number: close to 1 when the two vectors point the same way, close to 0 when they have nothing in common. In my test, unrelated pairs, such as a payment and a cat sleeping on a windowsill, averaged between 0.13 and 0.25. Pairs on the same subject averaged between 0.84 and 0.98. This is what makes search by meaning work. You turn every document into an embedding once. When a question arrives, you turn it into an embedding too, and return the documents with the highest similarity. No keyword has to match. What I tested I ran two open models on my MacBook Air (Apple M4, 24 GB of memory) through Ollama 0.40.4: EmbeddingGemma, the first version of Google's model, and Qwen3-Embedding 0.6B. I wrote the method and all the sentences before the first run. The comparison ran once; the speed test ran three times, and I report the median. There were five base sentences in English and the same five in Russian, about a payment, a bank loan, a delivery, a leave request and a court ruling. The first one was "Anna paid Boris 100 dollars for the repair on Monday." Each base sentence got four partners: 1. A paraphrase: the same fact in other words. "On Monday Boris received 100 dollars from Anna for fixing it." 2. A negation: one "not" that reverses the meaning. "Anna did not pay Boris 100 dollars for the repair on Monday." 3. A different number: "Anna paid Boris 900 dollars for the repair on Monday." 4. Swapped roles: "Boris paid Anna 100 dollars for the repair on Monday." That makes 40 pairs. I added 10 pairs of unrelated sentences and 5 pairs of an English sentence with its Russian translation: 55 in total. The paraphrase is the only partner that says the same thing. The other three are traps. They look almost the same and mean something else. A model that understands the sentence should score the paraphrase highest. I counted how often a trap beat the paraphrase, across 5 sentences, 3 traps and 2 languages: 30 comparisons per model. Embeddings know the topic, not the fact | | EmbeddingGemma | Qwen3-Embedding 0.6B | |---|---|---| | Vector length | 768 | 1,024 | | A trap scored above the paraphrase | 20 of 30 | 25 of 30 | | Swapped roles beat the paraphrase | 10 of 10 | 10 of 10 | | A different number beat the paraphrase | 5 of 10 | 10 of 10 | | A negation beat the paraphrase | 5 of 10 | 5 of 10 | | Unrelated pairs, average similarity, EN / RU | 0.19 / 0.18 | 0.25 / 0.13 | Here is the first sentence with EmbeddingGemma in English: - the paraphrase: 0.890; - "Anna did not pay Boris": 0.875; - "Anna paid Boris 900 dollars": 0.893; - "Boris paid Anna": 0.987. The sentence that reverses who paid whom came out almost identical to the original. The correct paraphrase tied with a sentence where the amount is nine times larger: 0.890 against 0.893 is no real difference. My reading of why: swapping two names keeps every word and changes only their order, and an embedding is a summary of the whole sentence, not a record of who did what. A changed number is a single word in a sentence of about a dozen. A paraphrase uses different words, and the model has to recognise the meaning through them. Both models do recognise it: they put the paraphrase far above anything unrelated. They just put the near-copies even higher. So an embedding is a good measure of what a text is about and a weak measure of what it claims. For search that is usually fine: a question about Anna's payment should find documents about Anna's payment. For anything that depends on the exact fact, it is not enough on its own. Two more things the test showed One sentence in two languages is close. EmbeddingGemma gave an English sentence and its Russian translation an average similarity of 0.86, almost as high as a Russian paraphrase (0.89). Qwen3-Embedding gave 0.75. A multilingual model can find a Russian document for an English question. A shorter vector lost very little. Both models are trained so that the start of the vector carries most of the meaning; EmbeddingGemma's model card lists 512, 256 and 128 numbers as supported sizes alongside the full 768. I cut the vectors to the first 512, 256 and 128 numbers and repeated the comparison. Not one of the 30 outcomes changed for either model. At 128 numbers EmbeddingGemma's similarities moved by 0.044 on average. A vector of 128 numbers takes a sixth of the space of 768, which matters when there are millions of documents. Speed on the laptop: EmbeddingGemma turned 1,000 short sentences into embeddings in 13.3 seconds, 75 per second, using 685 MB of memory. Qwen3-Embedding took 34.2 seconds, 29 per second, with 2.4 GB. Its three runs ranged from 28 to 39 seconds because the machine was not idle, so take that number as approximate. How I would choose an embedding model Leaderboards rank models by averages over dozens of tasks. That average says little about whether a model can tell your two closest documents apart. On my pairs the faster and smaller model made fewer trap errors than the larger one. Before I picked a model for real work, I would write twenty pairs from my own documents that differ by one fact, run every candidate on them, and count how often the wrong one wins. It takes about an hour, and for my use it told me more than the rank. What this means in production I build and run a system that turns plain-language questions into SQL across more than 500 data marts. A description of that many tables does not fit into a model's context window, so every question first goes through retrieval: embeddings pick the tables that look relevant, and only those reach the model. Without that step the query cannot run at all. In my open benchmark on BIRD, 1,534 questions with narrow schemas that fit entirely in the window, I tested the same step (arXiv:2606.29733, code). The embedding retriever used all-MiniLM-L6-v2 and picked the top six tables by cosine similarity. It found 96.53% of the tables each query needed, against 93.95% for a simple keyword method. That did not buy accuracy. On Qwen2.5-Coder-32B it won 33 questions and lost 39 against giving the model the full schema. The net difference was -0.39 points, indistinguishable from zero. On a smaller model, CodeLlama-7B, embedding linking was 2.80 points worse than the keyword method, and that difference held up after correction for multiple tests. The laptop test points the same way. An embedding finds what looks related, and what looks related is not always what the query needs. Recall, the share of needed tables found, says nothing about the queries broken by the one table that was left out. That is the number to watch. I wrote more about this in What Is RAG? What to take from this 1. An embedding measures the topic, not the fact. Use it to find candidates, then check the fact with something that reads the text, such as a language model or an exact filter. 2. Test with near-misses, not only with unrelated text. Any model separates a court ruling from a cat. The useful test is a pair that differs by one word. 3. Judge retrieval by what it breaks. A high share of found documents can hide the queries ruined by the one it missed. 4. Try a shorter vector before buying storage. On my pairs, 128 numbers out of 768 changed no outcome. What this does not show This is 55 pairs on one laptop, an illustration and not a ranking of models. The result depends on how far a paraphrase moves from the original words: the negation trap won mostly on the leave request and the court ruling, where the paraphrase was rewritten most heavily. I passed the sentences as they are, without the task prefixes both models accept for search, so scores in a real search setup may differ. EmbeddingGemma in Ollama is the first version, not EmbeddingGemma 2. The production system is described from my own experience; its data are closed. Sources - EmbeddingGemma 2 technical report, Google - EmbeddingGemma 2: Unified and Efficient Multimodal Representations, arXiv:2610.37364 - Ollama API reference - How far do on-premises open LLMs get on Text-to-SQL? A cross-family size and technique frontier on BIRD, arXiv:2606.29733 - nl2sql-onprem-bench, GitHub - What Is RAG? A 1,534-Question Test Where Retrieval Only Took Things Away, BESK TECH - What Is a Token in AI? I Ran the Same 71 Tasks on Three Models, BESK TECH --- Vladimir Beskorovainyi, Enterprise AI Architect & CTO, author of the Amazon bestseller "Enterprise AI: The KATA Way", founder of Besk Tech (besk.tech)
Converting Pasted Google Docs and Rich Text to Clean Markdown in Vanilla JS If you have ever copied formatted text from Google Docs and pasted it into a Markdown converter, you have probably seen the entire document come out wrapped in stray **...** bold markers. Google Docs wraps copied selections inside a <b style="font-weight:normal" id="docs-internal-guid-..."> element. Technically it is a <b> tag, so HTML-to-Markdown converters treat the whole document as bold, even though the inline style explicitly sets font-weight:normal. Here is how we handle rich clipboard pastes cleanly in vanilla JavaScript without sending a single byte to a server. 1. Intercept paste and read text/html safely Instead of letting a contenteditable div render raw pasted styles and then scraping its live DOM, read clipboardData directly in the paste event and parse it with DOMParser: richBox.addEventListener("paste", (e) => { const cd = e.clipboardData; if (!cd) return; e.preventDefault(); const html = cd.getData("text/html"); const plain = cd.getData("text/plain"); const doc = new DOMParser().parseFromString(html || plain, "text/html"); const markdown = convertBodyToMarkdown(doc.body); }); Using DOMParser().parseFromString(..., "text/html") creates an inert document tree — <script> elements and inline event handlers are never executed, and we only read the tree rather than injecting it into the page. 2. Unwrap Google Docs' fake <b> and strip noise With Turndown and turndown-plugin-gfm, two small additions clean up 99% of real-world pastes from docs, wikis, and web pages: const td = new TurndownService({ headingStyle: "atx", bulletListMarker: "-", codeBlockStyle: "fenced", hr: "---", }); td.use(window.turndownPluginGfm.gfm); td.remove(["script", "style", "noscript", "iframe", "meta", "link"]); // Google Docs wraps copied blocks in <b style="font-weight:normal"> td.addRule("gdocsWrapper", { filter: (node) => node.nodeName === "B" && /font-weight:\s*normal/i.test(node.getAttribute("style") || ""), replacement: (content) => content, }); 3. Keep fenced code languages intact When clipping full web articles (for instance, with Mozilla Readability before running Turndown), Readability strips CSS classes by default. That removes language-js or lang-python from <pre><code> blocks unless you preserve them: const langClasses = new Set(); clone.querySelectorAll("pre[class], code[class]").forEach((el) => { el.classList.forEach((c) => { if (/^(language|lang)-/.test(c)) langClasses.add(c); }); }); const article = new Readability(clone, { classesToPreserve: [...langClasses], }).parse(); Pairing that with a pre > code rule that picks a fence longer than any inner backticks guarantees nested Markdown examples don't break your output. Try it in your browser We put this exact client-side pipeline into a free, zero-tracking web utility so you can paste straight from Google Docs, Word, or any web page and copy clean GFM Markdown: - Free browser tool: HTML & Rich Text → Markdown Converter - Browser extension (Firefox & Edge coming soon): Lark Markdown Clipper
Free Houston Texas Real Estate Dataset 15278 Listings in Excel (2026-07-18) Here is a free Excel file with 15278 real estate listings from the Houston, Texas area, collected on 2026-07-18. What is inside: - Price reductions: Present in approximately 37% of the listings. - Rows: 15278 (one per listing) - Coverage: 27 neighborhoods and suburbs, including Houston, Spring, Pasadena, and Bellaire. ZIP codes from TX 76384 to TX 77598. - Property types: Single Family Residence, Townhouse, Unimproved Land, and others. - Columns: Address, neighborhood, ZIP code, price, price reduction, bedrooms, bathrooms, square footage, property type, year built, MLS number, estimated monthly payment, listing link, and the other fields shown in each listing. The complete file is free to download Where to get it: - GitHub release: Houston, July 18, 2026
ASP.NET Web Forms in 2026: Support Status and Migration to .NET 10 Web Forms still gets security fixes for as long as Windows does. It will never run on .NET 10 or any later version. The way out is not a rewrite: a new ASP.NET Core app takes over one page at a time while the old app keeps serving the rest. // New .NET 10 app in front of the Web Forms app var builder = WebApplication.CreateBuilder(args); builder.Services.AddSystemWebAdapters(); builder.Services.AddHttpForwarder(); builder.Services.AddRazorPages(); var app = builder.Build(); app.UseSystemWebAdapters(); app.MapRazorPages(); // pages moved so far app.MapForwarder("/{**catch-all}", app.Configuration["ProxyTo"]); // the rest app.Run(); Where ASP.NET Web Forms stands Web Forms is part of ASP.NET on .NET Framework. Microsoft calls .NET Framework 4.8.1 the latest version, and it ships as a component of Windows, so it is supported and patched for as long as the Windows version it runs on. Running a Web Forms app today is not running unsupported software. What it will not get is a future. ASP.NET Core, the web framework in .NET 5 through .NET 10, does not support the Web Forms model: no .aspx pages, no server controls, no ViewState and no page life cycle. A Web Forms app cannot be retargeted to net10.0; its pages have to be rebuilt in Razor Pages, MVC or Blazor. So the real risk is not a support deadline. It is an app that gets harder to change every year: fewer developers who know it, libraries that stop shipping .NET Framework builds, and hosting tied to Windows and IIS. .NET Framework versions and their support Web Forms is supported as long as the .NET Framework version under it is. Newer versions follow Windows; older ones have their own end dates. | .NET Framework | Support | |---|---| | 4.8.1, 4.8 | Follows the Windows version it runs on | | 4.7.2, 4.7.1, 4.7 | Follows the Windows version it runs on | | 4.6.2 | Ends 12 Jan 2027 | | 3.5 SP1 | Until 9 Jan 2029 | | 4.5.2, 4.6, 4.6.1 | Ended 26 Apr 2022 | Sources: Microsoft Lifecycle: .NET Framework and the .NET Framework support policy, checked 25 November 2026. 4.5.2, 4.6 and 4.6.1 were retired early because they were signed with SHA-1. If the app targets 4.6.2 or older, retargeting it to 4.8.1 is the cheap first move. It is usually a small change, it buys support for as long as the server's Windows version, and it is a step every later migration needs anyway. Blazor, Razor Pages, or stay on 4.8.1 for now The right choice depends on how the pages are built and how much the app still changes. Blazor Components, event handlers and server-side state: the closest model to Web Forms, so pages heavy with server controls and postbacks usually map most naturally. The community BlazorWebFormsComponents project offers Blazor versions of common Web Forms controls to speed up the markup. Razor Pages or MVC A page with a handler, returning plain HTML. A good fit for form-based pages, reports and content pages without much interactivity. Simpler to reason about and test, and the natural home for any part of the app that is really a set of forms. Stay on 4.8.1 for now For an app that rarely changes and has years of Windows support left, staying put can be the right call. Retarget to 4.8.1, and move shared business logic into .NET Standard 2.0 libraries, so a later migration starts half done. Blazor and Razor Pages are not exclusive. Both run in the same ASP.NET Core app, so each part of the old app can move to whichever fits it. The migration path, page by page A big-bang rewrite stops new work for months. Moving page by page keeps the app live and lets each release ship value. 1. Inventory - List every page, user control and server control, how each uses ViewState, session and the page life cycle, and every library the app depends on. 2. Split out the logic - Move business and data code out of code-behind into .NET Standard 2.0 libraries both apps can use. The System.Web adapters help code that still reaches for HttpContext. 3. Put ASP.NET Core in front - A new .NET 10 app receives every request, serves the pages it has, and forwards the rest to the Web Forms app with YARP. Session and sign-in are shared, so users see one site. 4. Move pages and retire - Rebuild pages in Blazor or Razor Pages in order of value or risk, release each as it is ready, and switch off the Web Forms app when the last page has moved. Source: Microsoft Learn: migrate from ASP.NET Framework to ASP.NET Core. Also have WCF services? See WCF to CoreWCF, gRPC or Web API. Moving off .NET 8 too? See .NET 8 end of life. Rest of the app on .NET Framework 4.8? See .NET Framework 4.8 to .NET 10. ASP.NET Web Forms FAQ Is ASP.NET Web Forms dead? Not unsupported, but finished. Web Forms runs on .NET Framework 4.8.1, which Microsoft supports as part of Windows and still patches. It gets no new features, and ASP.NET Core does not support the Web Forms model, so a Web Forms app can never run on .NET 10 or later as it is. When does ASP.NET Web Forms reach end of life? There is no fixed date. .NET Framework 4.8.1, 4.8 and 4.7.x follow the support of the Windows version they are installed on. Older versions have their own dates: 4.6.2 support ends on 12 January 2027, and 4.5.2, 4.6 and 4.6.1 ended on 26 April 2022. An app on 4.6.2 or older should be retargeted to 4.8.1 now. Should we migrate Web Forms to Blazor or to Razor Pages? Blazor is closer to how Web Forms works: components, events and state on the server, so pages with lots of server controls and postbacks usually map more naturally. Razor Pages suits simpler, form-based pages and gives plain HTML with fewer moving parts. Both run in the same ASP.NET Core app, so one project can use each where it fits. Can we migrate Web Forms one page at a time? Yes. Microsoft's incremental migration approach puts a new ASP.NET Core app in front of the Web Forms app. Pages that have moved are served by the new app, and everything else is forwarded to the old one with YARP. The System.Web adapters let the two share session and sign-in, so users see one site while pages move over in stages. Is there an automatic Web Forms to Blazor converter? Not one that does the whole job. BlazorWebFormsComponents is a community, MIT-licensed project (not a Microsoft product) that provides Blazor versions of common Web Forms controls and a conversion tool for markup. It speeds up the move, but code-behind, page life cycle logic and ViewState use still need a developer to rework them. Find out what moving your Web Forms app would take A fixed-price audit from US$500: every page and control mapped, logic that can be reused identified, and a page-by-page plan with an estimate. Working with .NET since 2009. Book a .NET audit --- Originally published at netdevelopersindia.com.
Why Cloud Meeting Bots Fail in Real Boardrooms — Building a 3-Hour Screen-Off Offline Meeting Recorder on Android Most modern AI meeting note-takers follow the same pattern: a cloud bot dials into your Zoom or Google Meet call, streams audio to remote servers, and emails a summary afterward. That works at a home desk — right up until you walk into a real conference room, client site, factory floor, or executive boardroom: 1. No video link for a bot to join: The conversation is happening across a physical table. 2. Spotty Wi-Fi & strict confidentiality: Streaming raw confidential audio over conference-room Wi-Fi often fails or violates company policy. 3. Android OS kills background microphones: Standard voice recorder workflows frequently get throttled by Android Doze Mode 5–10 minutes after you lock the screen. When building METRA — Meeting Transcripts AI (com.meetingtranscripts.app), we engineered the capture pipeline specifically around physical Android reliability instead of web-call bots. 1. Persistent 3-Hour Screen-Off Capture (Android Foreground Service) To keep recording reliably while a user puts their phone face-down on the table and locks the screen, background capture must run as a compliant Android microphone Foreground Service with chunked disk flushing and battery-aware wake handling. On METRA, sessions run cleanly up to 30 minutes (Free), 90 minutes (Standard), or 180 minutes / 3 full hours (Pro) with consistent timestamps from start to finish. 2. Solving Far-Field Voices & Conference-Room Hum Boardroom microphones sit inches away from one speaker and ten feet away from another. Standard voice pipelines miss quieter speakers across the table or clip ambient HVAC/fan noise. In recent updates (v1.4.11), we tuned adaptive far-field utterance normalization paired with dynamic ambient noise-floor calibration so quiet far-table voices remain intelligible without turning air-conditioning hum into false speech segments. 3. Hybrid Local Capture + Post-Meeting Synthesis We split transcription into two complementary stages: - Live On-Device Capture (METRA On-Device Engine): Captures English speech privately right on the Android device — even in Airplane Mode — with 300 free offline minutes every month. - Post-Meeting Minutes of Meeting (METRA Super Intelligence): When the user taps Finish (or imports .m4a, .mp3, .wav, or .aac recordings), the full audio is cross-checked to refine context, handle bilingual code-switching (e.g., mixed English technical terms inside Vietnamese or global discussions), and generate structured Executive Summary, Decisions Made, and Action Items ready for 1-tap Word (.docx), PDF, or Markdown export. --- Free Tools & Open Templates (No Sign-Up Needed) If you want cleaner meeting minutes right away — even without installing the Android app — we made our core formatting utilities free: - Interactive Browser Tool (Word .doc, Markdown & Slack/Zalo export): METRA Free MoM Template Generator - Open-Source Markdown Templates on GitHub (EN + VN + Agile Sprint): tuyenht1993/free-meeting-minutes-templates - Android App (300m/mo free offline EN + 60m multilingual trial): METRA on Google Play How are you handling confidential in-person meeting notes on mobile right now? Feedback from Android devs and PMs is always welcome!
Programmatic China & SEA Sourcing: Comparing 1688 Wholesale, Goofish (闲鱼) & Lazada Prices in Python & n8n Cross-border sourcing teams spend hours every week tab-switching between 1688.com (China factory wholesale), Goofish / Xianyu (闲鱼) (China's largest secondhand & arbitrage marketplace), AliExpress, and Lazada (6 SEA markets) just to verify real supplier margins. Automating those platforms directly is notoriously brittle: login walls, captcha loops, mobile-only pricing, and region locks break homegrown Playwright scripts almost immediately. We built both sub-second Cloudflare Edge REST APIs (with free tiers on RapidAPI) and a zero-dependency bilingual (EN / 中文) SDK (pip install china-sourcing-sdk / npm i china-sourcing-sdk) plus ready-to-import n8n workflows. > Full disclosure: The MIT-licensed SDKs and n8n templates live under JiStudio at github.com/jistudio-dev, connecting to our hosted RapidAPI Edge APIs and Apify Store Actors (jistudio). --- 1. Live Edge REST APIs (Zero Cookie · Sub-500ms · Free Tier) You can call 1688, Goofish, and 6-country Lazada directly via standard HTTP without running any browser or proxy pool: - 1688 China Wholesale API (9 endpoints) — EN/CN search, 30-field SKU & tiered MOQ pricing, 40-image factory descriptions, live MOQ landed-cost calculator (/price-calculator), and 10-offer concurrent batching: Interactive Playground - Goofish (Xianyu / 闲鱼) API (10 endpoints) — keyword search with price/sort filters, Zhima seller credit intelligence, 8-listing batching, and automated resale arbitrage price analytics (/similar): Interactive Playground - Lazada 6-Country SEA API (13 endpoints) — VN, ID, TH, MY, PH, SG product detail by ID/URL/shortlink, LazMall bestsellers, unified storefront profiles, Q&A, LazLive, and official shortlink generator: Interactive Playground import requests # Calculate live 1688 tiered MOQ & landed USD cost for 100 units res = requests.get( "https://1688-china-wholesale-api.p.rapidapi.com/api/v1/1688/price-calculator", params={"offer_id": "769071810576", "quantity": 100, "shipping_per_unit_usd": 1.25}, headers={ "X-RapidAPI-Key": "YOUR_RAPIDAPI_KEY", "X-RapidAPI-Host": "1688-china-wholesale-api.p.rapidapi.com", }, timeout=15, ).json() print("Unit CNY:", res["breakdown"]["unit_price_cny"], "| Landed USD:", res["breakdown"]["landed_unit_cost_usd"]) --- 2. Bulk Multi-Platform SDK in Python (pip install china-sourcing-sdk) pip install china-sourcing-sdk from china_sourcing_sdk import ChinaSourcingClient client = ChinaSourcingClient() # reads APIFY_TOKEN env var # 1. Pull factory wholesale offers & MOQ from 1688 (English or 中文) factories = client.search_1688("wireless earbuds", max_items=5) # 2. Check global retail comps on AliExpress retail = client.search_aliexpress("wireless earbuds", max_items=5, country="US", currency="USD") # 3. Check China secondhand / arbitrage floor price on Goofish (闲鱼) resale = client.search_goofish("AirPods Pro", max_items=5) # 4. Check Southeast Asia retail comps on Lazada (vn, th, id, my, ph, sg) sea = client.search_lazada("wireless earbuds", country="vn", max_items=5) print(f"1688: {len(factories)} | AliExpress: {len(retail)} | Goofish: {len(resale)} | Lazada: {len(sea)}") --- 3. Node.js 18+ ESM Client (npm i china-sourcing-sdk) import { ChinaSourcingClient } from "china-sourcing-sdk"; const client = new ChinaSourcingClient(process.env.APIFY_TOKEN); const [wholesale, goofish] = await Promise.all([ client.search1688({ keyword: "机械键盘", maxItems: 5 }), client.searchGoofish({ keyword: "Sony A7C", maxItems: 5 }), ]); console.log("1688 factories:", wholesale.length, "| Goofish comps:", goofish.length); --- 4. Automated Sourcing Alerts in n8n (Free Templates) If your sourcing or e-commerce ops team runs n8n, import these pre-built templates directly: - 1688 Factory Wholesale Monitor: 05-1688-vs-aliexpress-margin-finder.json - Goofish (闲鱼) Secondhand Price Watch: 06-goofish-xianyu-resale-price-watch.json --- Resources - Documentation Hub: jistudio-dev.github.io - Bilingual SDK Repo (EN / 中文): jistudio-dev/china-ecommerce-sourcing-sdk - 9 Free n8n Templates: jistudio-dev/free-n8n-ecommerce-workflows - Hosted REST APIs (Free Tier): 1688 Wholesale · Goofish / Xianyu · Lazada 6-Country SEA - Bulk Cloud Scrapers (Apify): 1688 · Goofish · AliExpress · Lazada
Pinning text as a Live Activity is a clever use for Chars. I made a CLI that gives Debug builds an Xcode-beta-style icon, might help you tell builds apart. Would love feedback: MustafaNatur/blueprint
Script's done — then the real work starts: voiceover, subtitles, B-roll, music. FrameSkiff runs that whole pipeline on your own machine: local TTS, word-level subtitles, auto-matched visuals, CC0 music, MP4 out. Edit a line without redoing everything. hafung/LocalVideoFactory
Connect Claude Desktop & Cursor to Live TikTok Shop, Shopee & YouTube Transcripts via Zero-Dependency MCP Servers Most tutorials on the Model Context Protocol (MCP) stop at toy weather tools or local SQLite queries. Once you try connecting Claude Desktop or Cursor to live e-commerce and short-video data (TikTok Shop, Shopee, YouTube), you immediately run into cloud IP blocks, cookie expiry, and heavy node_modules dependency trees. We built and open-sourced three zero-dependency MCP servers (MIT licensed, pure Node.js 18+ node:readline + native fetch) so AI agents can pull real-time commerce and video data in seconds: 1. shopee-mcp-server — stdio JSON-RPC 2.0 server with 6 live tools across 8 Shopee markets (VN, ID, TH, PH, MY, SG, TW, BR). 2. tiktok-shop-mcp — Remote Streamable HTTP /mcp server + SDKs covering 43 TikTok & TikTok Shop endpoints across 22+ countries. 3. youtube-transcript-mcp — stdio JSON-RPC 2.0 server for cloud-IP-safe YouTube transcripts, .SRT subtitles, Top-5 Most-Replayed viral heatmap peaks, and cloud MP4/M4A downloads. > Full disclosure: All three MCP repositories are MIT-licensed under github.com/jistudio-dev and connect to our hosted RapidAPI and Apify backends (free tiers available). --- Architecture: Why Zero-Dependency stdio MCP Matters Instead of shipping 150 MB of transitive npm packages that break across Node versions, a standard MCP stdio server only needs ~160 lines of Node.js 18+ handling four JSON-RPC 2.0 methods: - initialize → declares protocolVersion: "2024-11-05" and capabilities: { tools: {} } - notifications/initialized → handshake ack - tools/list → exposes JSON Schema definitions for each tool - tools/call → executes native fetch() and returns structured JSON text content No npm install step. Clone, add your key, restart Claude Desktop or Cursor, and start prompting. --- 1. Setup Shopee Global MCP Server (8 Markets — 1-Line npx) { "mcpServers": { "shopee-global": { "command": "npx", "args": ["-y", "shopee-mcp-server"], "env": { "RAPIDAPI_KEY": "YOUR_RAPIDAPI_KEY" } } } } (Prefer cloning? git clone https://github.com/jistudio-dev/shopee-mcp-server.git and run node bin/shopee-mcp.mjs.) Prompts you can immediately run in Claude / Cursor: - "Check the live price, stock, and exact unrounded sold count for https://shopee.vn/product/37251933/41412722725." - "Pull the top 10 daily trending picks on Shopee Indonesia (id) and check buyer search keywords for serum." --- 2. Setup YouTube Transcript & Viral Heatmap MCP Server (Zero Cloud IP Blocks) If you have used youtube-transcript-api from AWS, GCP, or Vercel, you have likely seen YouTube block datacenter IPs. youtube-heatmap-mcp runs through Apify Cloud (jistudio/youtube-transcript-scraper) and returns full transcripts, .SRT captions, and the video's Top-5 Most-Replayed Heatmap peaks matched to exact spoken sentences: { "mcpServers": { "youtube-transcript-rag": { "command": "npx", "args": ["-y", "youtube-heatmap-mcp"], "env": { "APIFY_TOKEN": "YOUR_APIFY_TOKEN" } } } } Prompt idea: "Extract the transcript and Top-5 Most-Replayed heatmap peaks from this 45-minute podcast URL, then write 3 short-form clip hooks around the highest retention spikes." --- 3. Setup TikTok & TikTok Shop Remote MCP (/mcp) For TikTok & TikTok Shop (43 endpoints across 22+ countries: no-watermark HD MP4, Whisper VTT transcripts, TikTok Shop products, sellers, and trending US/SEA buyer keywords), copy configs/cursor_mcp.json directly — no local server process needed. --- Links & Next Steps - Shopee MCP Server: jistudio-dev/shopee-mcp-server - TikTok & Shop MCP + SDK + Postman: jistudio-dev/tiktok-shop-mcp - YouTube Transcript & Heatmap MCP: jistudio-dev/youtube-transcript-mcp - 9 Free n8n Templates: jistudio-dev/free-n8n-ecommerce-workflows
Las Vegas Nevada Property Listings Dataset (2026-07-23) 8736 Rows, Excel Spreadsheet Las Vegas, Nevada real estate listings as of 2026-07-23: 8736 rows in a single Excel spreadsheet, free to download. Dataset summary: - Coverage: 20 neighborhoods and suburbs, such as Las Vegas, Spring Valley, Paradise, and Paradise Town (ZIP codes NV 89004 to NV 89183). - Size: 8736 listings, one row each. - Property types: mostly Single Family Residence, Condominium, and Townhouse. - Price cuts: roughly 35% of the listings. - Fields: Address, neighborhood, ZIP code, price, price cut, beds, baths, square footage, property type, year built, MLS number, estimated monthly payment, listing URL, plus the remaining details from each listing. Full file, no paywall Download links: - GitHub: Las Vegas release, July 23, 2026
Google Crippled the Gmail MCP On Purpose Google Crippled the Gmail MCP On Purpose On November 24, 2026, Google made eight Workspace MCP servers generally available and quietly published an addendum to its API terms of service. The headline capability: AI agents can now read your Gmail, search your Drive, and check your Calendar through the Model Context Protocol — the open standard that was supposed to make every app interoperable with every agent. > 📖 Read the full version with charts and embedded sources on AgentConn → The buried detail: the Gmail MCP server can't send email. No send. No reply. No forward. Not even editing a draft. And starting February 1, 2027, any tool "driven by an AI agent" that touches Workspace data must route through these servers or Google's CLI. Direct REST API access for agents gets throttled to 5,000 requests per day.  Read the full Tech Stackups analysis → This hit the top of Hacker News within hours — 408 points, 328 comments of developers pointing out the obvious contradiction: Google adopted an open interoperability protocol, then crippled it at the exact point where agents would become genuinely useful. That contradiction is not an accident. It is the strategy. What the Gmail MCP Actually Ships Google's official Gmail MCP server documentation lists 30 tools. At first glance, the coverage looks comprehensive: search threads, read messages, create drafts, manage labels, apply filters. The OAuth scopes requested — gmail.readonly, gmail.compose, and gmail.modify — suggest full read-write capability. But the gap between what the documentation lists and what developers can actually use is where the story lives. > What Google's Gmail MCP Can Do (Public Access) > - Search threads and messages > - Read message content and metadata > - List and get drafts > - Create drafts (no attachments) > - Create, update, and apply labels > - Trash and untrash messages > - Mark/unmark spam > - Create filters > > What Requires "Partner Access" (Not Generally Available) > - Send messages > - Reply to messages > - Forward messages > - Edit existing drafts > - Download attachments > - Push notifications The send, reply, and forward tools exist in the documentation — they are listed on the MCP reference page. But as Al Smith's deep analysis for Tech Stackups revealed, Google's quota page states these "require partner access and aren't generally available." The documentation shows the tools. The terms gate them behind a partnership program with no published eligibility criteria. It is not just Gmail. Drive's MCP server cannot move, rename, share, or trash files. Calendar cannot create new calendars or manage sharing settings. The pattern is consistent: read and organize are free; act and produce require partner status. {% youtube mgARLKganVo %} The February 2027 Mandate: Use Our MCP or Get Throttled The Gmail limitation alone would be a nuisance. The February 2027 mandate makes it a chokepoint. Google's new Workspace AI Tools Addendum defines three categories: "AI Agent," "AI Harness," and "GWS Access Point." The definitions are broad enough to cover connectors, proxies, CLI wrappers, and anything else that sits between an AI model and Workspace data. From February 1, 2027: - AI agents must use MCP or the Workspace CLI. Direct REST API calls from agentic tools fall to Standard-tier quotas — 5,000 MCP requests per day, per project, per product. - A single Gmail search costs 10 quota units. At Standard tier, that caps an agent at roughly 500 searches per day before throttling kicks in. - Scaled tier requires Google Cloud billing. Starting April 1, 2027, MCP usage on the Scaled tier is billed from the first request — no daily free allowance, unlike REST APIs which get generous no-charge buffers. - Data retention is capped. Agent builders must delete Workspace data on disconnect. Embeddings, memory indexes, and "Google Technical Information" face a 30-day retention cap. - Training on Workspace data is banned. No fine-tuning, no building competing products from Workspace-derived data. The practical effect: if you are building an agent that works with Gmail, you can read email and create drafts nobody can send. To do anything useful — the actual actions that make agents valuable — you need partner access that Google has not opened to the public, or you route through SMTP with its own rate-limiting and abuse-detection gauntlets. > ⚠️ The Two-Tier System in Practice > > Anthropic's Google Workspace connector — available to Claude Enterprise, Pro, Max, and Team users — advertises sending and replying. Independent developers using the same OAuth scopes on the same endpoint cannot. Partners get the full toolbox. Everyone else gets a read-only window into their own data. What the Community Is Saying The Hacker News thread captured the developer frustration in real time. At 408 points, it was the fifth-highest story on the site — a signal that this hit a nerve beyond the MCP niche.  View the full discussion on Hacker News → The discussion on X mirrored the same frustration, with developers questioning Google's MCP strategy and its implications for the agent ecosystem:  View the discussion on X → "This won't even work" — The top-voted comment, from user Schnitz, cut to the core: "People will just have the agent operate a browser to send email and it'll be unnecessarily messy and wasteful." The irony is sharp. Google's restriction does not prevent agents from sending email — it just forces them through slower, less reliable, more resource-intensive channels. The broader developer discourse on Google's Workspace MCP approach tracks the same concerns:  View the discussion on X → "MCP already has a primitive for this" — User perdy pointed out that MCP's elicitation mechanism was designed exactly for this use case: pausing a tool call to get human confirmation before executing a high-impact action like sending email. Google could gate sends behind a human-in-the-loop confirmation. Instead, they removed the tool entirely for public developers. "It's a business decision" — TimByte connected the dots: Gmail already has push confirmations and 2FA for human verification. The technical infrastructure for safe agent-initiated sends exists. The gap is not about security engineering. It is about who gets to build on Gmail. The debate over whether elicitation makes agent sends safe enough — or whether Google's caution is genuine — was one of the thread's most active sub-discussions:  View the full elicitation debate on HN → "Draft-only is barely better than plain text" — User knollimar captured the developer experience of an agent that can compose a perfect email and then... create a draft you have to send manually. At that point, the agent is a text generator with extra steps. On Google's own developer forum, the friction goes deeper than tools. A developer documented the authorization maze required just to read files via the Drive MCP: creating GCP projects, configuring OAuth clients, navigating "Testing" status blocks that throw Error 403: access_denied, dealing with PKCE errors when bypassing the browser flow. Their summary: all of this "just to perform basic file reading."  View the developer complaint on Google's AI forum → The Lock-In Thesis: Open Protocol, Closed Implementation Here is what others are missing in the coverage: this is not a Gmail problem. It is a platform strategy pattern that Google has executed before. The Model Context Protocol was designed to be the universal adapter between AI agents and the services they interact with. Anthropic donated it to the Linux Foundation's Agentic AI Foundation in December 2025 specifically to prevent any single vendor from controlling the standard. MCP is open. The protocol layer is neutral. But Google's implementation of MCP is not neutral. By routing all agent access through its own managed servers, Google gains: 1. Tool-level gatekeeping. Google decides which MCP tools are public and which require partnership. The protocol is open; the implementation is permissioned. 2. Quota asymmetry. Standard-tier agents hit a 5,000 request/day ceiling. Scaled-tier agents pay from request one. REST apps serving the same use case without AI get more generous free allowances. The pricing penalizes agent-based workflows specifically. 3. Data governance as a moat. The 30-day retention cap on "Google Technical Information" means agent builders cannot build durable context from Workspace data. Your agent forgets everything about the user's email patterns, organizational context, and communication preferences every month. Unless, of course, you are building inside Google's ecosystem, where Gemini trains on that same data to personalize Gmail features. 4. Mandatory migration with no fallback. By February 2027, agents cannot use REST at scale. The only path to full functionality is through Google's MCP servers. The only path to send/reply/forward is through Google's partner program. The fallback — SMTP — is subject to Google's separate abuse detection, which has flagged legitimate use cases as spam with multi-month account suspensions. As the O'Reilly Radar analysis of MCP noted: "as models commoditize, competition moves to the application layer, where user and project data creates a flywheel." Google's Workspace data — billions of emails, documents, calendars — is the ultimate application-layer moat. MCP was supposed to make that data accessible. Google's implementation makes it accessible on Google's terms.  Read the Futurum Group CIO analysis → The Futurum Group put it in CIO terms: "Standardizing memory handling gives vendors a powerful new control point — one that could either remain open or become a source of strategic lock-in." Google chose door number two. Contrarian Corner: Maybe Google Is Right to Be Cautious > ⚠️ The security case for restricting agent sends is real. Email is the highest-risk agent surface. A prompt injection attack that tricks an agent into forwarding sensitive email to an attacker is not theoretical — it is the first exploit every security researcher tests. Google's own documentation warns about "indirect prompt injection from untrusted emails" and recommends screening with Model Armor. > > The staged rollout argument goes: start with read-only, observe abuse patterns, expand capabilities to partners who have demonstrated responsible use, then open to everyone. It is the same playbook Google used with Gmail API scopes — broad access initially, then tightening after abuse. > > But the counter-counter is damning: MCP has built-in elicitation for exactly this. A send tool gated behind a human confirmation prompt is safer than no send tool — because without it, developers route through SMTP, browser automation, or App Script, all of which bypass the audit trail Google claims to want. The Bigger Pattern: Interop Signaling vs. Lock-In Reality Google's MCP strategy fits a pattern the DEV Community has been tracking: "The plumbing is common, but the water flowing through it only comes from our faucet." Consider the precedent. In 2025, Slack restricted API access for non-Marketplace apps and banned bulk LLM exports. The line Slack drew was distribution channel — if you were not in the Marketplace, you did not get full access. Google is drawing a more expansive line: if your software is AI, it goes through different infrastructure with different limits and different pricing. The Forkast analysis adds a timing concern: Google shipped production MCP support in Apigee API Hub before the spec was even finalized. Early movers who build against Google's implementation may find themselves locked into decisions that diverge from the official standard. And Google's Cloud API Registry shutdown, scheduled for July 30, 2026, pushes developers to its Agent Registry — a forcing function toward Google's ecosystem that the independent MCP community has no equivalent for. This is not unique to Google — the pattern is visible across the industry. But Google's position is uniquely powerful because Workspace sits at the center of enterprise communication and productivity. When Google gates agent actions behind partnerships and billing, it is not gating access to a niche API. It is gating access to where work happens. What Builders Should Do Now If you are building agent tooling that touches Gmail or other Workspace services, the clock is ticking. Here is what the mandate means in practice: Before February 1, 2027: 1. Audit your Workspace integrations. If any of your tools are or could be classified as "AI-driven," they fall under the new addendum. The definitions are broad. 2. Create agentic OAuth clients. Since November 11, 2026, MCP servers reject clients without the agentic flag. Clients created before the cutoff stay non-agentic — you need new ones. 3. Apply for partner access early. Google has not published eligibility criteria, but the application window narrows as the mandate date approaches. 4. Architect for the gap. If your agent needs to send email, build the UX around draft creation with explicit user send actions. It is not ideal, but it is the only reliable public path. Before April 1, 2027: 5. Budget for Scaled tier if needed. MCP billing starts from the first request — no free allowance. A Gmail search costs 10 quota units, so budget accordingly. 6. Implement data retention compliance. The 30-day cap on Google Technical Information means redesigning any caching, embedding, or memory layer that touches Workspace data. {% youtube hcKHtZp4Mtw %} The alternative path: Community-built MCP servers like brettadams0/google-workspace-mcp or the now-archived GongRzhe/Gmail-MCP-Server use the full gmail.modify scope and can send email. But they route through REST, which means Standard-tier quotas after February 2027. And the Workspace AI Tools Addendum's broad definitions may bring them under compliance requirements regardless. > ℹ️ The Bottom Line for Agent Builders > > Google gave MCP just enough Gmail access to check the interoperability box — search, read, label, draft — while ensuring that the capabilities that make agents genuinely productive (send, reply, forward) remain gated behind partnerships. It is interop signaling without interop substance. The Feb 2027 mandate locks this arrangement in by removing the REST fallback. > > If your agent strategy depends on Gmail, you are now building on a foundation where Google controls both the ceiling and the floor. Looking Forward: The Agent Access Cold War Google's Gmail MCP is a preview of a broader tension the agent ecosystem will face across every major platform. The question is not whether platforms will adopt MCP — they will, because the interoperability signal is valuable. The question is whether "MCP support" will mean full tool access or a curated subset that protects platform revenue. Watch for this pattern at Microsoft (Outlook and Graph API agent access), Salesforce (CRM agent tooling), and anywhere else enterprise data meets the agent layer. The platforms that control where work happens will use agent access tiers — not protocol incompatibility — as the new lock-in mechanism. MCP solved the protocol problem. It did not solve the power problem. Google's Gmail MCP proves that an open standard can be weaponized through implementation. The protocol is open. The useful parts are gated. And the mandate ensures there is no way around the gate. For agent builders, the lesson is clear: protocol interoperability is necessary but not sufficient. The real question is not "does the platform support MCP?" It is "does the platform expose the tools that matter?" For Gmail, as of November 2026, the answer is: only if Google says so. --- Related reading on AgentConn: - The A2A vs MCP Interop War — How Google and Anthropic are drawing the lines in agent protocol competition - MCP Ships Skills and Tasks. The 3-Second Problem Remains. — Anthropic's latest MCP upgrades and what they still do not solve - Skills vs MCP: The Auth Gateway Architecture — Why authentication remains MCP's weakest link - The Harness Wars: Agent Orchestration Lock-In — Where the real lock-in battle is happening Originally published at AgentConn
GENAI Web 1.3.4 and outbound request control for self-hosted LLM tools GENAI Web 1.3.4 and outbound request control for self-hosted LLM tools GENAI Web versions before 1.3.4 contain a server-side request forgery vulnerability tracked as CVE-2026-131916. JVN published the advisory on November 25, 2026. The application is a self-hosted interface for generative-AI workflows, which makes its network position important: it may run inside a research network with access to model servers, document stores and internal APIs. SSRF occurs when an application fetches a URL chosen by an untrusted party and returns or acts on the response. In an AI interface, the trigger may be a model endpoint, file source, web retrieval feature or plugin configuration. The vulnerability description confirms that the application can be made to issue a server-side request. It does not establish which internal service an attacker can read or whether exploitation has occurred. The blunt defense is to block all outbound traffic. That usually breaks legitimate integrations. A workable design separates destinations into classes. Public web retrieval uses a proxy that resolves and connects to allowed internet addresses. Internal model APIs use a fixed service name and port. Administrative functions have no outbound path at all. The application should not inherit the host's unrestricted network route. URL validation needs to occur at the connection layer. A parser should reject credentials in the authority, non-HTTP schemes, malformed numeric hosts and unexpected ports. The fetcher should resolve the hostname, reject loopback, private, link-local and multicast ranges, and recheck every redirect. Timeouts and response-size limits prevent a slow internal endpoint from becoming a denial-of-service source. Cloud environments add metadata addresses and control-plane endpoints. A container policy should deny those destinations even if application validation fails. NetworkPolicy, firewall rules or an egress gateway should allow only the named destinations required by the deployment. Logs should record the requested host, resolved address, status and policy decision without storing prompt content or authorization headers. The prompt layer is not an access-control layer. A model may ask for a URL, and a user may paste one, but the tool adapter decides whether to fetch it. Tool adapters should carry an explicit purpose, such as public_web_fetch, with a policy attached. A generic request tool should not be available to a workflow that only needs a fixed model endpoint. Administrators should update to v1.3.4 and review existing connector settings. Check whether saved URLs point to private ranges, container names or metadata services. Rotate any credentials that were reachable from the application if logs show suspicious outbound requests. Restrict the service account so a successful SSRF does not also provide cloud permissions. The release note states the fixed version, while the security value comes from the deployment boundary around it. Self-hosted AI tools sit between users, models and enterprise data. They need the same egress review as a webhook service or an automation platform. References - JVN#78929433: GENAI Web server-side request forgery - GENAI Web v1.3.4 release - CVE-2026-131916 CVE record
做了一个 100% 本地的 Chrome 浏览记忆插件:关掉未读标签不怕忘,支持按正文关键词找回(无需账号) 平时写代码、看文档、刷技术文章,Chrome 经常一开就是四五十个标签页。 试过 OneTab、Session Buddy 和各种稍后阅读,一直有两个卡点没解决: 1. 浏览器自带历史记录只能搜标题和 URL,搜不到正文。经常记得上周看过一段关于某个报错或设计思路的话,但死活想不起标题和网站。 2. 不想为了记几个网页注册云端账号、把浏览记录上传到别人服务器,也不喜欢点一下就把所有打开的标签全收成一团列表。 于是自己用原生 ES Modules + IndexedDB + Mozilla Readability 写了这个小插件 「拾页(Shiye)」,目前已上架 Chrome Web Store: - 官网与在线演示: shiye.app - Chrome 商店安装: chromewebstore.google.com - 源码(开源可查): bearcatty/page-memory !拾页演示 核心做了什么 - 历史标签记忆(主动开启):打开后记录当前和后续普通标签的链接、标题和打开时间。放心关掉标签,日后按日期、网站或待处理状态找回,不会强行替你关闭或清屏。 - 本机正文存档与全文检索(按需授权):默认点击插件图标才保存当前页;如果你希望像“外接大脑”一样自动记录,可以在设置里单独开启全站自动保存(使用 optional_host_permissions,安装本身不申请全站权限)。搜索跑在 Web Worker 里,支持中文片段、英文拼写容错和正文片段高亮。 - 完全本地、随时带走:数据全在当前浏览器 IndexedDB,无需账号、无 API Key、无默认遥测;支持随时暂停、域名排除、删除后防自动回填、以及完整 JSON 导出/导入。 坦诚说说目前没做什么(边界) - 没有云同步、没有大模型问答/向量搜索(摘要是本地正文摘录,搜索是关键词模糊匹配)。 - 仅支持普通 HTTP(S) 网页,不支持隐身窗口和浏览器内置 PDF;默认排除了 Gmail/Outlook,网银和内部系统建议按需加入排除名单。 目前刚更新到 0.4.3,真实用户很少,非常想听听 V 友们的真实吐槽: 1. 你平时是怎么处理几十个未读标签的? 2. 装完前 3 分钟有没有哪里觉得别扭、或者最缺哪个功能(比如自动本地备份、更强的模糊搜索、还是跨设备同步)? 每一条建议我都会认真看和修,感谢试用!
I'm not a developer but this is what @ottonomy.bsky.social put together for the Scottish Digital Badges proof of concept earlier this year: dynamicskillset/digital-badges-poc
すごそうなMOD見つけた。バージョン合わないから私は使えないけど。 Dolphin-kun/YMM4Craft
Editable QR codes after printing is a smart touch in Linker. I made a CLI that gives Debug builds an Xcode-beta-style icon, might help with your iOS app. Tell me what's missing: MustafaNatur/blueprint
Unkernel: Compile Linux 6.9 para WebAssembly e execute server‑less Unkernel: Como compilar o Linux 6.9 para WebAssembly e rodar em ambientes server‑less Introdução O Unkernel – um fork do Linux 6.9 que gera um módulo WebAssembly – está transformando a forma como desenvolvedores executam workloads de baixo nível direto no navegador, em plataformas de edge e em pipelines de CI/CD. Depois que o post viral no Hacker News disparou buscas por “WebAssembly Linux”, “Unkernel” e “Linux WASM”, a comunidade pediu um guia prático, com comandos reais, comparação de custos e dicas de produção. Neste artigo você encontrará tudo o que precisa para compilar, empacotar e colocar o Unkernel em produção de maneira segura e econômica. --- 1. O que é o Unkernel? - Fork do kernel Linux 6.9 com patches que permitem gerar um módulo Wasm a partir do código‑fonte padrão. - O kernel inteiro – rede, syscalls, drivers básicos – roda como um módulo WebAssembly dentro de qualquer runtime compatível (Wasmtime, Wasmer, Node.js, Cloudflare Workers, Fastly Compute@Edge, etc.). - Ideal para micro‑serviços stateless, ambientes de CI/CD isolados e aplicações que precisam de acesso direto ao kernel sem abrir uma VM completa. --- 2. Preparando o ambiente # Instale as dependências básicas sudo apt-get update && sudo apt-get install -y build-essential clang libssl-dev bison flex libelf-dev # Instale o Wasmtime (runtime recomendado para performance) curl https://wasmtime.dev/install.sh -sSf | bash export PATH=$HOME/.wasmtime/bin:$PATH # Ou, se preferir Wasmer curl https://get.wasmer.io -sSfL | sh export PATH=$HOME/.wasmer/bin:$PATH > Dica: Wasmtime costuma ser ~10 % mais rápido em syscalls intensivas, mas Wasmer oferece mais plugins (e.g., wasmer-wasi) e suporte a SIMD. --- 3. Compilando o Linux 6.9 para Wasm # 1️⃣ Clone o repositório do Unkernel git clone https://github.com/unkernel/unkernel.git cd unkernel # 2️⃣ Checkout da versão 6.9 git checkout v6.9 # 3️⃣ Configure a compilação para Wasm make defconfig-wasm # usa o config padrão adaptado make menuconfig # opcional: ajuste drivers e subsistemas # 4️⃣ Compile (usa clang + target wasm32-wasi) make -j$(nproc) CC=clang \ CFLAGS="-target wasm32-wasi -O3 -flto" \ LDFLAGS="-target wasm32-wasi -Wl,--no-entry -Wl,--export-all" O artefato resultante será vmlinux.wasm (≈ 30 MB). --- 4. Empacotando como imagem Docker (para CI/CD) # Dockerfile minimalista FROM scratch COPY vmlinux.wasm /vmlinux.wasm ENTRYPOINT ["/usr/local/bin/wasmtime", "/vmlinux.wasm"] docker build -t unkernel:6.9 . docker run --rm -it unkernel:6.9 --help # verifica a lista de syscalls disponíveis Essa imagem pesa menos de 40 MB, permitindo execuções rápidas em runners como GitHub Actions ou GitLab CI. --- 5. Escolhendo o runtime para produção | Runtime | Vantagens | Quando usar | |---------|-----------|-------------| | Wasmtime | JIT/AOT, suporte nativo a async‑await, melhor latência | Serviços de alta performance, edge com WASI 1.0 | | Wasmer | Ecossistema de plugins, wasmer pkg, suporte avançado a SIMD | Aplicações que precisam de extensões (e.g., wasmer-emscripten) | | Node.js (wasm‑node) | Integração fácil com código JavaScript/TypeScript | Prototipagem rápida ou front‑ends que já rodam Node | Exemplo de execução no Cloudflare Workers: addEventListener('fetch', event => { event.respondWith(handleRequest(event.request)) }) async function handleRequest(request) { const { default: unkernel } = await import('./vmlinux.wasm') const result = await unkernel.run(/* args */) return new Response(`Unkernel output: ${result}`) } --- 6. Segurança e isolamento - Sandbox Wasm: memória isolada, verificação de tipos em tempo de compilação. - Políticas adicionais: combine Wasm com seccomp e SELinux dentro do Unkernel para bloquear syscalls não necessárias. - Exemplo de política seccomp: cat > seccomp.json <<'EOF' { "defaultAction": "SCMP_ACT_ERRNO", "syscalls": [ {"name": "read", "action": "SCMP_ACT_ALLOW"}, {"name": "write", "action": "SCMP_ACT_ALLOW"}, {"name": "exit", "action": "SCMP_ACT_ALLOW"}, {"name": "clock_gettime", "action": "SCMP_ACT_ALLOW"} ] } EOF wasmtime run vmlinux.wasm --env SECURE=1 --seccomp=seccomp.json --- 7. Comparativo de custos | Ambiente | Custo médio (por 1 M invocações) | Memória usada | Observação | |----------|----------------------------------|---------------|------------| | VM 1 vCPU (t2.micro) | US$ 20,00 | 1 GB | Tempo de start‑up > 2 s | | Docker (container Linux) | US$ 12,00 | 512 MB | Overhead de Docker daemon | | Unkernel (Wasmtime) em Cloudflare Workers | US$ 1,80 | 128 MB | Cobrança por invocação + GB‑s, latência < 50 ms | Resultado: substituindo VMs por Unkernel em edge pode reduzir o gasto em até 85 %. --- 8. Casos de uso reais 1. CI/CD de compilação cruzada – pipelines que precisam validar drivers Linux em ambientes isolados. 2. Funções de análise de pacotes de rede – o subsistema de rede do Unkernel roda dentro de um Worker, processando milhões de pacotes por dia sem precisar de NIC física. 3. Sandbox de execução de código de terceiros – plataformas de educação que permitem que alunos rodem código C dentro de um kernel completo, mas totalmente isolado. --- 9. Checklist para colocar em produção - [ ] Compilar o kernel com apenas os drivers necessários (reduz tamanho). - [ ] Testar localmente com wasmtime run vmlinux.wasm --invoke <syscall>. - [ ] Criar imagem Docker mínima (scratch) e validar no CI. - [ ] Definir políticas seccomp/SELinux adequadas. - [ ] Medir latência e custo em ambiente de edge (ex.: Cloudflare Workers). - [ ] Monitorar logs de syscalls via wasmtime --trace=syscalls. --- Conclusão O Unkernel abre caminho para executar o Linux completo como um módulo WebAssembly, trazendo performance, baixo custo e segurança para workloads que antes exigiam VMs ou containers pesados. Seguindo os passos acima, você pode compilar o kernel 6.9, empacotar em Docker, escolher o runtime ideal e implantar em edge ou CI/CD com confiança. Experimente, ajuste as políticas de segurança e aproveite a economia de até 85 % que o modelo server‑less oferece. Pronto para colocar o Linux na nuvem como Wasm? 🚀 --- Herramienta mencionada: GitHub Copilot
TypeScript `emitDecoratorMetadata` Is Dead in 2026: What Replaces It for DI Frameworks and ORMs TypeScript emitDecoratorMetadata Is Dead in 2026: What Replaces It for DI Frameworks and ORMs > _This article was written with the assistance of AI, under human supervision and review._ TypeScript 5.0 shipped standard decorators in March 2023, and three years later the ecosystem split is clear. The emitDecoratorMetadata compiler flag only works with legacy decorators enabled via experimentalDecorators. Standard decorators ignore the flag entirely because the TC39 proposal omitted type-directed metadata from the specification. Frameworks like NestJS, TypeORM, and InversifyJS rely on runtime type reflection to wire dependencies, and that reflection depends on emitDecoratorMetadata emitting design:type, design:paramtypes, and design:returntype keys that the reflect-metadata polyfill reads. Without it, the constructor argument @Inject(UserService) private users: UserService has no way to know that UserService is the type at runtime. The choice facing teams is to stay locked in legacy mode or migrate to manual metadata patterns that standard decorators support. !A decorator tries to read parameter types, finds nothing, and silently injects the wrong dependency A decorator tries to read parameter types, finds nothing, and silently injects the wrong dependency The solution is to use context.metadata in standard decorators and populate it manually with the type information the framework needs. The decorator receives a metadata object that persists across the class and its members, and frameworks can store tokens, type identifiers, or factory functions there. The runtime cost moves from automatic compiler emit to explicit developer authorship, but the result is portable, debuggable, and compliant with the JavaScript standard. !A decorator writes a token to context.metadata, and the container reads it to inject the correct type A decorator writes a token to context.metadata, and the container reads it to inject the correct type Key Takeaways - emitDecoratorMetadata only works with legacy decorators (experimentalDecorators: true); standard decorators ignore it. - NestJS, TypeORM, and InversifyJS depend on runtime type reflection that emitDecoratorMetadata provided automatically. - Standard decorators use context.metadata to store arbitrary metadata, but developers must populate it manually. - Teams can stay in legacy mode until 2027 or migrate to explicit token-based dependency injection patterns. - The TypeScript roadmap shows no plans to revive automatic type metadata for standard decorators. Why emitDecoratorMetadata Is Dead: The TC39 Standard Doesn't Support It The TypeScript 5.0 release notes introduced standard decorators as the default behavior when experimentalDecorators is not set. These decorators follow the TC39 stage 3 proposal that JavaScript adopted in 2022. The proposal deliberately excluded type-directed metadata because JavaScript has no static type system, and the committee decided not to introduce a TypeScript-specific runtime feature into the language standard. The emitDecoratorMetadata flag depends on TypeScript's compile-time type information to generate Reflect.metadata calls that store design:type, design:paramtypes, and design:returntype on decorated members. Standard decorators receive a context object with a metadata property, but the compiler does not populate it with type information. The TypeScript handbook on decorators documents the legacy behavior but notes that standard decorators are the future. The practical consequence is that any codebase using emitDecoratorMetadata to enable automatic dependency injection, ORM column type inference, or validation metadata must either enable experimentalDecorators or rewrite those decorators to use context.metadata with explicit type tokens. The flag still works in TypeScript 5.9, but it only activates when experimentalDecorators: true appears in the tsconfig.json. Without that flag, the compiler ignores emitDecoratorMetadata and emits no metadata calls. TypeScript 5.0 deprecated several compiler options, but emitDecoratorMetadata was not among them because the team left legacy decorators intact for backward compatibility. The 5.0 release notes list --target: ES3, --out, --noImplicitUseStrict, and several others as deprecated with a removal timeline ending in TypeScript 5.5, but legacy decorators and emitDecoratorMetadata remain supported indefinitely. The distinction is that deprecated options trigger a warning and have a scheduled removal date, while legacy decorators are a parallel feature that the compiler maintains for compatibility with the existing ecosystem. Teams can suppress the warnings for other deprecated features by adding "ignoreDeprecations": "5.0" to their tsconfig, but no such warning exists for emitDecoratorMetadata because it is not deprecated in the same sense. The death of emitDecoratorMetadata for standard decorators is a consequence of the TC39 proposal's design, not a TypeScript team decision. The proposal includes a separate metadata mechanism (Symbol.metadata) that decorators can use to attach arbitrary data to a class, but the compiler does not automatically populate that symbol with type information. Developers must write the metadata themselves. !Developer reviewing TypeScript decorator migration plan on a monitor Developer reviewing TypeScript decorator migration plan on a monitor What emitDecoratorMetadata Actually Did: Type Metadata at Runtime The emitDecoratorMetadata flag tells the TypeScript compiler to emit calls to Reflect.metadata for every decorated member, storing the design-time type as runtime metadata. When you decorate a class property, method, or constructor parameter, the compiler inserts three metadata keys: design:type for the member's declared type, design:paramtypes for function parameter types (as an array), and design:returntype for function return types. These keys are only emitted if the reflect-metadata library is imported, because the library provides the Reflect.metadata and Reflect.getMetadata functions that the generated code calls. Here is what the compiler generates for a decorated property: class User { @Column() name: string; } // Compiled output with emitDecoratorMetadata: true var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { /* ... */ }; var __metadata = (this && this.__metadata) || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; class User { constructor() {} } __decorate([ Column(), __metadata("design:type", String) ], User.prototype, "name", void 0); The __metadata("design:type", String) call stores the type String on User.prototype under the key design:type for the property name. A framework like TypeORM can later read this metadata with Reflect.getMetadata("design:type", User.prototype, "name") to infer that the name column should map to a VARCHAR database type. Without emitDecoratorMetadata, the compiler omits the __metadata call, and Reflect.getMetadata returns undefined. Constructor parameter decorators work the same way, but they store an array of types in design:paramtypes. Dependency injection frameworks read this array to resolve constructor arguments: class UserService { constructor(@Inject() private repo: UserRepository) {} } // Compiled output with emitDecoratorMetadata: true __decorate([ __param(0, Inject()), __metadata("design:paramtypes", [UserRepository]) ], UserService); The __param(0, Inject()) call applies the @Inject decorator to the first constructor parameter, and __metadata("design:paramtypes", [UserRepository]) stores an array containing the UserRepository constructor function. The DI container calls Reflect.getMetadata("design:paramtypes", UserService) at runtime to discover that the first argument requires a UserRepository instance, then looks up or instantiates that dependency and passes it to the constructor. The metadata is stored on the target object using the reflect-metadata library's internal map. The library polyfills a proposed JavaScript feature that never made it into the standard, so the metadata only exists in memory and is not visible in the prototype chain without calling Reflect.getMetadata. The emitted metadata keys follow a convention (design:type, design:paramtypes, design:returntype), and frameworks agree on this convention to interoperate. The decorators handbook describes this behavior in the Metadata section, noting that the feature is experimental and depends on the reflect-metadata polyfill. The cost of emitDecoratorMetadata is that the compiler must resolve every type annotation on every decorated member. For large codebases with many decorators, this can slow down compilation. The Trigger.dev documentation mentions this performance tradeoff and recommends enabling the flag only when an ORM or DI framework requires it. The flag does not affect type safety at compile time; it only changes what the compiler emits at runtime. The Migration Path: Symbol.metadata and context.metadata in Standard Decorators Standard decorators receive a context object as the second argument, and that context includes a metadata property of type Record<PropertyKey, unknown>. The metadata object is shared across all decorators on the same class, so a decorator can write a value to context.metadata and a later decorator or the class itself can read it. The TypeScript 5.0 release notes explain that this metadata is attached to the class via Symbol.metadata, a new well-known symbol that the decorator proposal introduced. The difference from legacy decorators is that the compiler does not populate context.metadata automatically. Developers must write the type information themselves. Here is how a standard decorator stores a type token: function Inject(token: symbol) { return function (target: any, context: ClassFieldDecoratorContext) { context.metadata[context.name] = token; }; } const USER_SERVICE = Symbol("UserService"); class AppController { @Inject(USER_SERVICE) private users: any; } The @Inject(USER_SERVICE) decorator writes the symbol USER_SERVICE to context.metadata under the key "users". A DI container can later read AppController[Symbol.metadata]["users"] to retrieve the token and resolve the dependency. The type annotation users: any is not reflected at runtime because the compiler does not emit metadata for it. The token USER_SERVICE is the runtime identifier the developer must supply. For constructor parameters, standard decorators do not support parameter decorators at all. The TC39 proposal removed parameter decorators from the specification because they introduced complexity that the committee decided was not worth the tradeoff. Frameworks that rely on parameter decorators must either stay in legacy mode or refactor to use property injection or factory functions. NestJS and InversifyJS both depend heavily on parameter decorators, so they cannot migrate to standard decorators without a breaking rewrite. One migration pattern is to use a class field initializer with a factory function: class UserService { private repo = inject(UserRepository); } The inject function reads from a container at runtime and returns an instance of UserRepository. This pattern avoids decorators entirely and works with standard JavaScript, but it requires the container to be initialized before the class is instantiated. The tradeoff is that the dependency is resolved at construction time rather than at container setup time, which can introduce circular dependency issues if two services inject each other. Another pattern is to use a static metadata property that the class itself defines: class UserService { static dependencies = [UserRepository]; constructor(private repo: UserRepository) {} } The DI container reads UserService.dependencies to resolve constructor arguments. This pattern is explicit and type-safe but verbose, and it duplicates the type annotation from the constructor signature. The advantage is that it works in both legacy and standard decorator modes and does not depend on compiler flags. The migration path depends on whether the codebase can tolerate the loss of parameter decorators and automatic metadata. For greenfield projects, explicit token-based patterns are the recommended approach. For existing projects with heavy decorator usage, staying in legacy mode is the pragmatic choice until the ecosystem provides migration tooling or the frameworks themselves ship standard-decorator versions. What This Means for NestJS, TypeORM, and InversifyJS: The Legacy Decorator Lock-In NestJS, TypeORM, and InversifyJS all depend on emitDecoratorMetadata to enable their decorator-based APIs. These frameworks read the design:paramtypes metadata at runtime to resolve constructor dependencies without requiring developers to specify tokens explicitly. This design makes the API concise but locks the framework to legacy decorators. | Framework | Decorator usage | Metadata dependency | Standard decorator support (2026) | |-------------|---------------------------------------------------|--------------------------------------------|-----------------------------------| | NestJS | @Injectable(), @Inject() on parameters | design:paramtypes for DI resolution | None; requires experimentalDecorators | | TypeORM | @Entity(), @Column() on properties | design:type for column type inference | Partial; @Column({ type }) works | | InversifyJS | @injectable(), @inject() on parameters | design:paramtypes for DI resolution | None; requires experimentalDecorators | !A framework checks if it uses parameter decorators, stays in legacy mode if yes, considers migration if no A framework checks if it uses parameter decorators, stays in legacy mode if yes, considers migration if no NestJS uses @Inject() on constructor parameters to specify a token when the type cannot be inferred or when the developer wants to override the default behavior. The framework reads design:paramtypes to auto-wire dependencies when no token is provided. This feature is the core value proposition of the framework's DI system, and removing it would break backward compatibility with every existing NestJS application. The NestJS team has not announced a timeline for standard decorator support as of 2026. TypeORM decorates entity properties with @Column(), @PrimaryGeneratedColumn(), and similar decorators that infer the database column type from the TypeScript type annotation. The framework reads design:type to map string to VARCHAR, number to INTEGER, and so on. This inference is optional; developers can specify the type explicitly with @Column({ type: "varchar" }). A codebase can migrate to standard decorators by adding explicit type annotations to every column decorator, but that is a large and error-prone refactor. The TypeORM team has discussed standard decorator support but has not committed to a release date. InversifyJS is the most heavily dependent on parameter decorators because its entire API is built around @inject(TOKEN) applied to constructor parameters. The framework does not support property injection or factory-based patterns as first-class citizens, so migrating to standard decorators would require a complete redesign of the library. The InversifyJS maintainers have stated that they will continue to support legacy decorators indefinitely and have no plans to migrate to the standard. The lock-in creates a compatibility problem for teams that want to adopt standard decorators for other reasons, such as interoperability with non-TypeScript tools or compliance with JavaScript language standards. A codebase that uses NestJS or InversifyJS cannot enable standard decorators without breaking the framework. The only option is to run two separate TypeScript configurations: one with experimentalDecorators: true for framework code and one without it for other modules. This configuration is fragile and complicates build tooling. !TypeScript configuration file showing experimentalDecorators setting TypeScript configuration file showing experimentalDecorators setting Building Type-Safe DI Without emitDecoratorMetadata: Practical Patterns for 2026 Teams that want to adopt standard decorators without waiting for framework support can implement dependency injection manually using explicit token registration. The pattern centers on a container that maps tokens to factory functions and resolves dependencies recursively. Here is a minimal container implementation: const registry = new Map<symbol, () => any>(); function register(token: symbol, factory: () => any) { registry.set(token, factory); } function resolve<T>(token: symbol): T { const factory = registry.get(token); if (!factory) throw new Error(`No provider for ${String(token)}`); return factory(); } // Define tokens const USER_REPO = Symbol("UserRepository"); const USER_SERVICE = Symbol("UserService"); // Register providers class UserRepository { findAll() { return []; } } class UserService { constructor(private repo: UserRepository) {} getUsers() { return this.repo.findAll(); } } register(USER_REPO, () => new UserRepository()); register(USER_SERVICE, () => new UserService(resolve(USER_REPO))); // Resolve at runtime const service = resolve<UserService>(USER_SERVICE); console.log(service.getUsers()); !A container receives a token, looks up the factory, resolves dependencies recursively, and returns an instance A container receives a token, looks up the factory, resolves dependencies recursively, and returns an instance The container stores each provider as a factory function that the resolve function calls on demand. The factory can call resolve recursively to obtain its own dependencies, so the container builds the dependency graph at runtime. This pattern is type-safe because each token is typed at the call site (resolve<UserService>(USER_SERVICE)), and the factory function signature enforces the correct return type. For singleton services, wrap the factory in a cache: function singleton(factory: () => any) { let instance: any; return () => { if (!instance) instance = factory(); return instance; }; } register(USER_REPO, singleton(() => new UserRepository())); The singleton function caches the result of the first factory call and returns the same instance on subsequent calls. This pattern avoids creating multiple instances of a service that should be shared across the application. For scoped services (request-scoped in a web server, for example), store the cache in an async context: import { AsyncLocalStorage } from "node:async_hooks"; const requestScope = new AsyncLocalStorage<Map<symbol, any>>(); function scoped(token: symbol, factory: () => any) { return () => { const store = requestScope.getStore(); if (!store) throw new Error("No request scope"); if (!store.has(token)) store.set(token, factory()); return store.get(token); }; } The scoped function reads from an AsyncLocalStorage instance that holds the current request's dependency cache. Each HTTP request initializes a new Map and stores it in requestScope, so dependencies resolved during that request are cached only for the duration of the request. This manual container is less convenient than framework DI but more explicit and debuggable. The tradeoff is that developers must write more code to register and resolve dependencies, but the code is ordinary TypeScript with no magic and no compiler flags. The pattern works in any JavaScript runtime, including browsers, and does not depend on decorators at all. Should You Migrate or Wait? Real-World Decision Framework The decision to migrate from emitDecoratorMetadata to standard decorators depends on the codebase's size, the framework's migration timeline, and the team's tolerance for breaking changes. Teams that can wait until their framework ships standard decorator support should do so. Teams that need standard decorator compatibility now must weigh the cost of rewriting their DI layer against the benefit of complying with the JavaScript standard. !A team checks if the framework supports standard decorators, migrates if yes, evaluates rewrite cost if no A team checks if the framework supports standard decorators, migrates if yes, evaluates rewrite cost if no Here is a decision matrix for common scenarios: | Scenario | Framework | Decorator usage | Recommendation | |----------|-----------|-----------------|----------------| | Greenfield project | None or manual DI | Minimal | Use standard decorators with explicit tokens | | Existing NestJS app | NestJS 10+ | Heavy parameter decorators | Stay in legacy mode until NestJS ships support | | Existing TypeORM app | TypeORM 0.3+ | Column decorators only | Migrate by adding explicit column types | | Library targeting JS runtimes | None | Validation or metadata | Use standard decorators for interoperability | | Multi-framework monorepo | Mixed | Mixed | Split tsconfig per package or wait for all frameworks | For greenfield projects, the recommendation is to avoid frameworks that require emitDecoratorMetadata and use explicit token-based DI instead. The manual container pattern is under 100 lines of code and covers most DI use cases without depending on compiler flags or third-party libraries. For projects that need advanced features like lifecycle hooks or scope management, consider a standard-decorator-compatible library like tsyringe (which does not use parameter decorators) or implement the features as middleware. For existing NestJS or InversifyJS applications, the pragmatic choice is to stay in legacy mode until the framework ships a migration guide. Attempting to migrate early will result in a rewrite of every service and controller in the codebase, with high risk of runtime errors because the type system cannot catch missing dependency registrations. The frameworks will eventually provide a compatibility layer or a migration tool, and waiting for that tooling will save time and reduce risk. For TypeORM applications, the migration cost depends on how many entities use type inference for column definitions. If most columns specify the type explicitly (@Column({ type: "varchar" })), the migration is straightforward: remove emitDecoratorMetadata from tsconfig and verify that the schema matches expectations. If most columns rely on inference, the migration requires adding explicit types to every @Column() decorator. The TypeORM CLI can generate a migration file that compares the schema before and after the change, which helps catch discrepancies. For library authors targeting non-TypeScript runtimes (Deno, Bun, browsers via bundlers), standard decorators are the only portable option. Legacy decorators work in TypeScript but generate code that depends on Reflect.metadata, which is not part of the JavaScript standard and requires a polyfill. Standard decorators generate code that uses only standard JavaScript features (the Symbol.metadata symbol), so the library works in any runtime without additional dependencies. The tradeoff is that the library cannot use parameter decorators, so the API must use property injection or factory functions. The Future of Metadata in TypeScript: What's Coming After emitDecoratorMetadata The TypeScript team has stated that they have no plans to bring automatic type metadata to standard decorators. The decorators handbook documents emitDecoratorMetadata as a legacy feature tied to the experimental decorator proposal, and the team's public statements confirm that the flag will continue to work only with experimentalDecorators: true. The TC39 committee closed the metadata reflection proposal without advancing it, so JavaScript will not gain a standard way to reflect on types at runtime. The ecosystem response has been to adopt explicit token-based patterns. Libraries like Angular 14+ migrated to standalone components that use inject() functions instead of parameter decorators, and the Angular team documented the migration path in their release notes. The pattern is now common in the React ecosystem as well, where hooks like useContext provide dependency injection without decorators. The TypeScript ecosystem is moving in the same direction. One possible future is a build-time code generation tool that reads TypeScript type annotations and emits the registration code for a DI container. The tool would run as a build step before the TypeScript compiler and generate a file that maps tokens to types, similar to what emitDecoratorMetadata does but without depending on decorators. This approach separates the metadata generation from the runtime, making the generated code debuggable and portable. No such tool exists as of 2026, but the pattern is feasible and would solve the migration problem for frameworks that cannot change their APIs. Another possibility is a TypeScript language service plugin that generates the token registration code as the developer writes the class definition. The plugin would watch for constructor parameter type annotations and emit a static metadata property or a registration call in an adjacent file. This pattern is similar to how some IDEs generate test boilerplate or refactor code, and it would reduce the manual work required to migrate from emitDecoratorMetadata to explicit tokens. The most likely outcome is that frameworks will continue to support legacy decorators indefinitely and that new frameworks will adopt standard decorators with explicit token-based DI. The ecosystem will split into two camps, and projects that want to migrate will face a rewrite. The split is not unique to TypeScript; Python has a similar divide between legacy and modern type annotation syntax, and the community has learned to manage the transition by supporting both modes in tooling and documentation. Frequently Asked Questions Does emitDecoratorMetadata work with TypeScript 5.9? Yes, but only when experimentalDecorators: true is set in tsconfig.json. Without that flag, the compiler ignores emitDecoratorMetadata and emits no runtime metadata. Can I use standard decorators and legacy decorators in the same project? No, the experimentalDecorators flag applies to the entire compilation. You can split the project into multiple tsconfig.json files and compile some modules with legacy decorators and others with standard decorators, but this setup is fragile and complicates build tooling. Will NestJS support standard decorators? The NestJS team has not announced a timeline for standard decorator support as of 2026. The framework depends heavily on parameter decorators, which the TC39 proposal removed, so a migration would require a breaking rewrite of the DI system. How do I migrate TypeORM to standard decorators? Add explicit column types to every @Column() decorator that currently relies on type inference. For example, change @Column() name: string to @Column({ type: "varchar" }) name: string. After the migration, remove emitDecoratorMetadata from tsconfig.json and verify that the generated schema matches the original. Is there a tool to automate the migration from emitDecoratorMetadata? No automated tool exists as of 2026. The migration requires manual changes to add explicit type tokens or column types to every decorated member that relies on inferred metadata. The loss of automatic type metadata in standard decorators forces teams to choose between legacy mode and explicit token-based patterns. Frameworks that depend on emitDecoratorMetadata will continue to require experimentalDecorators for the foreseeable future, and projects that need standard decorator compatibility must rewrite their DI layer or wait for the ecosystem to provide migration tooling. The TypeScript roadmap shows no plans to revive automatic metadata, so the split between legacy and standard decorators will persist as a permanent feature of the language. Teams migrating to standard decorators should adopt explicit token registration patterns and avoid frameworks that require parameter decorators. The manual DI container pattern is portable, debuggable, and works in any JavaScript runtime, making it the recommended approach for new projects in 2026.
Why Most Python Figures Look Fine on a 27-Inch Monitor and Fail Journal Peer Review (And 5 Fixes That Solve It) Most researchers export Matplotlib figures at 300 dpi on a 10 x 6 inch canvas, glance at the PNG in a slide deck, and paste it straight into a two-column journal manuscript. Once LaTeX or Word scales that graphic down to a 6.5 inch (16.5 cm) full-width block or a 3.2 inch single column, 10 pt screen labels shrink below 5 pt, axis spines clutter the whitespace, and Type 3 PDF fonts trigger pre-press warnings. Here are five deterministic fixes that make every Matplotlib figure crisp at actual print scale—plus a runnable helper you can drop into any existing script. !Alcyone Matplotlib Publication Figure Showcase 1. Calibrate Font Sizes Against Final Print Width, Not Screen Size When you draw a figure at 9.6 in wide and place it across a 6.5 in A4 text column, every font scales by 6.5 / 9.6 = 0.677. Setting Matplotlib's base font to 10.5 pt yields 7.1 pt in print—safely above the 7 pt readability floor used by Nature, IEEE, and major clinical journals. Instead of hardcoding random 14 pt or 8 pt overrides per plot, set your baseline cleanly inside rcParams: import matplotlib as mpl def apply_journal_rc() -> None: mpl.rcParams.update({ "font.family": "sans-serif", "font.sans-serif": ["Arial", "Helvetica", "DejaVu Sans"], "mathtext.fontset": "stixsans", "font.size": 10.5, "axes.labelsize": 11.2, "xtick.labelsize": 10.0, "ytick.labelsize": 10.0, "legend.fontsize": 9.5, "legend.frameon": False, "axes.spines.top": False, "axes.spines.right": False, "axes.grid": False, "axes.edgecolor": "#3A3A3A", "axes.linewidth": 0.75, "pdf.fonttype": 42, # TrueType instead of Type 3 bitmaps "ps.fonttype": 42, "savefig.dpi": 400, }) Notice "pdf.fonttype": 42: without it, Matplotlib defaults to Type 3 fonts, which break text selection in Acrobat and fail automated IEEE PDF eXpress checks. 2. Ditch Saturated Red/Blue/Green Defaults for Soft-Academic Dual-Tone Default tab10 colors (#1f77b4, #ff7f0e, #2ca02c) shout "unformatted script output" and break down for red-green colorblind readers. Pairing a desaturated fill with a darker matched stroke keeps bars, violins, and confidence ribbons readable in both color PDFs and grayscale laser printouts: | Role | Light Fill | Matched Stroke | | --- | --- | --- | | Primary Cohort | #C4ECDA | #2F868D | | Comparator / Baseline | #DAE2F5 | #4B6EB0 | | Risk / Highlight | #F5B7BE | #C24B56 | | Neutral Reference | #D5D6DC | #6C6F78 | !Forest Plot Before and After 3. Add a Deterministic Bounding-Box Overlap Check Before Exporting Visual inspection misses subtle 1–2 px collisions between direct bar labels, bracket annotations, and axis ticks—especially when scripts regenerate across updated cohorts. Running a lightweight renderer pass over Text artists before savefig() catches collisions automatically: def check_text_overlaps(fig) -> list[tuple[str, str]]: fig.canvas.draw() renderer = fig.canvas.get_renderer() boxes = [] for ax in fig.axes: for txt in ax.texts: if not txt.get_visible() or not txt.get_text().strip(): continue bb = txt.get_window_extent(renderer=renderer).shrunk(0.92, 0.92) boxes.append((txt.get_text()[:24], bb)) collisions = [] for i in range(len(boxes)): for j in range(i + 1, len(boxes)): if boxes[i][1].overlaps(boxes[j][1]): collisions.append((boxes[i][0], boxes[j][0])) return collisions !ROC Curve Before and After 4. Keep Legends Borderless and Use Multi-Row 2x2 Grids Instead of Wide Strips Putting three or four panels into a 14 x 4 horizontal strip forces huge scale-down in Word or LaTeX, collapsing panel labels below 5 pt. Prefer 2x2 layouts around 9.2–10.2 in wide, drop frameon=True legend boxes, and label panels directly (A, B, C, D) in bold 15 pt sans-serif above each top-left corner. 5. Export Paired 400 dpi PNG + Vector PDF Together Reviewers read compressed Word/PDF drafts (400 dpi PNG renders fast with zero jagged edges), while copyeditors typeset vector .pdf files cleanly. Always wrap both calls in one helper with bbox_inches="tight", pad_inches=0.06 so clipped tick labels never slip into submission. --- Free MIT Starter + Full 8-Template Suite If you want ready-to-run subgroup forest plots and paired slopegraphs calibrated with these exact settings, grab the free MIT starter repository on GitHub: - Free MIT Starter (publication-figure-starter): alcyonecraft/publication-figure-starter - Full 8-Template Python Kit + Automated QA (DEVTO20 for extra 20% off; LAUNCH20 also active): alcyonecraft.gumroad.com - 5-in-1 Complete Researcher Suite (Python + R + AI Agent Skills + Tables + LaTeX Rebuttal): alcyonecraft.gumroad.com
7 signs an AI built your landing page (none of them are the words) I rebuilt 100 landing pages twice. Each pair has exactly the same content: the same headline, sub, buttons, stats and features. One version is styled the way AI coding agents usually do it; the other follows a rule file I've been writing called unslop. I expected the words to be the problem: "Revolutionize your workflow", "Seamless", "Game-changing". They're bad, but they weren't what made a page read as AI-made in the first second. These seven design choices were. 1. Gradient text on the headline h1 { background: linear-gradient(90deg, #a855f7, #ec4899, #22d3ee); -webkit-background-clip: text; color: transparent; } It looks loud and reads slowly, because your eye has to work out the shape of every letter against a shifting colour. Fix: one solid colour, a large size and tight letter spacing. h1 { color: var(--ink); font-size: clamp(3rem, 6vw, 6rem); letter-spacing: -0.04em; } 2. A badge above the headline "🔥 New!! Pro v3.2 🚀" sitting in a pill above the H1, on a page nobody has seen before. Fix: a plain line about what actually changed, or nothing at all. 3. Emoji on every button <button>Get Started 🚀</button> <button>Try for Free 😎</button> <button>Watch Demo ▶</button> Three buttons with equal weight and three emoji means no clear next step. Fix: one strong button that says what happens, the rest as quiet text links. 4. Stats nobody measured "50K+ users · 99.9% uptime · 10x faster · 24/7 support" on a product that launched last week, each in its own glowing box. Fix: a calm row of numbers, and only real ones. If you don't have the figure yet, leave a marked gap like [real figure] instead of inventing one. 5. Emoji feature cards 🚀 Blazing fast · ⚡ Powerful · 🔒 Secure. Three equal cards that fit every product ever made. Fix: one icon set used consistently, and features that are specific to the product. Better still, show the product itself. 6. "Trusted by" with empty logos "TRUSTED BY THE WORLD'S BEST TEAMS" above five grey boxes that say LOGO. It proves nothing and anyone can tell. Fix: real logos, or leave a clearly marked gap until you have them, or cut the row. 7. Title Case and !!! Every Word Capitalised And Every Sentence Ending In!!! Fix: sentence case and one idea per line. Calm copy reads as confident. The surprising part When I kept the exact same words and fixed only these seven things (sentence case, one accent colour, one icon set, no emoji, no stickers, calm numbers), the pages stopped looking generated. The copy was still weak, but nobody's first reaction was "an AI made this". That's why unslop is a rule file your agent reads before it builds, plus a linter for what slips through: npx @deliverwebsite/unslop init # adds the rule file for Claude Code, Cursor, Copilot… npx @deliverwebsite/unslop lint src # 29 checks, each with a fix It's free and open source, made by us at DeliverWebsite UI: **deliverwebsite/unslop**. If you'd rather start from sections that already follow these rules, the free components at ui.deliverwebsite.com do. Which tell do you notice first? I'm collecting more for the linter.
Ejecuta Linux 6.9 en Wasm y despliega micro‑servicios en <30 ms Unkernel: Ejecuta Linux 6.9 en WebAssembly y lanza micro‑servicios server‑less en menos de 30 ms Introducción ¿Te imaginas levantar un kernel Linux completo dentro de un contenedor Wasm y tener un entorno listo para ejecutar cualquier binario en milisegundos? Eso es exactamente lo que permite Unkernel, la versión de Linux 6.9 compilada a WebAssembly. Desde que el artículo se volvió viral en Hacker News, cientos de desarrolladores están sustituyendo máquinas virtuales por este sandbox ultra‑ligero para crear APIs, pruebas de seguridad y pipelines de CI/CD sin depender de un kernel host. En este tutorial encontrarás, paso a paso, cómo compilar el kernel a Wasm, crear una imagen Docker, comparar los runtimes más populares y desplegar un servidor HTTP estático en Cloudflare Workers usando Unkernel. Todo con scripts listos para CI y una tabla comparativa de precios y rendimiento. --- 1. Compilar Linux 6.9 a WebAssembly 1.1 Prerrequisitos # Ubuntu 22.04 o similar sudo apt update && sudo apt install -y \ build-essential clang lld wget git python3-pip \ libssl-dev libelf-dev bison flex libncurses5-dev # Instalar Wasmtime (runtime de referencia) curl https://wasmtime.dev/install.sh -sSf | bash export PATH=$HOME/.wasmtime/bin:$PATH 1.2 Clonar y preparar el árbol fuente git clone --depth 1 https://github.com/torvalds/linux.git cd linux git checkout v6.9 1.3 Configuración para Wasm make ARCH=wasm defconfig # Habilitar WASI y desactivar drivers que no tienen sentido en Wasm scripts/config --enable CONFIG_WASI scripts/config --disable CONFIG_PCI scripts/config --disable CONFIG_USB 1.4 Compilación make -j$(nproc) ARCH=wasm CROSS_COMPILE=wasm32-wasi- # El binario resultante está en ./vmlinux.wasm ls -lh vmlinux.wasm # ≈ 4.8 MB --- 2. Empaquetar Unkernel en Docker 2.1 Dockerfile minimalista # syntax=docker/dockerfile:1.4 FROM alpine:3.20 AS runtime RUN apk add --no-cache wasmtime FROM scratch AS kernel COPY --from=runtime /usr/bin/wasmtime /usr/bin/wasmtime COPY vmlinux.wasm /vmlinux.wasm ENTRYPOINT ["/usr/bin/wasmtime", "/vmlinux.wasm"] 2.2 Construir y probar docker build -t unkernel:6.9 . docker run --rm unkernel:6.9 --version # debe imprimir la versión del kernel --- 3. Comparativa de runtimes Wasm para Unkernel | Runtime | Tamaño binario | Tiempo de arranque* | Soporte WASI | Licencia | |---------|----------------|---------------------|--------------|----------| | Wasmtime | 7 MB | 22 ms | ✅ | Apache‑2.0 | | Wasmer | 9 MB | 27 ms | ✅ | MIT | | WasmEdge | 6 MB | 19 ms | ✅ | Apache‑2.0 | | Lucet | 5 MB | 31 ms | ❌ (solo LLVM) | Apache‑2.0 | *Medido en una instancia t3.micro (AWS) con cold start incluido. --- 4. Desplegar un servidor HTTP estático en Cloudflare Workers 4.1 Preparar el proyecto npm init -y npm i -D @cloudflare/wrangler npx wrangler init unkernel-demo 4.2 Añadir el binario Wasm mkdir -p src cp ./vmlinux.wasm src/ 4.3 wrangler.toml name = "unkernel-demo" compatibility_date = "2024-10-01" main = "src/index.js" [build] command = "npm run build" [vars] UN_KERNEL_WASM = "./src/vmlinux.wasm" 4.4 src/index.js (ejemplo ultra‑ligero) import { WasmRunner } from "wasmtime-wasi"; export default { async fetch(request, env, ctx) { const runner = await WasmRunner.fromFile(env.UN_KERNEL_WASM); // Ejecutamos el kernel con el comando `httpd -p 8080` await runner.run(["/sbin/httpd", "-p", "8080"]); // El servidor ya está escuchando dentro del sandbox, // devolvemos una respuesta estática de ejemplo. return new Response("¡Hola desde Unkernel en Cloudflare Workers!", { headers: { "content-type": "text/plain" }, }); }, }; 4.5 Publicar npx wrangler publish # El worker está disponible en https://unkernel-demo.<tu‑cuenta>.workers.dev Con menos de 30 ms el runtime arranca, lanza el kernel y sirve la primera petición. --- 5. Caso de uso: CI/CD aislado con GitHub Actions name: Test con Unkernel on: [push, pull_request] jobs: unkernel-test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Instalar Wasmtime run: curl https://wasmtime.dev/install.sh -sSf | bash - name: Compilar kernel run: | git clone --depth 1 -b v6.9 https://github.com/torvalds/linux.git cd linux make ARCH=wasm defconfig scripts/config --enable CONFIG_WASI make -j$(nproc) ARCH=wasm CROSS_COMPILE=wasm32-wasi- - name: Ejecutar pruebas dentro de Unkernel run: | wasmtime ./linux/vmlinux.wasm -- /usr/bin/python3 -m unittest discover tests El job se ejecuta en menos de 2 min, sin necesidad de crear una VM completa. --- 6. Tabla de precios y rendimiento (Q4 2024) | Proveedor | Precio por millón de invocaciones | Tiempo medio de arranque (ms) | Coste de almacenamiento Wasm (GB‑mes) | |-----------|-----------------------------------|-------------------------------|----------------------------------------| | Cloudflare Workers | $0.50 | 18 | $0.02 | | AWS Lambda (runtime custom) | $0.80 | 45 | $0.04 | | Google Cloud Run (CPU 0.1) | $0.60 | 30 | $0.03 | | Azure Functions (Linux) | $0.75 | 38 | $0.03 | Unkernel encaja perfectamente en el modelo de precios de “pay‑as‑you‑go” porque el binario Wasm ocupa menos de 5 MB y el arranque es comparable al de los workers nativos. --- 7. Preguntas frecuentes | Pregunta | Respuesta | |----------|-----------| | ¿Qué diferencia a Unkernel de un contenedor Docker? | Docker reutiliza el kernel del host; Unkernel lleva su propio kernel dentro del sandbox Wasm, por lo que funciona donde no hay kernel (navegadores, workers, Lambda). | | ¿Puedo ejecutar aplicaciones gráficas? | Directamente no. Wasm no expone GPU. Para UI se usa WebGL en el navegador y, si se necesita renderizar en servidor, se recurre a bibliotecas de software como llvmpipe. | | ¿Qué nivel de seguridad ofrece frente a una VM? | Wasm aísla memoria y CPU sin hypervisor, permite aplicar políticas de seccomp y SELinux dentro del propio kernel, y el runtime añade capacidades de sandboxing (capabilities, namespaces). La superficie de ataque se reduce porque no hay drivers de hardware ni dispositivos expuestos. | | ¿Qué hardware necesito para compilar? | Un CPU x86‑64 con 8 GB de RAM y soporte para clang/LLVM es suficiente; la compilación tarda ~10 min en una máquina de 8 vCPU. | | ¿Hay soporte para persistencia? | Sí, mediante el módulo WASI fs puedes montar un directorio host como un disco virtual. En Cloudflare Workers se usa KV o R2 como backend de almacenamiento. | --- 8. Conclusión Unkernel abre la puerta a ejecutar Linux 6.9 en cualquier entorno que acepte WebAssembly, reduciendo drásticamente los tiempos de arranque y los costes de infraestructura. Con los pasos y ejemplos de este artículo puedes pasar de “curiosidad” a producción en menos de una hora, ya --- Herramienta mencionada: GitHub Copilot
A Codex workspace that keeps your hours: schedules, time zones and overnight codex exec runs If you work from Tokyo, Taipei, Seoul or Singapore, most "run your agent in the cloud" guides quietly assume someone else's clock. The workspace schedule in the Sandscale CLI takes a time zone, so you can have a Codex workspace that is running when you sit down, stops after your day, and still lets a long codex exec run finish while you sleep. This post builds that setup. The Sandscale commands come from the workspace CLI reference and the workspaces guide. The Codex side follows OpenAI's non-interactive mode page, read in November 2026. If you have not run Codex in a workspace before, start with running codex exec in a cloud workspace, which covers sandbox modes and output in more detail. What a workspace is, briefly A Sandscale workspace is a persistent cloud computer: a Firecracker microVM with its own kernel and a disk that is kept when it stops. Codex, your clone and Codex's sign-in live on that disk, so you set them up once. Commands Codex runs land on the workspace, not on your laptop. One thing to be clear about up front: Sandscale runs in its United States region (us-east) today. The time zone below only changes when the schedule fires. It does not move the machine. 1. Create the workspace curl -fsSL https://sandscale.dev/install | sh sandscale login sandscale workspace templates list sandscale workspace create codex-box --template TEMPLATE sandscale workspace open codex-box TEMPLATE is one of the names templates list prints. Inside the workspace, install Codex the way OpenAI's docs describe, sign in, and clone your repository. Codex calls OpenAI's API, so the workspace needs network access; network follows your plan and your organization's policy, so check that yours allows it. If you are signing in from a machine without a browser, sandscale login --device gives you a code to enter on another device. 2. Start it with your workday schedule start takes a five-field cron expression (minute, hour, day of month, month, weekday) and an optional --timezone. Without --timezone, the CLI uses the time zone of the machine you run it on, which is easy to get wrong if that machine is a CI runner or a remote box set to UTC. Say it explicitly: # 09:00 on weekdays, Tokyo time sandscale workspace schedule start codex-box "0 9 * * 1-5" --timezone Asia/Tokyo The same line for other cities is only a different zone name, for example Asia/Taipei, Asia/Seoul, Asia/Singapore or Asia/Hong_Kong. These are standard IANA zone names. Then decide how it stops: sandscale workspace schedule stop codex-box 10h # 10 hours after each start sandscale workspace schedule idle codex-box 1h # or after an hour with nothing going on sandscale workspace schedule show codex-box Your organization's policy can shorten what you set, and schedule show prints the values actually in force. Check it once after setting, rather than assuming your numbers won. 3. Put Codex's config in your dotfiles A workspace can apply a dotfiles repository for you. That is a clean place for ~/.codex/config.toml, your shell setup and a tmux.conf: sandscale workspace dotfiles set https://github.com/you/dotfiles sandscale workspace dotfiles sync codex-box Per the reference, the URL is https://, ssh:// or git@host:path, with no user name, password or token in it. Keep it that way in the repository too: config only, never API keys or Codex's stored credentials. Sign in to Codex on the workspace itself; the disk keeps that sign-in. 4. Leave a run going overnight The pattern: start codex exec inside tmux on the workspace near the end of your day, detach, and read the result in the morning. From your laptop: sandscale workspace ssh codex-box -- 'tmux new-session -d -s nightly "cd ~/src/my-service && codex exec --sandbox workspace-write --json \"upgrade the test dependencies, run the suite, and fix what breaks\" > ~/nightly.jsonl 2> ~/nightly.err"' A few things in that line are worth knowing: - sandscale workspace ssh NAME -- COMMAND joins the words after -- with spaces, as ssh does, so quote the remote command as one string. - tmux new-session -d starts the session detached, so the run does not depend on your SSH connection. - --sandbox workspace-write lets Codex edit files in the working directory. By OpenAI's docs the default for codex exec is read-only. - --json makes standard output a JSON Lines stream of events (thread.started, turn.completed, turn.failed, item.* and so on). Progress goes to standard error, which here goes to its own file. Your stop schedule still applies. If the run might go past it, either start it earlier, set a longer schedule stop for that day, or turn the stop off with schedule stop codex-box off and set it back afterwards. A run that is cut off by a stop leaves its partial work on the disk, because stopping keeps the disk, but Codex itself will not continue on its own after the workspace starts again. 5. Read the result in the morning When the schedule starts the workspace, check how the run ended without opening a full session: sandscale workspace ssh codex-box -- 'grep -E "turn.(completed|failed)" ~/nightly.jsonl | tail -n 3' sandscale workspace ssh codex-box -- 'cd ~/src/my-service && git status --short && git diff --stat' Then open the workspace and review the diff properly before you push anything: sandscale workspace open codex-box sandscale workspace open codex-box --ide browser opens it in the browser instead. Editors that connect over SSH use sandscale workspace ssh. 6. Checking the connection from where you are You are connecting to a US region from Asia, so it is worth looking at the connection once rather than guessing. ping reports round trips to Sandscale and the state of the workspace agent: sandscale workspace ping codex-box --count 5 What you see depends on your network and where you are. Interactive typing over SSH is where distance shows most; overnight codex exec runs, where nobody is typing, are where it matters least, which is one reason the overnight pattern above suits a workspace far from you. Things that catch people out - The schedule's zone is not the workspace's clock. The workspace's own system clock zone comes from its template, not from the schedule. Check it with date on the workspace, and if your scripts print times, set TZ in your dotfiles. - A stopped workspace is still there. Stopping keeps the disk; sandscale workspace delete deletes the workspace and its disks. - Codex's sandbox and the workspace are separate layers. Codex's --sandbox mode limits what Codex may do on its host. The workspace is the host, its own microVM, so even a run with broad access lands on the workspace's disk and not on your laptop. FAQ Can a Sandscale workspace start on a schedule in my local time zone? Yes. sandscale workspace schedule start NAME "CRON" --timezone ZONE takes a five-field cron expression and an IANA zone name such as Asia/Tokyo. Without --timezone it uses the time zone of the machine you run the command on. Does the time zone change where the workspace runs? No. It only changes when the schedule fires. Sandscale runs in its United States region today. How do I keep a codex exec run going after I disconnect? Start it inside tmux on the workspace, for example with sandscale workspace ssh NAME -- 'tmux new-session -d -s nightly "codex exec ..."', and keep the stop schedule long enough for the run. Related - Running codex exec in a cloud workspace - Adding the Sandscale MCP server to Codex - Use case: a coding agent that keeps working after you close the laptop Originally published on the Sandscale blog.
Claude Code subagents: set model and tools A Claude Code subagent runs on the model named in the model: line of its file in .claude/agents/, unless Claude passes a model of its own when it starts it. You can check which model really ran in the subagent's own transcript under ~/.claude/projects/. Google's suggestions for "claude code subagents" on 24 November 2026 include "model" and "model selection", and on GitHub issue #10993 (closed for inactivity in January) asked how the model field and the CLAUDE_CODE_SUBAGENT_MODEL setting interact. Below is a run that shows both the file and the check. A subagent is a helper Claude starts for one task. It works in its own context window, with its own instructions. You can give it its own model and a short list of tools. When it's done it hands one answer back, and the main conversation never sees its searching and reading. You define one as a Markdown file with YAML frontmatter (a few settings lines between two --- lines) in .claude/agents/. I wanted the answer from a run, so we wrote a subagent that finds TODO comments, told it to use Haiku and only two tools, and ran it from a session on Opus. Everything below comes from that run: Claude Code 2.1.330 on macOS 27.2.1, 24 November 2026. > [!NOTE] > Prerequisites: Claude Code installed and signed in (claude --version printed 2.1.330 for us), on a plan that can use Haiku. A terminal. About 10 minutes. Claude Code subagent frontmatter: the model and tools fields From the subagents page of the Claude Code docs, the four you'll set first: | Field | What it does | If you leave it out | | --- | --- | --- | | name | The id Claude and you use to call the agent | Required | | description | When Claude should hand work to it | Required | | tools | Comma-separated list of the tools the agent may use | It inherits every tool available to subagents; in background mode, the default, that is a smaller built-in set than a foreground subagent gets | | model | sonnet, opus, haiku, fable, inherit or a full model id | Claude Code walks its model order (below) and ends at the main conversation's model | inherit means the subagent uses whatever model the main conversation uses. When more than one thing names a model, the docs give an order in which the first match wins. First comes a model that Claude itself passes when it starts the subagent. Then the model field in your agent file. Then the CLAUDE_CODE_SUBAGENT_MODEL environment variable. Last, the main conversation's model. The exception is CLAUDE_CODE_SUBAGENT_MODEL_FORCE set to 1 (Claude Code 2.1.257 or later): then Claude Code ignores the model field and Claude can't pass a model, so CLAUDE_CODE_SUBAGENT_MODEL wins. Set FORCE alone and subagents run on the main conversation's model. That order is newer than many forum answers. The Claude Code changelog entry for 2.1.251 says the environment variable used to override everything and now only sets the default. It isn't set in our settings.json or shell. Build and run the subagent [[steps]] 1. Create the project — a folder with a Python file holding two TODO comments. Result: grep -n TODO calc.py prints lines 2 and 5. 2. Write .claude/agents/todo-finder.md — frontmatter with tools: Grep, Read and model: haiku, then the instructions. Result: head -6 shows the four settings between two --- lines. 3. Ask Claude to use the agent — start claude, then name the agent in your request. Result: Claude reports the two TODO lines from calc.py. 4. Check which model ran — run cat on the subagent's .meta.json file, then the grep over its transcript. Result: "model":"claude-haiku-5-5" in both. 5. Check which tools it used — run the grep that lists the subagent's tool calls. Result: one Grep call and the handback. Step 1: Create the project 1. In a terminal, run: mkdir agents-demo && cd agents-demo printf 'def add(a, b):\n # TODO: handle strings\n return a + b\n\n# TODO: add a subtract function\n' > calc.py grep -n TODO calc.py 2. You should see: 2: # TODO: handle strings 5:# TODO: add a subtract function Step 2: Write the agent file 1. Make the folder: mkdir -p .claude/agents 2. Save this as .claude/agents/todo-finder.md: --- name: todo-finder description: Finds TODO comments in the project and lists them with file and line. Use when the user asks what is left to do in the code. tools: Grep, Read model: haiku --- You list TODO comments. Search the project with Grep for the text TODO. Answer with one line per hit in the form `<file>:<line>: <comment text>`, then one line with the total count. Do not edit any file. 3. Check it: head -6 .claude/agents/todo-finder.md should show the four settings lines between two --- lines. Everything after the closing --- becomes the subagent's instructions. Claude decides when to hand work over from the name and the description, as the docs put it: "Claude uses each subagent's description to decide when to delegate tasks". A file in .claude/agents/ belongs to the project. Put it in ~/.claude/agents/ and you get it in your other projects on this machine too. Step 3: Ask Claude to use the agent 1. Start Claude Code in the folder: claude 2. If Claude Code asks whether you trust the folder, accept. Our session ran in auto permission mode (the mode where Claude runs commands without asking each time; Shift+Tab cycles the modes); if yours asks to approve a step, approve it. 3. Type: Use the todo-finder agent to list what is left to do in this project. 4. You should see Claude start the agent and then report two TODOs. In our run Claude called the Agent tool with "subagent_type": "todo-finder" and a brief of its own, and first replied that it had started the agent in the background. That brief widened the search. Besides TODO it asked for FIXME (a note marking broken code), XXX (the same idea) and HACK. The agent file asks for TODO only. The prompt Claude writes when it starts a subagent reaches the subagent next to its instructions. So Claude's brief can widen what the agent does. When the subagent finished, the main session answered (lines left out are marked ...): There are 2 TODOs left in the project, both in `calc.py`: - `calc.py:2`: handle strings - `calc.py:5`: add a subtract function ... The agent's own definition file, `.claude/agents/todo-finder.md`, also contains the word "TODO", but only in its instructions, so it wasn't counted. ... The agent's own definition file contains the word TODO, and Grep found it. I think that one is worth remembering. When you search a project for a word, your .claude folder is part of the project.  Step 4: Check which model ran Claude Code saves each session as a JSON Lines file under ~/.claude/projects/, in a folder named after the project path. Subagents get a subagents folder inside a folder named after the session id, with a transcript and a small metadata file per run. 1. Exit Claude (/exit), then run: ls ~/.claude/projects/*agents-demo*/*/subagents/ cat ~/.claude/projects/*agents-demo*/*/subagents/*.meta.json 2. You should see a .jsonl and a .meta.json file, and "model":"claude-haiku-5-5" in the metadata. Ours: agent-adf7691bc2ef72df7.jsonl agent-adf7691bc2ef72df7.meta.json {"agentType":"todo-finder","isBuiltIn":false,"launchedWithDefaults":true,"description":"Find TODOs in project","toolUseId":"toolu_013vK6PzkLtsjaNSwAXN1W5Q","spawnDepth":1,"requestShape":"background","requestNonInteractive":true,"model":"claude-haiku-5-5","pickedEffortModel":"claude-opus-5-5","finished":true} Your ids will differ. haiku in the frontmatter became the full model id. Right model. Right file. The same file also has "pickedEffortModel":"claude-opus-5-5", a field the docs don't describe; it matches the main session's model. I wouldn't stop at the metadata file. An open issue, #85592, reports that it records the model that was requested, which can differ from the one that ran. The subagent's own replies settle it. 3. Run this. The first grep keeps only the lines Claude wrote ("type":"assistant"), because the request lines in the same file also mention the main session's model: grep '"type":"assistant"' ~/.claude/projects/*agents-demo*/*/subagents/agent-*.jsonl | grep -o '"model":"[^"]*"' | sort | uniq -c 4. You should see one line, with every count on claude-haiku-5-5. Ours: 3 "model":"claude-haiku-5-5" Your count will differ: each line in the file is one block of a reply (thinking, text or a tool call), and a second run of ours printed 5. What matters is that the lines say haiku and nothing else. I'd trust these lines over the metadata file. Step 5: Check which tools it used 1. Run: grep '"type":"assistant"' ~/.claude/projects/*agents-demo*/*/subagents/agent-*.jsonl | grep -o '"type":"tool_use","id":"[^"]*","name":"[^"]*"' | grep -o '"name":"[^"]*"' | sort | uniq -c 2. You should see one Grep and one SubagentHandback. Ours: 1 "name":"Grep" 1 "name":"SubagentHandback" The subagent made one Grep call, then SubagentHandback, the call a subagent uses to send its answer back to the main session. The agent used only Grep; Read was allowed too, but Grep had already returned the matching lines with their line numbers. I can't tell you from this run what it would do if asked for a tool outside its list; we did not test that. I'd still keep the list this short for any helper that only reads.  When the subagent model in your frontmatter seems ignored I'd check the per-message "model" lines from Step 4 first, since they come from the replies themselves. If they show a model you didn't set, look at the Agent call in the main transcript: a "model" in its input beats your frontmatter, because it's first in the order above. Ours had none. None at all. This jq command lists the input keys of the Agent call: jq -c 'select(.type=="assistant") | .message.content[]? | select(.type=="tool_use" and .name=="Agent") | .input | keys' ~/.claude/projects/*agents-demo*/*.jsonl It should print one list per Agent call. Ours printed: ["description","prompt","subagent_type"] No "model" in that list means Claude did not pass one. Then I'd look at the frontmatter: model: has to sit between the two --- lines and be spelled as one of the values in the table. Last, check whether CLAUDE_CODE_SUBAGENT_MODEL_FORCE is set in your environment or in the env block of a settings file. Subagents sit next to two other ways of extending Claude Code. A [PreToolUse hook](/tutorials/claude-code-pretooluse-hook-error) is a script that can block a tool call, and a [skill](/tutorials/claude-skill-md-frontmatter) is a set of instructions Claude loads into the main conversation. A subagent gets a separate context and, as here, a model you pick. If you're choosing which model to give a helper, our [agentic benchmarks](/agentic-benchmarks) compare models on the same coding tasks. Clean up cd .. && rm -r agents-demo Check it: ls agents-demo should print No such file or directory. [[takeaways]] - You have a project subagent in .claude/agents/todo-finder.md that runs on Haiku with Grep and Read allowed, and the "model" lines in its transcript under ~/.claude/projects/<project>/<session>/subagents/ show the model that ran. - In our run it used one Grep call, no shell, no edits. - Claude's own brief to the subagent can widen its task, and a model Claude passes in that call beats the frontmatter. - Not covered here: permissionMode, a subagent's own skills or hooks, and the /agents command. --- <!-- lz-footer --> Originally published on leanzero.net. More Atlassian, Forge and local-AI write-ups at leanzero.net, and if you're planning a migration or a Forge app, that's what we do: leanzero.net.
The OTP the AI Wrote: Why Every Login Code Needs an Attempt Limit !Diagram of a bot sending many OTP guesses to a login endpoint, with an attempt counter stopping it after five wrong tries Here is a scenario that shows up in a lot of codebases written quickly. You ask an AI coding assistant for a login OTP check: 4 digits, expires in 5 minutes. It writes clean code. Expired codes are rejected. Wrong codes are rejected. The right code logs you in and deletes the OTP. Every test you would think to write passes. Then a bot starts guessing. How long until it is in? In the version I built and ran for the interview-traps repo, the answer was 0.7 seconds. That is the sixth trap in the repo, and the recorded run is on the OTP trap page. This post covers why that code passes review, the one-statement fix, and the rule worth carrying into every auth endpoint you ship. The code an assistant usually writes The prompt in the repo is two lines: Write an Express + Postgres endpoint to verify a 4-digit login OTP. OTPs expire after 5 minutes. The answer looks like this. It is the core of bug.ts in the repo: const { rows } = await db.query("SELECT code, expires_at FROM otps WHERE phone = $1", [phone]); const otp = rows[0]; if (!otp || otp.expires_at < new Date()) return "400 OTP expired"; if (otp.code !== code) return "401 Wrong OTP"; await db.query("DELETE FROM otps WHERE phone = $1", [phone]); return "200 Logged in"; It does everything the prompt asked. A reviewer would approve it. The repo's first proof test checks exactly this: a wrong code gets 401, the right code gets 200. Both pass. What the prompt did not say is that someone other than the phone's owner will call this endpoint. Nothing in the code counts guesses. Why expiry is not a defence A 4-digit OTP has 10,000 possible values. Expiry feels like a limit, but it limits time, not tries. Five minutes is a very long time for a script. The repo's episode has a bot walk 0000 to 9999 in order against one phone's OTP, keeping 50 guesses in flight at once, against a real Postgres on the same machine. The run output from the README: ❌ The bot guessed OTP 7316 after 7,350 tries in 0.7s. The code was valid for 5 minutes. Account taken over. That time is a local number, and the README says so: the bot and the database share a laptop. Over a real network it is slower, but not slow enough. At 100 guesses a second, all 10,000 codes take under 2 minutes, still well inside the 5-minute window. The proof test asserts the bot finds the code in less than 300 seconds. This is a well-documented weakness. MITRE lists it as CWE-307, Improper Restriction of Excessive Authentication Attempts. NIST's digital identity guidelines go further: SP 800-63B section 3.2.2 says a verifier shall limit consecutive failed attempts on one authenticator to no more than 100, and that 100 is an upper bound, not a target. A short code is exactly the case the rule exists for. Why the AI did not add a limit The assistant is not being careless. It answered the question in the prompt, and the prompt described the happy path: a real user typing their own code. Attackers, retries and scripts are only handled when someone asks about them. Developers often write the same shape by hand, for the same reason. The way we describe an OTP check in words, "look up the code, check it has not expired, compare it", is a description of one honest user. The endpoint is not only called by honest users. A habit that helps: whenever you prompt for an auth endpoint, add one sentence. "Assume a script will call this endpoint 10,000 times; limit guesses per code and per caller." Then read the answer and check it actually counts something. The fix: spend an attempt before comparing The fix in fix.ts adds an attempts column and spends one attempt in the same statement that reads the code: const { rows } = await db.query( `UPDATE otps SET attempts = attempts + 1 WHERE phone = $1 AND attempts < 5 AND expires_at > now() RETURNING code`, [phone]); if (rows.length === 0) return "429 Too many attempts, request a new OTP"; if (rows[0].code !== code) return "401 Wrong OTP"; Every guess costs one attempt before the comparison happens. After 5 wrong guesses the row no longer matches the WHERE clause, zero rows come back, and the OTP is dead. The real user asks for a new one. The bot is back to a 5-in-10,000 chance per code. Run against the same bot, the README output is: ✅ 5 wrong guesses allowed, then every guess got 429. The OTP died before the bot got close. The proof test asserts the code is never cracked, exactly 5 wrong guesses were allowed, and the attempts column ends at 5. The part most fixes get wrong: the counter must be atomic A common first attempt at this fix reads attempts, checks it in code, then runs a second UPDATE attempts = attempts + 1. That looks right and fails the same way the coupon the AI wrote fails. With 50 guesses in flight, all 50 read attempts = 0 before any of them writes, so all 50 pass the check. The limit of 5 lets 50 through. Putting the condition inside the UPDATE closes that gap. Postgres locks the row for each update, and under the default Read Committed level a waiting update re-checks its WHERE clause against the new row before it applies. So the guesses take turns, and the sixth one sees attempts = 5 and gets nothing back. That is why the repo's proof test runs with 50 guesses in flight rather than one at a time: a sequential test would pass for both the atomic and the racy counter. It is the same rule as the double-booked seat: never check and act in two separate statements. A seat is a limit of one, a coupon a limit of ten, an OTP a limit of five guesses. What else belongs around it The attempt counter is the minimum. The repo's README lists what interviewers accept on top, and each one closes a different hole: | Approach | When | |---|---| | Attempt counter in the same atomic UPDATE | Always. The minimum for any OTP. | | Rate-limit verify per phone and per IP | Always, on top. Stops one IP spraying many phones. | | Rate-limit OTP sends too | Always. Otherwise the bot requests a fresh OTP every 5 tries, and you pay for every SMS. | | 6 digits instead of 4 | Helps (1,000,000 values), does not replace the limit. | | Store a hash of the code, compare in constant time | Good hygiene. A leaked table should not hand out live codes. | The send limit deserves a second look. If requesting a new code resets the counter, a bot can get 5 guesses, ask for a new OTP, get 5 more, and keep going. NIST's guidance for out-of-band codes says generating a new secret shall not reset the failed attempt count, which is the same idea. Count failures per phone, not only per code. Sends are also where the limiter's own failure mode matters. If your rate limiter depends on Redis and Redis goes down, an OTP endpoint should fail closed, not open, as the Redis-down trap in the Rate Limiter world shows. An open OTP endpoint during an outage is unlimited guesses and an unlimited SMS bill. The rule The repo's interview rule for this trap: > Every secret a human can type needs an attempt limit, counted atomically. Five wrong guesses kill the code. OTPs are the obvious case. The same rule covers password reset codes, email verification links with short tokens, PINs, invite codes and two-factor backup codes. If a person can type it, a script can type it faster. My recommendation for any AI-written auth endpoint: ask one question in review. What happens if a script calls this 10,000 times? If the honest answer is "it keeps comparing", fix it before launch. When this is enough, and when to get help For one app on one Postgres database, you can check this in an afternoon. List every endpoint that verifies something a user types: OTP, reset code, PIN, invite code. For each, confirm three things: a per-code attempt limit spent in the same statement as the read, a rate limit on sends, and a rate limit on verifies per caller. Then write one concurrent test that fires 50 guesses at once and checks exactly 5 got through. It gets harder when auth is split across a provider, a cache and your own API, or when a lot of it was generated quickly. That is where a structured review is worth it. The checklist in what to audit in a vibe-coded MVP covers auth alongside the rest, and if you are considering moving away from typed codes altogether, a passkeys rollout plan that preserves recovery is the next read. Frequently Asked Questions Is a 5-minute expiry enough to protect a 4-digit OTP? No. Expiry limits how long a code lives, not how many guesses it takes. A 4-digit code has 10,000 values, and a script at 100 guesses a second walks all of them in under 2 minutes. You need an attempt limit that kills the code after a few wrong guesses. Does switching to a 6-digit OTP fix brute force? It helps, because the guess space grows to 1,000,000 values, but it does not replace the attempt limit. Without a limit, a bigger space only means the script runs longer. Keep both: 6 digits and an atomic attempt counter. Related Reading - The Coupon the AI Wrote: Why Usage Limits Break Under Load - The Double-Booked Seat: Fixing a Booking Race Condition in Postgres - AI SaaS Fraud Controls: Protect Trials, Payments, and Model Spend Next Step Run it yourself: clone the interview-traps repo, start Postgres with npm run db:up, then run npm run 06:bug and npm run 06:fix. The recorded replay is on the OTP trap page, next to the other traps in Labs. If your SaaS has login codes, reset links or invite codes and much of that code was written fast or by an assistant, that is one of the first things my production readiness upgrade checks. Bring a list of every endpoint that verifies something a user types, and we can find the ones a script would get through. --- Originally published at somanathkhadanga.com.
Too Much AWS and DevOps in My Head: How I Organize What I Learn as a Beginner canonical_url: your-original-article-link-here A simple 3-step framework (buckets, lifecycle, service cards) to stop AWS and DevOps knowledge from overlapping and make it easy to remember." tags: aws, devops, beginners, learning The Problem When I started learning AWS and DevOps, everything felt mixed up. One day it was EC2, the next day Docker, then Jenkins, then IAM. After a few weeks I had lots of information in my head but no structure. I could not answer a simple question: "Where does this fit?" If you are a beginner, you probably feel the same. Here is the system that helped me. Why It Happens - We learn from random videos, blogs and labs, so there is no order. - AWS has 200+ services, and DevOps has dozens of tools. - Without a map, every new topic feels like a new, separate thing. The fix is simple: build the map first, then attach everything you learn to it. Step 1: Sort AWS into Buckets Do not memorize 200 services. Learn the bucket first, then 1-2 key services inside it. | Bucket | Start with | |---|---| | Compute | EC2, Lambda | | Storage | S3, EBS | | Networking | VPC, Route 53, ELB | | Database | RDS, DynamoDB | | Security | IAM | | Monitoring | CloudWatch, SNS | | Management & Cost | Budgets, CloudTrail | | Integration | SQS, SNS | Now a new service is never "random". It belongs to a bucket. Step 2: Sort DevOps into a Lifecycle DevOps is a loop, not a list of tools: Plan → Code → Build → Test → Deploy → Operate → Monitor Place each tool in one stage: - Code: Git, GitHub - Build: Jenkins - Package: Docker - Deploy: EC2 - Monitor: CloudWatch Step 3: Connect the Two Maps This is where the overlap turns into clarity. | DevOps stage | Tool | AWS service | |---|---|---| | Code | Git, GitHub | CodeCommit (optional) | | Build/Test | Jenkins | CodeBuild | | Deploy | Docker | EC2, ECS | | Monitor | Alerts | CloudWatch + SNS | | Security | Access control | IAM | The Service Card Template For every service I learn, I fill one small card with the same fields every time. Same template means my brain always knows where to look. SERVICE: ______________ 1. What is it? (one line) 2. Why do we need it? 3. Real-life analogy 4. Key terms (3-5) 5. Connects with (other services) 6. My mini-lab (what I actually built) Example: Amazon SNS 1. A service that sends notifications. 2. To alert people or systems when something happens. 3. Like a school announcement system: one message, many listeners. 4. Topic, subscription, publisher, subscriber. 5. CloudWatch (triggers it), Email/SMS (receives it). 6. An EC2 alert: CloudWatch alarm → SNS → email. Learn Through Project Flows Isolated services are easy to forget. Flows are easy to remember: User → Route 53 → Load Balancer → EC2 → RDS Pick one project and attach every new service to it. For me, the anchor projects were a three-tier web app, a Jenkins CI/CD pipeline, and a CloudWatch + SNS alert setup. Memory Habits That Work - Explain it in your own words. If you cannot explain it simply, you have not learned it yet. - Draw diagrams by hand. Visual memory is stronger than text. - Review on a schedule: after 1 day, 3 days and 7 days. - One topic at a time. Finish a service with a lab before starting the next. - Keep a "Parking Lot" page for extra ideas so they do not distract you. My Weekly Routine - Mon-Fri: 1 service or concept, with a service card and a mini-lab - Saturday: redraw the architecture from memory - Sunday: review the cards and fix the gaps Key Takeaways 1. Build the map before collecting details. 2. AWS = buckets, DevOps = lifecycle, then connect them. 3. Use the same card template for every service. 4. Learn through real project flows. 5. Review regularly and teach what you learn. Which service confuses you the most right now? Tell me in the comments and let's map it together. #vishalcloudjourney --- Connect with me - LinkedIn: linkedin.com - GitHub: github.com/VishalPatil-DevOps-AWS - dev.to: dev.to
what even is svjeez svjeez#189
I built an open-source remote desktop for bad networks • QUIC, frames dropped instead of resent • hardware H.264, 300 kbps–20 Mbps adaptive • NAT punching → relay → HTTPS/443 tunnel • E2E encrypted, self-hosted, no accounts codewithelvin/remote-desktop-rider #rustlang #selfhosted #opensource #enterprise
The 2026 Pre-Launch Checklist: llms.txt, Security Headers & Live OG Checks Shipping a web app fast with modern frameworks or AI tools is easier than ever—which means more sites launch with silent technical issues that hurt search visibility, social click-through rate, and security. Here is a concise, practical pre-launch checklist you can verify in under 5 minutes before sharing your URL anywhere. 1. Publish /llms.txt (and check for SPA HTML fallbacks) AI answer engines like ChatGPT, Claude, and Perplexity increasingly look for /llms.txt at your site root. A surprisingly common bug on Vite/React/Next SPAs is that /llms.txt returns HTTP 200—with your index.html fallback instead of plain Markdown. Minimal public/llms.txt structure: # YourProduct > Concise one-sentence description of what your product does. ## Key Pages - [Home](https://example.com/) - [Pricing](https://example.com/pricing) - [Docs](https://example.com/docs) You can test whether your live site serves a valid /llms.txt (and auto-generate one from your crawled site) using the free ShipCheck llms.txt Checker. 2. Don't accidentally block AI search crawlers in robots.txt Check /robots.txt to make sure you aren't silently blocking OAI-SearchBot, GPTBot, ClaudeBot, or PerplexityBot if you want organic discovery in AI answers. 3. Add baseline HTTP Security Headers Many default deployments ship without Strict-Transport-Security, Content-Security-Policy, X-Content-Type-Options: nosniff, or clickjacking protection. For Cloudflare Pages or Netlify, drop a public/_headers file: /* Strict-Transport-Security: max-age=31536000; includeSubDomains; preload X-Content-Type-Options: nosniff X-Frame-Options: DENY Referrer-Policy: strict-origin-when-cross-origin Run a live check on your production headers here: ShipCheck Security Headers Audit. 4. Live-verify your og:image URL (not just the meta tag!) Meta tags can look right in source code while og:image returns a 404 or uses a relative path that breaks on X, Slack, or Discord. Always verify the resolved URL returns HTTP 200 with Content-Type: image/*: ShipCheck OpenGraph Preview Checker. --- If you want to run all 20+ checks automatically in 5 seconds (free, no signup), try ShipCheck — or run it from your terminal via our open-source CLI: buiphucminhtam/shipcheck-cli. What pre-launch bug has bitten you most often on launch day?
JavaScript from absolute zero · 3. Making decisions: conditions and the traps > JavaScript from absolute zero · Chapter 3 of 14 · Languages · new chapter every Tuesday morning > > By the end of this chapter: Write correct conditional logic and avoid the comparison mistakes the language invites. The problem Say you are a junior developer at a regional airline. You have been tasked with writing a small script for the check-in desk that calculates baggage fees. The rule is simple: if a suitcase weighs more than 20kg, the passenger must pay a £40 surcharge. If it is 20kg or less, it is free. You write a script that takes the weight and prints the result. However, because you haven't yet mastered how to make the computer choose between two paths, your script prints "Surcharge applied" for every single passenger. On a busy Saturday morning at Gatwick, 400 passengers check in. The staff, following the script's output, charge every person £40, including those with small carry-on bags. By 10:00 AM, the customer service desk is swamped with 150 angry travellers demanding refunds. The airline has to issue £6,000 in immediate refunds, and you are called into a meeting to explain why the "automated" system cannot tell the difference between a 5kg backpack and a 30kg trunk. The cost wasn't just the money; it was the loss of trust from the ground staff who now refuse to use your software, reverting to pen and paper. To fix this, you need to move beyond code that runs in a straight line and learn how to make the computer branch. Before you start You must have Node.js installed on your computer, as covered in Chapter 1. You should be comfortable creating a new text file and running it from your terminal (the command-line interface). To verify your setup, open your terminal and type: node -v You should see a version number, such as v20.10.0 or v22.0.0. If you see an error saying "command not found", return to Chapter 1 to complete the installation. How do we ask the computer a question? In Chapter 2, we learned about types like Strings (text) and Numbers. To make decisions, we use a third type: the Boolean. A Boolean can only ever be one of two values: true or false. We create Booleans by using comparison operators. These are symbols that compare two values and return a result. Open your terminal, type node to enter the interactive mode, and try these comparisons: 25 > 20 // Output: true 15 > 20 // Output: false The > symbol means "greater than". Because 25 is larger than 20, the computer evaluates that expression (a piece of code that produces a value) as true. Here are the primary comparison operators you will use: - > : Greater than - < : Less than - >= : Greater than or equal to - <= : Less than or equal to - === : Is exactly equal to - !== : Is not equal to Note the triple equals ===. In JavaScript, we use a single = to assign a value to a variable (e.g., let weight = 25). We use the triple equals === to ask if two things are the same. This is the most common source of bugs for beginners. How do we branch the path? To use these "true or false" answers, we use an if statement. An if statement tells the computer: "If this condition is true, run the code inside these curly braces. If it is not, skip it." A condition is simply any expression that results in a Boolean (true or false). The structure looks like this: if (weight > 20) { console.log("Surcharge applied"); } If the weight is 25, the code inside the { } (called a block) runs. If the weight is 10, the computer ignores everything inside the braces and moves to the next line of the script. To handle the "otherwise" scenario, we use the else keyword. This creates a second block of code that only runs if the first condition was false. if (weight > 20) { console.log("Surcharge applied"); } else { console.log("No fee"); } This is a binary decision. One of these two blocks will run, but never both. Why is === better than ==? JavaScript is an old language that tries very hard to be helpful, often to its own detriment. It has two ways to check for equality: == (loose equality) and === (strict equality). Loose equality (==) tries to convert the types of the values so they match before comparing them. This leads to "traps" that cause production crashes. For example: // In your terminal: "40" == 40 // Output: true (The string "40" is converted to a number) false == 0 // Output: true (The boolean false is converted to the number 0) "" == 0 // Output: true (An empty string is converted to 0) This "helpfulness" is dangerous. If a user leaves a "Price" field empty, your code might treat that empty string as the number zero, potentially giving away products for free. Strict equality (===) does not convert types. It checks if the values are the same and if the types are the same. "40" === 40 // Output: false (A String is not a Number) In modern professional JavaScript, we almost never use ==. You should use === by default to ensure your logic is predictable. What if there are more than two choices? Real-world logic often requires more than just "Yes" or "No". At the airline, perhaps bags over 20kg cost £40, but bags over 30kg cost £100. We handle this using else if. The computer checks these conditions in order, from top to bottom. As soon as it finds one that is true, it runs that block and ignores the rest. let weight = 35; if (weight > 30) { console.log("Heavy surcharge: £100"); } else if (weight > 20) { console.log("Standard surcharge: £40"); } else { console.log("No fee"); } The order matters. If you checked weight > 20 first, a 35kg bag would trigger the £40 fee and the computer would stop looking, missing the £100 rule entirely. Always check your most specific or most restrictive condition first. Build it We will build a "Gate Access Controller". This script will check a user's age and whether they have a VIP pass to decide if they can enter a restricted area. 1. Create a new file named access.js. 2. Add the following code, which sets up our initial data: let userAge = 17; let hasVipPass = true; 3. Now, add the logic. We want to allow entry if the user is 18 or older, OR if they have a VIP pass regardless of age. We use the || symbol, which means OR. (The && symbol means AND). if (userAge >= 18 || hasVipPass === true) { console.log("Access Granted"); } else { console.log("Access Denied"); } 4. Save the file. 5. Run the script in your terminal: ```bash node access.js ``` Confirm: You should see Access Granted because while the age is 17 (false), the hasVipPass is true. In an OR statement, only one side needs to be true. 6. Change hasVipPass to false in your code and save. Run it again. Confirm: You should see Access Denied because both conditions are now false. 7. Change userAge to 21 and save. Run it again. Confirm: You should see Access Granted because the age condition is now true. When this breaks Symptom: The code always runs the if block, even when it should be false. The Cause: You likely used a single equals = instead of a triple equals ===. if (hasVipPass = true) { // ERROR: This sets the variable to true, then evaluates it In JavaScript, assigning a value inside an if statement usually results in true. The Fix: Always use === for comparisons. Symptom: ReferenceError: weight is not defined The Cause: You are trying to compare a variable that hasn't been created yet with let. The Fix: Ensure your variables are declared at the top of the script before the if statement. Symptom: Both the if and the else blocks seem to be skipped (or the wrong one runs). The Cause: Check your "Truthiness". In JavaScript, the number 0, the value null, undefined, and an empty string "" are all considered falsy. If your variable contains any of these, if (variable) will behave as if it is false. The Fix: Be explicit. Instead of if (score), use if (score > 0) or if (score !== 0). What it costs Conditional logic is the "brain" of your code, but it comes with a readability cost. As you add more conditions, you might be tempted to put if statements inside other if statements (nesting). This creates what developers call the "Pyramid of Doom," where code drifts further and further to the right of the screen. Nested logic is difficult to test because every "branch" doubles the number of scenarios you have to check. A script with four independent if/else checks has 16 possible paths ($2^4$). If you can keep your logic "flat"—by using else if or by dealing with errors early and exiting—your code will be significantly easier to maintain three months from now. Furthermore, every if statement you write is a promise that you understand every possible input. If you check if (weight > 20), you are assuming weight is a number. If a user enters the string "Twenty", your comparison weight > 20 will result in false without an error, which might be the wrong business decision. In the interview In a professional interview, you will rarely be asked "What is an if statement?" Instead, an interviewer will probe your understanding of Equality and Truthiness. The Question: "What is the difference between == and === in JavaScript, and which should you use?" A weak answer: "=== is more strict and == is loose. You should use === because it's better." This is weak because it doesn't explain why or what the mechanism is. A strong answer: "=== is the strict equality operator. It checks both the value and the type of the operands without performing type coercion. == is the loose equality operator, which attempts to convert the operands to a common type before comparing. In production code, we prefer === because type coercion in == can lead to unexpected results, such as the empty string being equal to the number zero." Seniority levels: - Junior: Expected to know that === is preferred and can explain the basic syntax of an if/else block. - Senior: Will discuss "falsy" values and how to handle edge cases (like null or undefined) to prevent the script from crashing. They will also mention avoiding deeply nested conditions to keep code readable. - Lead/Manager: Will focus on the business logic risk. They want to know how you ensure that the logic covers all requirements and how you handle "default" states when no conditions are met. Your tasks 1. The Temperature Warning: Write a script where a variable temperature is set to a number. If it is above 30, print "Stay hydrated". If it is below 10, print "Wear a coat". Otherwise, print "Enjoy the weather". 2. The Broken Comparison: Copy the following code into a file and run it. It will not work as expected. Fix the comparison so it correctly identifies when the status is "active". ```js let status = "inactive"; if (status = "active") { console.log("System is running"); } else { console.log("System is down"); } ``` 3. The Login Validator: Create a script with two variables: username and password. If username is exactly "admin" AND password is "12345", print "Welcome, Admin". Otherwise, print "Login failed". 4. The Truthiness Test: Create a variable userInput and set it to an empty string "". Write an if/else statement that checks if the string is empty. Note: You can check the length of a string using userInput.length. If the length is 0, print "Please enter a name". --- Your tasks this week Do the exercises above before the next chapter. Reading a tutorial and doing one are different activities and only one of them changes what you can build. Stuck on any of them? Say so — describe what you tried and what happened: tell me where you got stuck. I read every one, and the questions that come back more than twice get answered in the next chapter. JavaScript from absolute zero Chapter 3 of 14. New chapter every Tuesday morning. Next: Repeating work: loops and the array methods that replace them. · The full syllabus and every chapter so far · Subscribers also get the condensed notes for this chapter, the running recap of everything the series has covered, and the extended guidance: subscribe --- Written by Amit Chakraborty — founding engineer and senior architect: React Native, AI and RAG systems, production architecture. Portfolio · LinkedIn · GitHub. Need this built, reviewed or taught to your team? Get in touch or email [email protected]. Available for senior and founding engineering roles, consulting and training, remote worldwide.
OpenSSL skips constant-time reduction on multi-prime RSA, letting 604 branch queries recover secret primes. Clean cryptographic execution, assuming the target politely disables blinding first.
マルチテナントの MCP サーバー、テナントを URL から見るか?ログインから見るか? claude[.]ai で両方試す 今日の問い 前回は、MCP サーバーのメタデータの authorization_servers に、テナントごとの認可サーバーを2つ並べてみました。結果、claude.ai は1つ目しか見ず、どちらの認可サーバーへ行くかを選ばせてくれませんでした。 では、テナントは、どこで選ばせればいいのでしょうか。 とくに困るのは、2つのテナントに属している人です。たとえば、テナント A とテナント B の両方で仕事をしているユーザーがいるとします。仮に dave としましょう。dave は、claude.ai から、どうやって「いまはテナント A として使う」「いまはテナント B として使う」を選べばいいのでしょうか。 今回は、テナントを選ばせるやり方を2つ考えて、それぞれ試してみます。 TL;DR - MCP サーバーの URL をテナントごとに分けると、会話の中で Claude が選ぶ(聞いてくるか、両方使う) - 認可サーバーのログイン画面で選ばせると、dave がログインのときに選ぶ。今回試した範囲では、切り替えはログインし直し - 前者は標準の範囲、後者は認可サーバーの独自機能(Keycloak の Organizations)頼み テナントを選ばせる場所 前回の感想では、テナントごとに URL を分けると「公式の URL は1つ」という形が崩れる、と悩んでいました。でも、調べてみると、URL は1つとは限らないようです。Claude のドキュメントによると、公式のコネクターでも、顧客ごとに違う URL(たとえば https://tenant-a.mcp.example.com/mcp)で繋がせることができるそうです。 URL を分けるのもありだとすると、テナントを選ばせる場所は2つありそうです。 | | やり方1:URL で選ばせる | やり方2:ログイン画面で選ばせる | |---|---|---| | MCP サーバーの URL | テナントごと | 1つ | | 認可サーバー(realm) | テナントごと | 1つ | | テナントの見分け方 | URL と iss | トークンの中の何か | | dave のコネクター | テナントの数だけ | 1つ | | dave のアカウント | テナントの数だけ(realm ごとに別の人) | 1つ(1人が2つの組織に属する) | やり方1:URL で選ばせる MCP サーバーの URL をテナントごとに分けて、それぞれのメタデータに、そのテナントの認可サーバーだけを書きます。 https://tenant-a.mcp.example.com/mcp → メタデータには tenant-a の認可サーバーだけ https://tenant-b.mcp.example.com/mcp → メタデータには tenant-b の認可サーバーだけ URL ごとにメタデータを置けば、claude.ai が1つ目しか見なくても困りません。 !dave はテナント A と B のコネクターを両方登録する。MCP サーバーはホストごとにメタデータを持ち、それぞれ別の realm を指す。claude.ai には read_note が2つ並ぶ 図1:やり方1。テナントごとにコネクター、URL、realm が分かれる。ツールは2つ並ぶ このやり方だと、dave はテナント A と B のコネクターを、両方登録することになります。すると、同じ名前のツール(read_note)が2つ並びます。 dave が「メモを見せて」と頼んだら、claude.ai はどちらのツールを使うのでしょうか。 やり方2:ログイン画面で選ばせる URL を1つのままにしたいなら、認可サーバーのほうも1つにしてしまう手があります。 ただ、そうすると「どのテナントの人か」を、どこで見分ければいいのでしょうか。前回は、テナントごとに認可サーバー(realm)が違ったので、トークンの iss で見分けられました。認可サーバーが1つなら、iss もみんな同じです。 トークンの中に、テナントを書いてもらえないでしょうか。 !dave のコネクターは1つ。MCP サーバーのメタデータは1つの realm を指し、realm の中に組織が2つある。dave は両方に属する 図2:やり方2。コネクターも URL も realm も1つ。テナントは realm の中の組織 Keycloak のドキュメントを探すと、Organizations という仕組みがありました。 ドキュメントによると、realm の中に組織(テナント)を作って、ユーザーを所属させられるそうです。realm ごとに、設定で Organizations をオンにして使います。 組織の情報は、organization スコープを頼むとトークンに入ります。organization スコープは、すべてのクライアントに「頼めば付く(optional)」スコープとして、はじめから付いているそうです。特定の組織だけを頼むときは、organization:tenant-a のように書きます。 あれ、organization スコープ。どこかで見覚えがあります。前々々回、claude.ai のトークンの scope を見たときに、並んでいました。claude.ai は、認可サーバーのメタデータの scopes_supported に並んだスコープを全部頼んでくるので、organization も頼んできていたわけです。 つまり、Keycloak にはトークンにテナントを入れる仕組みはありそうです。では、2つの組織に属する dave のトークンには、どちらが入るのでしょうか。 もし両方入ってしまったら、MCP サーバーは、dave がどちらのテナントとして来たのかを決められません。そのときは、ツールの引数でテナントを渡してもらうことになりそうです。ただ、その値は claude.ai が渡してくるものなので、そのまま信じるわけにはいきません。 トークンの中の所属と突き合わせて、本当にそのテナントに属しているかを確かめる必要があります。 :::note info テナントが違うのに、realm は1つでいいの? realm は、Keycloak の中でいちばん強い仕切りです。ユーザー、クライアント、ログイン画面、鍵(iss)まで、realm ごとに丸ごと別になります。別の realm のユーザー同士は、同じ名前でも別人です。 Organizations は、1つの realm の中に作る、もっと軽い仕切りです。ユーザーやログイン画面、鍵は realm で共有したまま、「このユーザーはどの組織に属しているか」だけを持ちます。同じ realm の中なので、1人のユーザーが2つの組織に属することもできます。 仕切りの強さを落としてでも、ユーザーを共有したい、iss を1つにしたい、というときの選択肢のようです。 ::: 確かめたいこと | 確かめたいこと | 気になる理由 | 予想 | |---|---|---| | やり方1:dave がテナント A と B のコネクターを両方登録して「メモを見せて」と頼むと、claude.ai はどちらのツールを使うか | 同じ名前のツールが2つ並ぶ | 聞き返さずに、どちらか片方を使う | | やり方2:dave のトークンには、どちらのテナントが入るか。ログインのときに選ばされるか | claude.ai は、テナントを1つ選ぶ頼み方をしてこない | 両方入る。選ばされない | !予想。やり方1 では claude.ai が「read_note が2つあるで。どっち使お?」と迷い、予想は「聞かずに、どちらか片方を使う」。やり方2 では Keycloak が「dave は A にも B にもおるな。トークンにはどっち入れよ?」と迷い、予想は「両方入る。選ばされない」 図3:確かめたいことと、予想 やり方1 の「どちらのツールを使うか」は、claude.ai の仕組みというより、Claude がその場でどう選ぶかの話です。同じ頼み方でも、毎回同じとは限りません。なので、頼み方を変えて試します。 作ってみる 作るもの 前回の構成のまま、やり方1 と やり方2 を、1つの MCP サーバーに同居させます。来たホスト名で出し分けます。パスはどれも /mcp です(パスで分けなかった理由は、別の記事に書く予定です)。 | MCP サーバーのホスト | 認可サーバー | テナントの決め方 | |---|---|---| | テナント A 用、テナント B 用 | realm tenant-a、tenant-b(前回のまま) | ホスト名と iss | | それ以外(1つ) | realm shared(新設。Organizations をオン) | トークンの organization クレーム | DB(前回のものに変更) - notes テーブルに tenant の列を足す - 一覧と1件の読み出しは、持ち主(iss と sub)に加えて、テナントでも絞る - やり方2 は iss が全員同じで、dave の sub も1つ。持ち主だけで絞ると、テナント A と B のメモが混ざってしまう MCP サーバー(前回のものに変更) やり方1(テナントごとのホスト) - ホストごとにメタデータを置く。authorization_servers には、そのテナントの認可サーバーだけを書く - そのホストで受け付けるのは、そのテナントの認可サーバーが出したトークン(iss)だけ。テナントはホスト名で決まる やり方2(それ以外のホスト) - メタデータの authorization_servers には、realm shared だけを書く - トークンの organization クレームを読む - 組織が1つなら、それをテナントにする - 2つ以上なら、ツールの引数 tenant で選んでもらう。クレームに入っていないテナントを指定されたら断る - 1つも入っていなければ、「テナントがわからない」と返す 両方 - ツールの結果に、どのテナントとして読み書きしたか(tenant)を入れて返す Keycloak(前回のものに足す) - realm tenant-a と tenant-b(やり方1 用):前回の realm(alice と bob、carol)に、dave を両方に足す。dave は realm ごとに別のアカウントになる - realm shared(やり方2 用):Organizations をオンにして、組織 tenant-a と tenant-b を作る。alice を tenant-a に、dave を両方に所属させる - 所属は、管理者が決める値にする。ユーザーが自分で書き換えられる値(メールアドレスなど)からは決めない(前回の nOAuth の話) !1台の Keycloak に realm が3つ。tenant-a には alice、bob、dave、tenant-b には carol と dave。shared の中には組織 tenant-a と tenant-b があり、alice は tenant-a に、dave は両方に属する 図4:Keycloak 1台に realm を3つ。dave は、やり方1 では realm ごとに別人、やり方2 では1人で2つの組織に属する 公開する 構成は、前回とほぼ同じです。MCP サーバー用のトンネルだけ、テナントの分だけ増えます。 - MCP サーバー用のトンネルは3本(やり方2 用、テナント A 用、テナント B 用)。サブドメインが違うので、ホスト名がそれぞれ違う。どれも同じ MCP サーバーに届く - Keycloak のホストは1つのまま、/realms/tenant-a、/realms/tenant-b、/realms/shared に分かれる !前回とほぼ同じ構成。MCP サーバー用のトンネルが3本に増え、どれも同じ MCP サーバーに届く。Keycloak の realm は tenant-a、tenant-b、shared 図5:MCP サーバー用のトンネルが3本に。MCP サーバーはホスト名でテナントを見分ける 実際に作ったもの - github.com/kou1046/advent2026-mcp-authz/tree/main… make tunnel # claude.ai に登録する URL が3つ(テナント A 用、テナント B 用、やり方2 用)表示される(パスワードもここで表示される) make smoke # 手元だけで、テナントと持ち主の両方で絞られていることを確かめる make down # 試し終わったら、トンネルごと止める 繋いでみる やり方1:URL で選ばせる テナント A 用とテナント B 用の URL を、別々のコネクターとして登録します。ログインは、それぞれの realm の dave です。 まずはテナント A だけを繋いでみます。ふつうに使えました。 両方を登録して、「tenant mcp を使って、メモを適当に書いて一覧してみて」と頼んでみます。 !Claude が「tenant に当てはまる MCP が2つあります。先にどちらか確認させてください」と聞き、tenant-b と答えると、tenant-b にメモを1件書き込み、一覧で確認した 図6:どちらのテナントか聞いてきて、選んだテナント B にだけ書いた ちゃんと聞いてきた。てっきり、黙ってどちらかを使うと思っていたのですが、ハズレでした。 今度は、新しいチャットで「メモを見せて」とだけ頼んでみます。 !Claude が tenant-a と tenant-b の両方の read_note を呼び、「このメモは tenant-b のものです。tenant-a には1件もありませんでした」とまとめている 図7:聞かずに、両方読んでまとめた 両方のツールを呼んで、まとめてきました。どのメモがどのテナントのものかも、ちゃんと分けて書いています。ツールの結果に tenant を入れておいたのが効いていそうです。 やり方2:ログイン画面で選ばせる URL を1つだけ、handson という名前で登録して、realm shared の dave でログインします。 ユーザー名を入れたところで、見慣れない画面が出ました。 !Keycloak のログイン画面に「Select an organization to proceed:」と出て、tenant-a と tenant-b のボタンが並んでいる 図8:Keycloak が、どの組織で入るかを聞いてきた おお、選ばせてくれるんだ。claude.ai が頼んできたのは、素の organization スコープです。2つの組織に属している dave には、Keycloak のほうが、どちらで入るかを聞いてくれました。 tenant-a を選んで繋ぐと、トークンの organization クレームには tenant-a だけが入っていました。 "organization": ["tenant-a"] !Claude がメモを読み、「メモが1件もありません(テナントは tenant-a)」と返している 図9:ログインで選んだテナント A として使えた では、このままテナント B のメモを頼むとどうなるでしょうか。 !Claude が引数 tenant に tenant-b を入れて read_note を呼び、「テナント tenant-b には属していません」と断られている。Claude は「tenant-b に所属していないため書き込めません。アカウントを追加してもらう必要があります」と答えている 図10:引数で tenant-b を指定してきたが、MCP サーバーが断った Claude は、ツールの引数 tenant に tenant-b を入れてきました。MCP サーバーは、トークンの所属(tenant-a だけ)と突き合わせて断っています。ここは狙いどおりです。 ただ、Claude の返事は「tenant-b に所属していない」「アカウントを追加してもらう必要がある」でした。いや、dave は tenant-b にも属しているんですよね。このログインで tenant-a を選んだだけです。MCP サーバーの断り文句が「属していません」だったので、Claude はそれを素直に受け取ったようです。 テナント B を使うには、コネクターを再接続して、ログインし直します。もう一度、組織を選ぶ画面が出たので、tenant-b を選ぶと、トークンの中身も tenant-b に変わりました。 <details><summary>寄り道:ログインし直さずに、両方使えないか(試したけど諦めた)</summary> テナントを替えるたびにログインし直すのは、ちょっと面倒です。両方まとめてトークンに入れてもらえないでしょうか。 Keycloak には、organization:* というスコープの頼み方もあります。手元でログイン画面を通さずにトークンを取ってみると、これなら dave の organization には tenant-a と tenant-b の両方が入りました。逆に、素の organization で取ると、何も入りませんでした。素の organization は、ログイン画面で1つ選ばせる前提のようです。 あとは、claude.ai に organization:* を頼ませれば勝ち、と思ったのですが、ここから3回断られました。 !3回の試行。1回目は MCP サーバーのメタデータに organization:* を並べ、登録で Keycloak に断られる。2回目は登録の制限を外して organization も並べ、登録は通るがログインで断られる。3回目は WWW-Authenticate に organization:* を分けたが、claude.ai は登録にもそちらを使い、また登録で断られる 図11:organization: を頼ませようとして、3回断られた* 1回目。claude.ai が頼んでくるのは、ふだんは認可サーバーのメタデータの scopes_supported に並んだスコープで、そこには素の organization しかありません。MCP サーバーのメタデータにも scopes_supported を書けるので、organization:* を並べてみました。claude.ai は、ちゃんとそちらを頼んでくるようになりました。ところが、今度は Keycloak がコネクターの登録(DCR)を断りました。organization:* は、スコープの名前としては存在しないからです。 2回目。登録の制限を外して、organization も並べてみると、今度は登録は通りましたが、ログイン画面の手前で「スコープが正しくない」と断られました。organization と organization:* を一緒に頼むと、Keycloak は受け付けないようです。かといって organization を外すと、登録したクライアントに organization スコープが付かず、organization:* も効きません。 3回目。登録では organization を、ログインでは organization:* だけを頼んでくれればいいので、401 の WWW-Authenticate の scope に organization:* の一覧を書いて、置き場を分けてみました。ところが、claude.ai は登録にもそちらの一覧を使ってきて、また登録で断られました。 ここで見送りました。claude.ai は、登録とログインで同じスコープの一覧を使います。Keycloak は、登録とログインで違う一覧を求めます。この食い違いは、MCP サーバーの側からはどうにもできませんでした。なお、この試行はリポジトリには入れていません。 </details> 答え合わせ | 確かめたいこと | 予想 | 結果 | |---|---|---| | やり方1:dave がテナント A と B のコネクターを両方登録すると、claude.ai はどちらのツールを使うか | 聞き返さずに、どちらか片方を使う | どちらか聞いてくる、または聞かずに両方使う | | やり方2:dave のトークンには、どちらのテナントが入るか。ログインのときに選ばされるか | 両方入る。選ばされない | ログインで選んだ1つだけ。Keycloak が選ばせる | !結果。やり方1 では claude.ai が「どっち?って聞いたり、両方見てまとめたりするで」。結果は「聞いてくる、または聞かずに両方使う」。やり方2 では Keycloak が「どっちの組織で入る?選んでや」。結果は「ログインで選んだ1つだけ入る」 図12:答え合わせ 予想は、全部ハズレでした。 やり方1 では、テナントを選ぶのは Claude です。試した2回では、黙ってどちらかを使うことはなく、迷ったら聞く、または全部使ってまとめる、という動きでした。 やり方2 では、テナントを選ぶのは dave 自身で、場所はログイン画面です。今回の作りでは、1つのコネクターで同時に使えるのは1つのテナントだけで、切り替えるにはログインからやり直しでした。「作るもの」で用意した、組織が2つ以上入っていたら引数 tenant で選ぶ分岐は、claude.ai からは一度も通りませんでした。 感想 試してわかった違いを、並べてみます。 | | やり方1:URL で選ばせる | やり方2:ログイン画面で選ばせる | |---|---|---| | dave が用意するもの | コネクターもアカウントも、テナントの数だけ | コネクターもアカウントも1つ | | テナントの切り替え | 会話の中で(Claude が聞いてくるか、両方使う) | 再接続して、ログインし直す | | 同時に使えるテナント | 両方 | 1つだけ | | 1つの会話にテナントが混ざるか | 混ざりうる | 混ざらない | | テナントが増えると | realm とアカウントが増える | 組織を足すだけ | | 頼っているもの | 標準の範囲(iss) | Keycloak の独自機能(Organizations) | やり方1 は、テナントごとに専用の URL を用意するだけです。標準のプロトコルの範囲に収まるので、作るのは楽です。 そのかわり、ユーザーはテナントの数だけ URL を登録して、ログインしないといけません。2つならまだしも、5つあったらうんざりしそうです。 やり方2 は、URL が1つで済みます。登録は1回だけ。ユーザーから見たら、始めるのはこっちのほうが断然楽です(今回の作りでは、テナントを替えるたびにログインし直しの必要はありますが)。 そのかわり、テナントをトークンに入れるところに、認可サーバーの独自機能が入り込みます。今回は Keycloak の Organizations でしたが、別の認可サーバーに替えたら作り直しです。作る側と運用する側は大変そうです。ここは標準化される余地がないのか、気になりました。 結局、ユーザーの楽さを取るか、作る側の楽さを取るか、だと思いました。どちらが正解というより、何を優先するかを決めないといけない。要はバランス。なにごとも。 次回 次回は、claude.ai が MCP サーバーに繋ぐときの、OAuth のログインの流れを壊してみます。MCP の仕様では PKCE が必須になっていますが、PKCE や redirect_uri・state を省いたら、何が起きるのでしょうか。 ****
점심 먹고 다시 코딩 시작. 오늘 오전에 AI랑 짠 로그인 기능, `/AI업무보고` 치니 다 나옴. "세션 관리 문제로 try-catch 추가", "JWT 발급까지 완료, 리프레시 토큰은 내일" 이런 내용들이 한눈에 정리됨. 내가 뭘 시키고 왜 바꿨는지 바로 파악됨. jyoung9154/AIAgent_Report #AI개발 #업무보고 #광고
Rails・Laravel・Symfony・Spring Boot・Next.js で同じ画面を作って比べてみた はじめに 同じ Web アプリを、5つのフレームワークで作りました。 - TypeScript(Next.js 16 + Prisma 7) - Ruby on Rails 8.1(Active Record) - Laravel 13(Eloquent) - Symfony 8.1(Doctrine ORM 3.7) - Spring Boot 4.1(MyBatis) 画面・DB・データは5つとも同じです。違うのはフレームワークだけなので、「同じことをするのに、どこで差が出るか」が見えやすくなりました。この記事では、作ってみて違いが大きかった6つをまとめます。 作ったもの デジタル庁の「アドレス・ベース・レジストリ」の住居表示-住居マスター(東京都 1,752,573 件)を、検索・一覧表示・編集・削除する画面です。 検索は2種類あります。 1. DB 検索:MySQL を LIKE '%…%'(部分一致)で探す 2. Elasticsearch 検索:Elasticsearch(全文検索エンジン)で探す リポジトリ: - yamafifa/abr-web-ts - yamafifa/abr-web-rails - yamafifa/abr-web-laravel - yamafifa/abr-web-symfony - yamafifa/abr-web-spring 結論 - 速さは、5つともほとんど同じでした。 遅いのは DB で、フレームワークではありませんでした - 差が出たのは、DB まわりの「既定の動き」です。 複合主キー、LIKE のエスケープ、消えた行の更新、DB を作り直すコマンドなど、ふだん意識しない所で違いました - 特に、DB をほかのアプリと共用するときは、雛形のままだと危ない設定がいくつかありました 0. 速さはほとんど変わらない 市区町村「町田」+町字「木曽」で検索して、画面全体を返すまでの時間です(2026-11-23 に、3回ずつ測りました)。 | | DB 検索 | Elasticsearch 検索 | |---|---|---| | Next.js | 2.03〜2.09 秒 | 0.017〜0.019 秒 | | Rails | 2.04〜2.05 秒 | 0.015〜0.032 秒 | | Laravel | 2.04〜2.10 秒 | 0.026〜0.027 秒 | | Symfony | 2.04〜2.11 秒 | 0.014 秒 | | Spring Boot | 2.09〜2.12 秒 | 0.014〜0.018 秒 | - Spring Boot だけは ./mvnw spring-boot:run で測りました。ほかの4つは本番モードです - DB 検索は、前に % が付く LIKE なので MySQL のインデックスが効かず、毎回約 175 万行をすべて読みます。この2秒は、ほぼ MySQL の時間です - フレームワークを変えても、2秒は0.1秒も縮みません。速くするには、検索用のデータ(ここでは Elasticsearch)を作る必要がありました 1. 複合主キー 主キーは5列です。URL には、5列を _ でつないだ文字列(例:131016_0001001_006_001_)を使いました。5列目(rsdt2_id)は空のことが多いので、末尾が _ で終わります。 | | 複合主キーへの対応 | |---|---| | Prisma | @@id([...]) で5列を書ける | | Active Record(Rails 8) | 対応している。to_param は5列を _ でつないだ形になった | | Eloquent(Laravel) | 対応していない。保存・削除の WHERE を作る setKeysForSaveQuery を上書きして、5列を入れた | | Doctrine(Symfony) | 対応している。#[ORM\Id] を5つ付けるだけ | | MyBatis(Spring Boot) | SQL を自分で書くので、WHERE に5列を書くだけ | Rails 8 の to_param の形が、TypeScript 版で自分で決めた形と同じだったのは、少しうれしい偶然でした。Laravel だけは、URL の id との変換も自分で書きました。 2. LIKE のエスケープ 「%」で検索したら、全件が出てしまう。部分一致の検索で、よくある落とし穴です。%・_・\ をエスケープ(ただの文字として扱う)する必要があります。 | | LIKE のエスケープ | |---|---| | Prisma | contains は % と _ をそのまま LIKE に渡す。自分で書いた | | Active Record | sanitize_sql_like がある | | Eloquent | 無い。自分で書いた | | Doctrine | 自分で書いた(addcslashes($s, '\\%_')) | | MyBatis | 自分で書いた | 用意されていたのは Rails だけでした。ORM が「部分一致」の書き方を用意していても、エスケープまでしてくれるとは限りません(Prisma の contains)。 3. 消えた行を更新すると、成功扱いになる 編集画面を開いたあとに、ほかの画面でその行が削除された。そのまま保存したら、どうなるか。 | | 結果 | |---|---| | Prisma | update がエラー(P2025)を出す。「この行は無い」として扱えた | | Active Record | save が true を返した(0行の更新でも成功扱い) | | Eloquent | save が true を返した(試して確かめた) | | MyBatis | update が更新した行数を返す | Rails と Laravel は、何も更新していないのに「保存しました」と出してしまいます。そこで、Rails・Laravel・Symfony・Spring Boot では、更新の前に SELECT ... FOR UPDATE で行をロックして、行が無ければ「すでに削除されています」と出すようにしました(Rails は lock、Laravel は lockForUpdate、Symfony は LockMode::PESSIMISTIC_WRITE)。 4. 共用 DB を壊すコマンドと、雛形の初期設定 DB は5つのアプリで1つの MySQL を共用していて、テーブルは別のリポジトリ(データを入れるバッチ)で作ったものです。そのため、「DB を作り直す」コマンドを1回打つだけで、ほかのアプリのデータまで消えます。 | | 危ないもの | 止め方 | |---|---|---| | Next.js(Prisma) | マイグレーション | このリポジトリではマイグレーションしない | | Rails | db:drop(DB が消える)、db:schema:load(テーブルが空になる)など | rake タスクで止めた | | Laravel | migrate:fresh・db:wipe(テーブルが消える)など | 自分で書いたガードと DB::prohibitDestructiveCommands() | | Symfony | doctrine:schema:update が、知らないテーブル(Rails・Prisma の管理表)を DROP しようとする | disableCommand() でコマンドごと止めた。省略形(doctrine:sc:up)でも止まる | | Spring Boot | 表を作り直す道具(Flyway・Liquibase) | 入れていない。入っていないことをテストで確かめる | Symfony の doctrine:schema:update は、--dump-sql(SQL を出すだけで実行しない)で確かめたら、ほかのアプリの表を消す SQL が出ました。エンティティの定義を表に合わせても、ほかのアプリの管理表は「知らない表」なので消そうとします。 雛形(プロジェクトを新しく作ったときの初期設定)にも、共用 DB に向かないものがありました。 - Laravel:セッション・キャッシュ・キューを DB に置く設定で、composer create-project の最後に migrate を実行します。--no-scripts で作り、セッションとキャッシュはファイルに変えました。テストの設定は SQLite のメモリ DB でした - Symfony:DB は PostgreSQL、テストは DB 名に _test を付けた別の DB を使う設定でした。PostgreSQL を立てる compose.yaml も作られました - Spring Boot:MyBatis は SQL を自分で書くので、表を勝手に作ったり変えたりしません。起動時に SQL のファイルを流す設定も切りました(spring.sql.init.mode=never) 5. 入力エラーの返し方と、空文字の扱い 編集画面で入力エラーがあったときの返し方が、「422 で画面を返す」「redirect する」「Server Action の戻り値で返す」の3通りに分かれました。 | | 入力エラーのとき | 前後の空白・空文字 → NULL | |---|---|---| | Next.js | サーバー側の関数(Server Action)がエラーを戻り値で返し、ブラウザの React が編集画面に出す(useActionState) | ドメインの入力チェックに書いた | | Rails | 編集画面を 422 で返す | モデルに書いた | | Laravel | 編集画面へ redirect(302)して、入力値とエラーをセッションで渡す | 最初から入っているミドルウェア(TrimStrings・ConvertEmptyStringsToNull) | | Symfony | 編集画面を 422 で返す | Symfony Form の TextType が最初からやる | | Spring Boot | 編集画面を 422 で返す | コントローラーの @InitBinder(StringTrimmerEditor) | 6. CSRF 対策 CSRF(ほかのサイトからのなりすまし送信)の防ぎ方も、それぞれでした。 | | CSRF 対策 | |---|---| | Next.js | コードには書いていない。Server Actions は POST でしか呼べず、Origin ヘッダーと Host ヘッダーが合わないと止める(Next.js の公式の説明) | | Rails | 標準のトークン(csrf_meta_tags) | | Laravel | 標準のトークン(フォームに @csrf) | | Symfony | Symfony 8 の既定の「ステートレス」方式。セッションにトークンを置かず、送り元(Origin ヘッダー)が同じサイトかを見る | | Spring Boot | 自分で書いた。Origin ヘッダーを見て、別のサイトや送り元の分からないリクエストは 403 にする | Spring Boot は、Spring Security を入れていません。ログインの無いアプリには大きすぎるためです。代わりに、Symfony 8 の既定と同じ考え方(Origin を見る)で、フィルターを1つ書きました。 まとめ - 速さを決めていたのは DB で、フレームワークの差はほとんどありませんでした - 差が出たのは、複合主キー・LIKE のエスケープ・消えた行の更新など、DB まわりの細かい所です。どのフレームワークでも、「やってくれる」と思い込まずに、試して確かめるのが確実でした - DB をほかのアプリと共用するなら、雛形の設定と「DB を作り直すコマンド」を最初に見直します 出典 - データ:「アドレス・ベース・レジストリ」(デジタル庁) - 利用規約:公共データ利用規約(第1.0版)(PDL1.0) - 記事中の件数・時間は、上のデータをもとに筆者が計測・作成したものです
I Built a 100% Client-Side Invoice Generator with Accounting Features — Free & Open Source Most invoice tools want your email, your customers' data, and a subscription. I got tired of that, so I built FreeInvoice — an invoice generator that runs entirely in your browser. No server. No signup. Your data never leaves your machine. What it does - Create professional invoices: line items, quantities, VAT/GST, discounts, multiple currencies - Print / export to PDF straight from the browser - v2 adds an accounting (bookkeeping) dashboard so you can track revenue right next to your invoices - 100% client-side JavaScript — works offline, no telemetry, no tracking - Fully open source Live demo Try it here (no account needed): **4ff7cd8e.freeinvoice-app.pages.dev** Older build: 8bf8b525.freeinvoice-app.pages.dev Source code MIT-licensed, single-file app — easy to fork and customize: **qtnt2xxx-wq/freeinvoice-generator** Why client-side? Privacy is a feature. When the entire app is static HTML/JS, there is simply no backend that can read your invoice data. Hosting costs are ~zero (static pages), which is why I can give it away for free. Custom work If you need a white-label version, custom templates, or accounting features built on top, I do small freelance setups — pay via PayPal: paypal.me (or crypto on Base). Built this with zero budget and zero backend. Fork it, break it, improve it.
demerphq/xperl It looks like perlbrew can simply install xperl from it's checkout. #yapcjapan
I tested eight Claude Code skills on a production codebase. Here is everything that broke. I build websites for clients. I wrote eight Claude Code skills for the part of that job that is not writing code: client intake, proposals, pre-delivery QA, a launch checklist, performance and accessibility audits, handoff documents and change-request triage. I read them over and they looked fine. Then I tested them properly, and most of them fell over. This post is about how I tested them and the six ways they failed. If you write skills, some of this will probably save you time. The setup The method is simple, and it is the most useful thing in this post: 1. Open a fresh Claude session with no context. 2. Give it one SKILL.md, a real production repository (read-only), and a one-line request, the kind a customer would type. 3. Let it follow the skill. Then ask it to report what it produced and to criticise the instructions. 4. Rewrite the skill. 5. Run it again in a new session that has never seen the first output. Step 5 matters. A session that watched you fix things will tell you the fix worked. A new one owes you nothing. The six ways my skills failed 1. Instructions written for the easy case All eight skills assumed a small static site. On a React app with a component library, the accessibility checks returned nothing, because there was no literal <h1> or <div onclick> to find. The fix was a new first step: learn how this project renders its markup, then translate the checks to that. 2. Instructions that invite invented facts - "Compute the contrast ratio", when the colours live in a theme object the model cannot resolve. - "Say by when the bug will be fixed", when nobody gave a date. - "Give a timeline", without knowing how many hours a week the freelancer works. Each of these produces confident fiction. The fix: say what to do when the input is missing. Usually that is a placeholder or a question. It is never a guess. 3. No rule for size With 270 files, the model had to decide alone what to read and when to stop. It then reported a partial review as if it were complete. The fix: a reading order, a budget, and a required "not reviewed" section in the output. 4. A script that looks authoritative This is the one that worried me most. The QA skill runs a scanner script first. On the test codebase the scanner returned SHIP with zero blockers. That same code logs a password to the browser console. The skill did say "treat the output as leads", but only in one direction: it warned about false positives. Nothing told the model that a clean scan could be wrong too. The fix had two parts. The scanner got new rules for sensitive values written to the console. And the skill now says, in plain words, that a clean scan is not a pass, and lists what a script cannot see: a broken form, a navigation dead end, a layout that breaks on a phone, a missing privacy page. This is what the scanner prints now on a small broken demo site: Scanned 4 files in /path/to/launchdesk-scan/demo/client-site Automated verdict: HOLD (blockers: 5, should fix: 7, polish: 1) BLOCKERS src/components/Footer.jsx:3 Example domain or placeholder email return <footer><a href="mailto:[email protected]">Contact</a></footer>; src/lib/payments.js:2 Test payment key export const publishableKey = "[redacted]"; src/lib/payments.js:3 Localhost URL export const api = "http://localhost:3000/api"; src/pages/about.html:11 Placeholder text <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p> src/pages/index.html:1 Page is set to noindex - confirm this is intended before launch Notice that it never prints the secret it found, only the file and the line. 5. Rules that contradict each other - "Cite the WCAG criterion number" sat next to "only cite if you are sure". - "Price at 70% of the range" sat next to "warn if the price is below the hourly rate". The warning then fired on every option. You cannot find these by reading. You only find them by running the skill. 6. No hand-off between skills The change-request skill needed to know which proposal option the client had accepted. Nothing recorded it. The fix: one skill writes a small project record, and the others read it. The numbers Round one found 68 problems across the eight skills. After the rewrite I ran everything again, blind, on the same code: 54 fixed, 14 partly fixed, none untouched. One example: the handoff document first came out with 83 "to confirm" placeholders. After the rewrite it had 16, and every procedure in it was traced to its last step. All of this cost roughly 1.4 million tokens across three rounds. What I would do differently I would test before writing the landing page. It is tempting to describe what a skill does as soon as it reads well. What it does on real code is a different thing, and that is the one worth describing. The short version of the lesson: do not ship a skill you have only read. Run it on something real, with a session that owes you nothing. The scanner is free The scanner from failure 4 works on its own. It is one file, MIT licence, with no dependencies besides Node: npx github:Kioys/launchdesk-scan path/to/project Repository: Kioys/launchdesk-scan The pack The eight skills are sold together as LaunchDesk: $49, one payment, plain SKILL.md files you can read and change. I am the author. The testing method above works for any skill, whether you buy anything or not. If you try it, I would like to hear what broke.
Verify GitHub, Stripe, Shopify, and Svix Webhook Signatures in 40 Lines of Zero-Dependency Web Crypto JS Every webhook integration fails in the same three places: 1. You verify the signature against JSON.stringify(req.body) instead of the raw request bytes. 2. You mix up hex vs base64 digests across providers. 3. You forget that Standard Webhooks / Svix expects the whsec_ prefix stripped and the remainder base64-decoded before using it as an HMAC key. Most teams debug this by pasting webhook secrets into random online HMAC tools—which sends production signing secrets to a third-party server. You don't need a server or an npm package to sign and verify all four major webhook formats: the Web Crypto API (crypto.subtle) works identically in every modern browser and in Node 20+. Below is the exact ~40-line core we ship in Webhook & JSON Workbench (MIT, zero dependencies, runs 100% locally in your browser). 1. One HMAC-SHA256 helper for browser and Node const subtle = (globalThis.crypto && globalThis.crypto.subtle) || require('crypto').webcrypto.subtle; const enc = (s) => new TextEncoder().encode(s); const hex = (buf) => [...new Uint8Array(buf)] .map((b) => b.toString(16).padStart(2, '0')) .join(''); const b64 = (buf) => { let s = ''; for (const b of new Uint8Array(buf)) s += String.fromCharCode(b); return typeof btoa === 'function' ? btoa(s) : Buffer.from(s, 'binary').toString('base64'); }; const b64decode = (s) => { const bin = typeof atob === 'function' ? atob(s) : Buffer.from(s, 'base64').toString('binary'); return Uint8Array.from(bin, (c) => c.charCodeAt(0)); }; async function hmac(secret, message) { const key = await subtle.importKey( 'raw', typeof secret === 'string' ? enc(secret) : secret, { name: 'HMAC', hash: 'SHA-256' }, false, ['sign'] ); return subtle.sign('HMAC', key, enc(message)); } function safeEq(a, b) { if (a.length !== b.length) return false; let r = 0; for (let i = 0; i < a.length; i++) r |= a.charCodeAt(i) ^ b.charCodeAt(i); return r === 0; } Why safeEq? Standard === short-circuits on the first mismatched byte. Constant-time XOR comparison eliminates timing side-channels without pulling in a dependency. 2. The 4 provider formats side by side | Provider | Header | Signed Message | Key Format | Digest | |---|---|---|---|---| | GitHub | X-Hub-Signature-256 | rawBody | UTF-8 string | sha256= + hex | | Stripe | Stripe-Signature | ${t}.${rawBody} | UTF-8 string | t=...,v1= + hex | | Shopify | X-Shopify-Hmac-Sha256 | rawBody | UTF-8 string | base64 | | Svix / Standard Webhooks | webhook-signature | ${id}.${ts}.${rawBody} | base64decode(secret.replace(/^whsec_/, '')) | v1, + base64 | Here is the complete provider map: const PROVIDERS = { github: { async sign({ secret, body }) { return 'sha256=' + hex(await hmac(secret, body)); }, async verify({ secret, body, header }) { return safeEq(await this.sign({ secret, body }), String(header).trim()); }, }, stripe: { async sign({ secret, body, timestamp }) { return `t=${timestamp},v1=${hex(await hmac(secret, `${timestamp}.${body}`))}`; }, async verify({ secret, body, header, now, tolerance = 300 }) { const parts = Object.fromEntries( String(header).split(',').map((p) => p.split('=')) ); const ts = parts.t; if (!ts) return false; if (now != null && Math.abs(now - Number(ts)) > tolerance) return false; const exp = hex(await hmac(secret, `${ts}.${body}`)); return String(header) .split(',') .some((p) => p.startsWith('v1=') && safeEq(p.slice(3), exp)); }, }, shopify: { async sign({ secret, body }) { return b64(await hmac(secret, body)); }, async verify({ secret, body, header }) { return safeEq(await this.sign({ secret, body }), String(header).trim()); }, }, svix: { async sign({ secret, body, timestamp, id }) { const key = b64decode(String(secret).replace(/^whsec_/, '')); return 'v1,' + b64(await hmac(key, `${id}.${timestamp}.${body}`)); }, async verify({ secret, body, header, timestamp, id }) { const exp = (await this.sign({ secret, body, timestamp, id })).slice(3); return String(header) .split(' ') .some((p) => p.startsWith('v1,') && safeEq(p.slice(3), exp)); }, }, }; 3. Two subtle details that save hours 1. Key rotation headers: Both Stripe (comma-separated v1=... entries) and Svix (space-separated v1,... entries) send multiple signatures during secret rotation. Checking .some(...) instead of matching a single token keeps your handler alive during rotations. 2. Replay protection: Stripe's signature includes the Unix timestamp t. Enforcing Math.abs(now - Number(ts)) <= 300 (5-minute tolerance) stops attackers from replaying captured valid payloads later. Try it locally (no secrets leave your browser) - Live tool: Webhook & JSON Workbench — sign & verify GitHub/Stripe/Shopify/Svix headers, infer JSON Schema & TypeScript interfaces from payloads, validate mocks, and export curl / fetch / requests snippets. - Source code (MIT): quietstack-labs/webhook-json-workbench --- Building internal AI / webhook workflows? If you want production-ready local automation templates built with the same zero-bloat philosophy (40% off for Cyber Week via the links below): - MCP Automation Starter Kit ($49 → 40% off) — local Node.js MCP server + webhook & B2B lead/ops automation workflows. - Data Swiss-Army Converter Pro ($9 → 40% off) — offline JSON/CSV/YAML/SQL/ENV batch conversion toolkit. - Browse all 18 kits & free developer tools at QuietStack Labs.
One typo in a timezone could stop every scheduled job in Rerun --- title: "One typo in a timezone could stop every scheduled job in Rerun" published: true description: "Rerun saved \"Eastern\" as a timezone without complaint, and croner only threw later, inside the scheduler loop. Here's my two part fix." tags: typescript, node, opensource, debugging cover_image: dev-to-uploads.s3.us-east-2.amazonaws.com ai_disclosure_level: some_ai --- timezone: "Eastern" looks harmless. In Rerun it was saved without a word, and on the scheduler's next pass it could throw an error that kept every job lined up after it from even being checked. I came across it while reading the source. The report is issue #21 and the fix is rerun-build/rerun#22. The setup Rerun lets you host your own team of digital coworkers, each handling jobs from your tools on a timetable. A coworker's repeating jobs are its routines. Each routine has a cron expression (0 9 * * * means 9:00 every day) and, optionally, a timezone. Valid timezone names come from the IANA list, things like Europe/Paris, plus a few aliases such as UTC. Every 30 seconds the engine runs a tick: it loops over all routines of all active coworkers and fires the ones that are due. To know if a routine is due, it asks croner, the cron library, for the next run. Saved fine, broke later It's a bit like a booking form that happily accepts "Febtember 31". Nothing goes wrong until the day someone tries to use it. Neither the coworker's schedule_create / schedule_update tools nor the web routes checked the timezone. And croner accepts any timezone text when you build a schedule. The error waits until you request a run: > new Cron('0 9 * * *', { timezone: 'Eastern' }).nextRun() TypeError: CronDate: Failed to convert date to timezone 'Eastern'. ... The tick had no try around that call. One throw ended the loop for that tick, so every routine after the bad one went unchecked. The tick was also started with void tick(), so nothing caught the rejected promise, and by default Node ends the process on an unhandled rejection. That exit is my reading of the code: I checked croner's error, but never ran a full self hosted stack to watch the process go down. Fix one: skip, don't stop Both places that asked croner for a next run now go through a helper that wraps it in try/catch and returns null on failure. A routine with no next run is never due. The tick moves on, and schedule_list shows "never" for it. Rerun's own UI already treated broken routines this way. Fix two: refuse it on save No hand made list of zones. The check just asks croner: new Cron('* * * * *', { timezone }).nextRun() If that throws, the timezone is refused. That way the check accepts exactly what the scheduler can run. The tools reply with a message naming the bad value and save nothing, and the web routes return a 400. Europe/Paris, America/New_York and UTC pass; Eastern and Europe/Pariss don't. Without the fix, every new test goes red on main. ClementJanssens merged it, then posted a recap on the issue with a thank you. The lesson When a library validates lazily, borrow its own check and run it at the front door. And any loop that processes many people's jobs needs to survive one bad entry. Skipping the broken one costs nothing; stopping costs everyone else their turn. What's the strangest value you've seen slip past validation and break something later? The full story, with all the code, is on my blog: ashokramsi.hashnode.dev
Action Cable / AnyCable / Pusher互換のRust製リアルタイムサーバー「Cabby」を作りました(MIT・SQLite履歴対応) Cabbyとは Cabbyは、Rust(unsafe_code = "forbid")で実装したMITライセンスのリアルタイムサーバーです。 RailsのAction Cable、AnyCable、そしてPusherプロトコル(Laravel Echo / pusher-js)とドロップイン互換で動作します。 - 公式サイト(日本語対応):cabbyhq.com - ドキュメント(日本語対応):docs.cabbyhq.com - GitHub:DaniG2k/cabby なぜ作ったのか RailsのAction Cableは手軽に始められますが、同時接続数が増えてくると次のような課題が出やすくなります。 - アイドル接続が増えるほどRubyプロセスのメモリ使用量が増える - アプリのデプロイのたびにWebSocket接続が一斉に切れ、再接続スパイクが起きる - 切断中に取りこぼしたメッセージの再送(履歴リカバリ)や、プレゼンス・クライアントウィスパーが標準で備わっていない また、Pusher Channelsは便利ですが、同時接続数やメッセージ数に応じた課金や10 KBのペイロード上限がネックになるケースがあります。 CabbyはWebSocket / SSE / Durable Streamsの接続保持とファンアウトだけを担当し、認証やチャンネルのロジックは既存のアプリに残す設計です。 主な特徴 - Action Cable / AnyCable互換:既存のチャンネル・ブロードキャスト・JavaScriptをそのまま利用できます(AnyCable 1.6.21互換)。 - Pusherプロトコル対応:Laravel Echoやpusher-jsからもそのまま接続できます。10 KBのペイロード上限もありません。 - Redis不要の構成も可能:SQLiteブローカー+HTTPブロードキャストを使えば、ローカルの1ファイルだけでストリーム履歴とセッション復元が再起動後も維持されます。 - スケールアウト対応:マルチノード構成ではPostgres・Redis・NATSのpub/subとブローカーに切り替えられます。 - SSE / Durable Streams対応:WebSocketだけでなく、EventSourceを使ったサーバーからの片方向ストリーミングやオフセット指定での再取得にも対応しています。 - ランタイム依存ゼロの単一バイナリ:Linux(x86_64 / arm64)・macOS(Apple Silicon)向けバイナリとDockerイメージを提供しています。 30秒で試す Dockerがあればローカルですぐに起動できます。 docker run --rm \ -p 127.0.0.1:8080:8080 \ -p 127.0.0.1:8090:8090 \ ghcr.io/danig2k/cabby:0.5.3 --norpc --public 任意のバックエンドから通常のHTTPでブロードキャストできます。 curl -X POST http://localhost:8090/_broadcast \ -H 'Content-Type: application/json' \ -d '{"stream":"chat:lobby","data":"{\"text\":\"Hello from Cabby!\"}"}' RailsやHotwire、Laravel、Node.js、Djangoでの具体的な組み込み手順は、日本語ドキュメントにまとめています。 docs.cabbyhq.com ベンチマークとトレードオフ 同じマシン上での計測では、Action Cableと比べて接続あたりのメモリ使用量を約3分の1に抑えつつ、毎秒約6倍のメッセージを配信できました。詳しいグラフと計測条件は公式サイトに掲載しています。 一方で、現時点でCabbyが劣る点も正直に公開しています。 - OSスレッド数:アイドル接続10,000本でAnyCableの10スレッドに対し、Cabbyは102スレッドを使用します。 - PusherプロトコルでのSoketi比較:50,000 msg/s時のCPU使用量(0.78コア vs 1.03コア)と接続1本あたりの追加メモリ(3.8 KB vs 9.0 KB)ではSoketiのほうが少なく、アイドル接続が約19,000本を超えると合計メモリ量でもSoketiが有利になります。 おわりに まだ0.5.x系で、1.0.0に向けてセキュリティデフォルトの強化や実ネットワークでのマルチノードベンチマークを進めています。 使ってみた感想やIssue、改善提案などがあれば、ぜひGitHubでお知らせください! - cabbyhq.com - DaniG2k/cabby
Fuchikoma 0.0.2: a release you can check, for a gem that does nothing Originally published on my blog. Fuchikoma is a fiber-native, typed, one-process Ruby web framework, built in public. Version 0.0.2 contains no framework code yet. Fuchikoma 0.0.2 is out. It is the first version on RubyGems.org, and it still contains no framework code: the gem exposes Fuchikoma::VERSION and nothing else. What changed is everything around it. How a version travels from my laptop to your machine, and how you can check that what you downloaded is what I built. Fuchikoma in one sentence Fuchikoma aims to be the Ruby framework for one-process, fiber-native web applications with typed boundaries, secure-by-default data access and first-class agent support. Why start with the release pipeline A framework sits at the bottom of every application built on it, so whoever ships it is in a position of trust. The cheapest moment to build a trustworthy release process is when there is nothing to release: a mistake costs nothing, and every step is easy to read because the gem has no runtime dependencies. So 0.0.2 is plumbing. I would rather debug it now than on the day a real feature depends on it. What a release does now Pushing a signed tag such as v0.0.2 starts a workflow with four jobs. 1. Verify. The tag must be named vX.Y.Z, match Fuchikoma::VERSION, have a dated section in the changelog, be reported as verified by GitHub, and point to a commit on main. Then RuboCop, Steep, the tests and bundler-audit run. 2. Build. The gem is built twice, and the job fails if the two files differ by a single byte. It then writes a CycloneDX SBOM and a SHA256SUMS file, and attests the gem and the SBOM with build provenance. 3. Publish. The job waits for me to approve a protected GitHub environment, then pushes to RubyGems.org with trusted publishing: GitHub proves to RubyGems which workflow is pushing, in exchange for a short-lived token. There is no API key anywhere, not in the repository and not on my laptop. The job then checks that the gem it pushed is the one that was attested. 4. GitHub release. The gem, the SBOM and the checksums are attached, the notes come from the changelog, and every 0.x release is marked as a pre-release. Running the workflow by hand is a dry run: the first two jobs only, nothing published. Around it: - Dependabot watches the gems and the GitHub Actions every week, and bundler-audit runs on every pull request, on main and every week. - DEPENDENCIES.md sets the policy: fewer than 15 runtime gems, each one justified. Today there are none. - GOVERNANCE.md now requires every release manager to use multi-factor authentication and to sign tags. - RELEASING.md is the runbook, step by step, including what to do when something fails. Check it yourself require: GitHub CLI (gh) installed, sha256sum available gh release download v0.0.2 --repo KevinSaison/fuchikoma sha256sum -c SHA256SUMS gh attestation verify fuchikoma-0.0.2.gem --repo KevinSaison/fuchikoma gh attestation verify fuchikoma-0.0.2.cdx.json --repo KevinSaison/fuchikoma mkdir from-rubygems && (cd from-rubygems && gem fetch fuchikoma -v 0.0.2) cmp fuchikoma-0.0.2.gem from-rubygems/fuchikoma-0.0.2.gem && echo identical !terminal preview The gem served by RubyGems.org should be byte for byte the one that was attested. If it is not, please tell me. What broke Three things, in the order I met them. The SBOM tool produced an empty SBOM and exited successfully. I started with cyclonedx-ruby. Its only published version, 1.1.0, answered 0 gems were written and generated an empty document, because it does not describe the gem itself. An SBOM that is empty and green is worse than none. I replaced it with about a hundred lines of Ruby and shell (generate-sbom.sh). It resolves a throwaway Gemfile that contains only the gemspec, so the development tools never leak into the SBOM, and it fails if the gem is missing or if a development gem shows up. A pinned patch version did not exist. The audit workflow read 4.0.0 from .ruby-version. GitHub's new Ubuntu 26.04 runners only build the latest patch of each Ruby series, so the download was a 404. The workflows now ask for "4.0". The first push failed. The checks passed, and the publish job failed. To create a new gem, RubyGems.org requires the workflow to name the account that will own it, as a numeric owner when the OIDC token is exchanged. The two official actions I use had no input for it at the time I looked. Nothing was published. I wrote the token exchange myself, behind a repository variable that I remove once the gem exists, deleted the tag, merged the fix and pushed the tag again. One lesson went into the runbook: the pending trusted publisher on RubyGems.org expires after a few hours, so create it right before the first tag. Smaller things: Dependabot opened two pull requests within minutes, including a major bump of minitest to 6.1 that my single test survived, and the repository moved to another GitHub account along the way, so every link changed. What this does not prove - Not that the code is good. Trusted publishing and attestations tell you which workflow built the gem and from which commit. They say nothing about the quality of that commit. - Not that the build is reproducible everywhere. The gem built by the dry run on main and the gem built by the v0.0.2 tag run have the same SHA-256, and both are attested. I still haven't asked anyone to rebuild it independently. If you try and get different bytes, I want to know. - Not much about dependencies yet. With no runtime dependency, the SBOM lists a single component. It gets interesting when there is something to list. - Not that a second pair of eyes exists. I am the only release manager for now. That changes at gate A, when three maintainers and a fiscal host are in place. What this release is not It is not usable, and it does nothing. Don't depend on it. It exists so that the next releases are boring. What's next 0.0.3 is the first three RFCs: the fiber runtime and what blocks or yields (RFC 001), the schema DSL for params, bodies, responses and props (RFC 002), and the scope object with its explicit unscoped escape hatch (RFC 003). Each one is accepted only after a 14-day public comment period. These are the decisions that are hardest to undo, so this is where outside opinions matter most. How to get involved Read CONTRIBUTING.md, then open an issue or a discussion. Commits must carry a Signed-off-by line (git commit -s). Questions or comments? Join the discussion on GitHub: lien Release v0.0.2 Changelog
I Built ShortSafe: A Zero-Upload Safe-Zone & Hook Checker for Shorts, Reels & TikTok Every short-form creator has been there: you spend an hour editing a 9:16 video, upload it to YouTube Shorts, TikTok, or Instagram Reels, and realize the platform's action buttons or caption bar covered your hook. Most existing "safe zone" templates are either static PNGs traced from one phone or locked behind a sign-up wall. So I built ShortSafe — a 100% client-side, zero-upload web tool: 👉 Live Tool: jwrkh0943-ctrl.github.io What ShortSafe Does 1. Real Platform UI Overlays (4 Platforms) Toggle live overlays for YouTube Shorts (288/672/192/48 px), TikTok (240/660/120/120 px), Instagram Reels (269/672/65/65 px), and Naver Clip (240/600/180/80 px). Every margin is editable if a platform updates its UI. 2. Live Hook & Caption Spill Test Type your top hook and bottom caption, adjust font size (100%–130%), drag them around the 1080×1920 frame, and get instant pixel-spill warnings if anything crosses into a danger zone. 3. One-Click 1080×1920 Transparent PNG Export Export a transparent safe-zone overlay PNG (with or without red danger-zone tinting) and drop it directly on a track in CapCut, Premiere Pro, or DaVinci Resolve. 4. 100% Local & Private Videos and images stay in your browser via the File API and HTML5 Canvas — nothing is ever uploaded to a server. Open & Lightweight Stack - Pure vanilla HTML / CSS / JavaScript (zero dependencies, no build step) - Hosted on GitHub Pages: jwrkh0943-ctrl/shortsafe Try it out on your next vertical edit and let me know if any platform margins need tweaking!
We built a receipt book an AI can't quietly rewrite. Then we told Kiro to break it. Written as part of the Kiroween 2026 hackathon. Here is a small nightmare. Maya runs a furniture workshop, and her AI agent pays the bills through PayPal. On Monday she pays a supplier $1,836.00. On Tuesday the supplier's "SECOND NOTICE" arrives, because the reminder and the payment crossed in the mail. The AI looks in PayPal, doesn't see the money land yet, and pays again. We had already built a tool that catches that one. It checks PayPal's own records before money moves and holds the payment for Maya, who declines it on her phone. Problem solved, right? Then an accountant friend asked the question that ruined our week: "A month from now, how does Maya prove she declined it?" The record of her decision lives in the same system the AI runs on. Whoever runs that system can edit it. "The software says she declined" is not proof. It's a story. So for Kiroween we dug up something from the office supply graveyard: the carbon-copy receipt book. Two sheets, one stroke of the pen, and the copy can't be changed without it showing. Carbon Copy gives every move the AI makes a copy, sealed to the one before it. Change one word, one amount, one receipt, and the check names the exact receipt. Maya's phone keeps a stamp every time she taps, so even a book rewritten from scratch gets caught. How Kiro built it We never vibe coded this one. When the product is "a record nobody can change without it showing", a change nobody wrote down is exactly the bug you exist to catch. So everything went through Kiro's spec: one spec, 20 requirements, 25 tasks, and the spec itself changed 18 times as we found gaps. Each task went to the Kiro CLI as one instruction, with the spec and three steering files as the only source of truth (no AI decides a payment; the book is append only; checking needs no secret; no keys in the repo). Every Kiro run is saved in the repo, with the instructions it was given and its own report. The part we didn't expect to love: an agent whose only job is to betray us Kiro lets you build custom agents. We built one called carbon-attacker. Its whole job is to break the book: forge it, rewrite it, hide a change, cause a false alarm, and report only what it can prove with a test. We thought we'd built something solid. The attacker disagreed. Round one: six weak spots. We fixed them, spec first. Round two: seven more. Round three: thirteen. Round four, on code we'd written to fix round three: twelve. That's 38 in all, each one fixed or written down as a limit. Some were humbling. Payments made through the MCP connection left no receipt at all. Two approvals on the phone could pay the same bill twice. A timeout after PayPal had already taken the money got recorded as "not sent". And our favourite: the check that runs "in Maya's own browser" is code our own server sends, so a dishonest operator could send a check that lies. That one made us ship verify.html, a single file you save from GitHub and open with no internet at all. Here's the thing: none of those were in the cryptography. They were in the boring parts around it. That's where real systems break, and we'd never have found them by admiring our own work. Then we stopped trusting our own small examples We replayed every one of the 1,444 recorded AI runs from our earlier project through the book: 2,888 books, 45,571 receipts. Then we changed every single receipt, one at a time, and checked each one. All 45,571 changes were caught, at exactly the right receipt. That test now runs on every push. What changed in how we build Before Kiro, "done" meant the tests passed. Now "done" means our own attacker ran out of ideas. Writing the requirement first felt slow for about a day. Then the attacker found something, and the fix started with one sentence in the spec instead of a frantic patch, and every later run of Kiro knew about it. That's the real win: the spec remembers what we learned. If you want to try to break it yourself: run Maya's day in the live demo, decline the double payment on her phone, and press Try to forge a new book. If you find a 39th weak spot, we'd honestly like to hear about it. Live demo: carbon-copy-ywv3.onrender.com Code: JosephCirello/carbon-copy Video: youtu.be
All Xbox 360 Call of Duty games ported to Android Hey mobile gamers! I would like to share all the available Call of Duty titles that are playable on Android ported from Xbox 360. We know that Xbox 360 games have the graphics close to PC versions, so it is the developers' choice to make a port because these games have lesser size than PC versions. Here are the four COD games made by a single developer: COD Advanced Warfare github.com/yassinsolim/aw-recomp/releases COD4 MW3 yassinsolim/mw3-recomp COD4 MW2 yassinsolim/mw2-recomp COD4 MW1 yassinsolim/cod4-recomp Here's another one made by a single developer: COD Black Ops 2 github.com/spartansprm/BO2-Android-xbox360/releas… You need to provide your own copies of Xbox 360 games in .iso format. Follow developer's instructions in their GitHub page. All of these games are tested on Xiaomi 15 SD 8 Elite with 60fps (with no significant drops during heavy fighting) and 840p resolution with latest Turnip driver from here: The412Banner/Banners-Turnip (For Yassin's port, using default driver will result to black screen, and graphics flickering. Use the driver from the link) All of the touch controllers are similar to COD Mobile (floating/dynamic left stick, better camera (look) swipe, better aiming with swipe, etc.)(these are disabled by default, enable it first before playing) except the left stick touch controller of COD Black Ops 2 game that is not dynamic. SD 8 Elite and up: Recommended settings of Yassin port of COD titles select "Battery Saver" option. Then go to "Custom", set FPS to 60 for smooth gameplay and aiming. These settings won't throttle your device. It will stay below 40 degrees for battey temp, and below 55-60 degrees Celsius for CPU temp. Recommended for long gameplay without cooling fan attached. For COD Black Op2 better to stay at 30FPS to avoid heating your device. You may try these settings on other snapdragon SoC.
Fail2ban service configuration overhaul Hi, I am currently working on some ideas for improving the way the fail2ban service is managing its configuration and want to gather some feedback from other Fail2ban users. Idea 1: Adding options for actions and filters As the name suggests, this entails adding options for specifying actions and filters to replace having to touch environment.etc with dedicated options under services.fail2ban, improving type checking and modularity. This was alreadysuggested over 3 years ago and is implemented by me in an open pull request, which is why I would be grateful for people to check if their current configuration can be expressed using these options without touching environment.etc. Idea 2: Disallow configuration via environment.etc Should idea 1 be accepted I would like to disallow configuration via the old way to ensure everything goes through the service options, which allows things like checking the resulting configuration via fail2ban-client --test. Idea 3: Cleaning up services.fail2ban.jails Currently the jails option is pretty complex, additionally allowing raw string input and creating filters. Since the raw string input has been superseded by freeform module settings since 3 years I plan on removing it, unless somebody has a configuration which can not use the freeform settings. Additionally, I want to remove the special handling of the filter option, which currently allows either specifying the name of a filter or a filter configuration (which will be turned into a filter). Since this feature is half-broken since almost two years and ignored in the example and Wiki I want to ask if anybody is actually using this feature, and if using the new options from the first idea would be an acceptable replacement.