<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Xeron</title><description>𝑓𝑙𝑜𝑤 𝑤𝑖𝑡ℎ 𝑙𝑖𝑓𝑒 · 𝑒𝑥𝑝𝑒𝑐𝑡 𝑛𝑜𝑡ℎ𝑖𝑛𝑔</description><link>https://blog.040304.xyz/en/</link><item><title>Trading Is a Practice</title><link>https://blog.040304.xyz/en/posts/know-the-stage/</link><guid isPermaLink="true">https://blog.040304.xyz/en/posts/know-the-stage/</guid><description>Do the right thing at the right stage. FOMO, boredom, itchy hands and fantasy are what stand in the way</description><pubDate>Sun, 27 Sep 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Know what to do at each stage&lt;/p&gt;
&lt;p&gt;Do the right thing and you get results&lt;/p&gt;
&lt;p&gt;It isn’t simple. FOMO, boredom, itchy hands, fantasy&lt;/p&gt;
&lt;p&gt;Walls at every turn. Trading is the practice of getting past them&lt;/p&gt;</content:encoded></item><item><title>Robinhood Is Plugging Stocks Into the Casino</title><link>https://blog.040304.xyz/en/posts/robinhood-stock-meme/</link><guid isPermaLink="true">https://blog.040304.xyz/en/posts/robinhood-stock-meme/</guid><description>On Robinhood Chain, memes now trade against stock tokens — stocks and crypto are merging into one liquidity network</description><pubDate>Tue, 01 Sep 2026 16:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Robinhood Chain is hot again&lt;/p&gt;
&lt;p&gt;PONS, CASHCAT, AI and a few others ran to 9-figure caps. DEX volume went from $150–200M at the August lows to over $1.5B&lt;/p&gt;
&lt;p&gt;At first glance it looks like another chain having its meme season&lt;/p&gt;
&lt;p&gt;The more I watch, the less I think the memes themselves are the point&lt;/p&gt;
&lt;p&gt;What’s actually interesting is stocks and crypto getting plugged into the same liquidity network&lt;/p&gt;
&lt;p&gt;I’m calling it the &lt;strong&gt;stock-meme&lt;/strong&gt; trade for now&lt;/p&gt;
&lt;h2 id=&quot;stocks-just-became-the-underlying-for-memes&quot;&gt;Stocks just became the underlying for memes&lt;/h2&gt;
&lt;p&gt;Memes used to be simple&lt;/p&gt;
&lt;p&gt;On Solana: &lt;code&gt;MEME / SOL&lt;/code&gt;. On EVM: &lt;code&gt;MEME / ETH&lt;/code&gt; or &lt;code&gt;MEME / USDC&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Crypto money just spinning inside crypto&lt;/p&gt;
&lt;p&gt;Robinhood Chain is different&lt;/p&gt;
&lt;p&gt;Now you see &lt;code&gt;AI / NVDA&lt;/code&gt;, &lt;code&gt;SPACEHOOD / SPCX&lt;/code&gt;, &lt;code&gt;BONER / HIMS&lt;/code&gt;, &lt;code&gt;MOO / MU&lt;/code&gt;, &lt;code&gt;SAYLORMOON / MSTR&lt;/code&gt;, &lt;code&gt;FATCOIN / LLY&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Memes quoting directly against stock tokens&lt;/p&gt;
&lt;p&gt;AI against NVIDIA. SPACEHOOD against SpaceX. MOO against Micron. FATCOIN against Eli Lilly&lt;/p&gt;
&lt;p&gt;It’s not just borrowing a ticker in the name. The stock token is inside the LP&lt;/p&gt;
&lt;p&gt;You buy AI with stables, the router might first buy NVDA stock token, then buy AI with NVDA&lt;/p&gt;
&lt;p&gt;For the first time, stocks actually become the meme’s &lt;strong&gt;quote asset / liquidity / narrative&lt;/strong&gt;&lt;/p&gt;
&lt;h2 id=&quot;this-is-not-a-small-experiment-anymore&quot;&gt;This is not a small experiment anymore&lt;/h2&gt;
&lt;p&gt;Robinhood only opened the chain mainnet in July. The original pitch wasn’t memes at all — it was RWA&lt;/p&gt;
&lt;p&gt;Robinhood Stock Tokens are standard ERC-20s. Transferable, tradable, can go into lending, be used as collateral, composed by any DeFi protocol&lt;/p&gt;
&lt;p&gt;Degens naturally found the use case: launch memes against stocks&lt;/p&gt;
&lt;p&gt;As of Sep 1, someone scanned on-chain&lt;/p&gt;
&lt;p&gt;Among the top 19 Robinhood Stock Tokens by liquidity, there are already &lt;strong&gt;432 stock-meme LPs&lt;/strong&gt;. Those pools lock about &lt;strong&gt;17.2% of all on-chain stock token float&lt;/strong&gt;, but generate &lt;strong&gt;31.3% of those tokens’ DEX volume&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Single pools are even crazier&lt;/p&gt;
&lt;p&gt;One AI / NVDA pool locks ~16.2% of all on-chain NVDA tokens. BONER / HIMS at one point locked ~50% of all HIMS tokens&lt;/p&gt;
&lt;p&gt;This isn’t a few coins coincidentally using stocks as a pair. It’s becoming its own asset class on Robinhood Chain&lt;/p&gt;
&lt;h2 id=&quot;what-actually-matters-is-the-on-ramp-changed&quot;&gt;What actually matters is the on-ramp changed&lt;/h2&gt;
&lt;p&gt;Easy to get this wrong: is TradFi money flooding into crypto now?&lt;/p&gt;
&lt;p&gt;No evidence for that yet. No sign that hordes of stock holders are selling to ape memes&lt;/p&gt;
&lt;p&gt;What actually happened is Robinhood connected two pools that used to be separate&lt;/p&gt;
&lt;p&gt;Before, two worlds&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes min-light night-owl&quot; style=&quot;--shiki-light:#24292eff;--shiki-dark:#d6deeb;--shiki-light-bg:#ffffff;--shiki-dark-bg:#011627; overflow-x: auto; white-space: pre-wrap; word-wrap: break-word;&quot; tabindex=&quot;0&quot; data-language=&quot;text&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Stock pool: NVDA / MSTR / HIMS&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Crypto pool: ETH / Stablecoins / Memes&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes min-light night-owl&quot; style=&quot;--shiki-light:#24292eff;--shiki-dark:#d6deeb;--shiki-light-bg:#ffffff;--shiki-dark-bg:#011627; overflow-x: auto; white-space: pre-wrap; word-wrap: break-word;&quot; tabindex=&quot;0&quot; data-language=&quot;text&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;NVDA / MSTR / HIMS / SPCX&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;          ↓&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;     Stock Tokens&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;          ↓&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;   Robinhood Chain&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      ↙       ↘&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;   DeFi       Meme&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;      ↘       ↙&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;   one shared liquidity&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;It’s not that stock money is already here. It’s that stock assets for the first time have a natural path straight into the crypto casino&lt;/p&gt;
&lt;p&gt;That’s a new incremental capital interface&lt;/p&gt;
&lt;h2 id=&quot;why-this-meta-is-more-interesting-than-animal-memes&quot;&gt;Why this meta is more interesting than animal memes&lt;/h2&gt;
&lt;p&gt;Normal memes have one big problem: you have to invent narrative from scratch&lt;/p&gt;
&lt;p&gt;Today cats, tomorrow dogs, the day after frogs. Attention leaves, story ends&lt;/p&gt;
&lt;p&gt;Stock memes don’t. The US stock market manufactures news every day on its own&lt;/p&gt;
&lt;p&gt;NVIDIA ships a new chip: NVDA → AI meme&lt;/p&gt;
&lt;p&gt;SpaceX launches, raises, talks IPO: SPCX → SPACEHOOD&lt;/p&gt;
&lt;p&gt;Strategy buys BTC: MSTR → SAYLORMOON&lt;/p&gt;
&lt;p&gt;GLP-1 data drops: LLY → FATCOIN&lt;/p&gt;
&lt;p&gt;Micron earnings, memory prices up: MU → MOO&lt;/p&gt;
&lt;p&gt;The stock’s own news cycle becomes the meme’s narrative engine&lt;/p&gt;
&lt;p&gt;So you can flip the playbook&lt;/p&gt;
&lt;p&gt;Instead of finding a meme first and then studying why it pumped, you can watch which stock is sucking up all the attention today, then go find its meme on Robinhood&lt;/p&gt;
&lt;h2 id=&quot;crazier-still-memes-are-now-feeding-back-into-stock-tokens&quot;&gt;Crazier still: memes are now feeding back into stock tokens&lt;/h2&gt;
&lt;p&gt;BONER / HIMS was the textbook case&lt;/p&gt;
&lt;p&gt;Because BONER uses HIMS stock token as the LP quote, a ton of HIMS got locked in the pool. But on-chain HIMS supply is tiny&lt;/p&gt;
&lt;p&gt;When the stock market closed for the weekend and no fresh tokens could be minted, on-chain HIMS traded at an extreme premium to the real stock&lt;/p&gt;
&lt;p&gt;It used to be Stock → Meme. Now we’re seeing Meme → Stock token liquidity&lt;/p&gt;
&lt;p&gt;The feedback loop is real&lt;/p&gt;
&lt;p&gt;And that’s also the biggest risk&lt;/p&gt;
&lt;p&gt;The stock token isn’t the stock. It’s a tokenized debt security issued by Robinhood Assets (Jersey) giving you economic exposure to the underlying&lt;/p&gt;
&lt;p&gt;When liquidity is thin, the on-chain price can absolutely depeg from the real stock for a while. Don’t see the ticker NVDA and assume it’s the same as the NVIDIA in your brokerage&lt;/p&gt;
&lt;h2 id=&quot;what-robinhood-looks-like-now&quot;&gt;What Robinhood looks like now&lt;/h2&gt;
&lt;p&gt;I don’t think Solana is the right comp anymore&lt;/p&gt;
&lt;p&gt;Solana memes were &lt;code&gt;SOL → Pump → Meme&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;If Robinhood pulls this off, it could be &lt;code&gt;Stock Token → Meme → DEX → Lending → Perps → Infra&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Stocks are the base narrative asset. Memes are the attention and volume engine. RAM, UP, PAIR, launchpads, DEXes sell the shovels&lt;/p&gt;
&lt;p&gt;Together it forms a &lt;strong&gt;TradFi Asset × Crypto Speculation&lt;/strong&gt; loop&lt;/p&gt;
&lt;p&gt;That’s why I’m not just watching the classic memes like PONS and CASHCAT&lt;/p&gt;
&lt;p&gt;I’m also watching the stock-meme batch — &lt;strong&gt;AI / SPACEHOOD / MOO / FATCOIN&lt;/strong&gt; — and the infra that taxes all the volume — &lt;strong&gt;RAM / UP / PAIR&lt;/strong&gt;&lt;/p&gt;
&lt;h2 id=&quot;what-im-watching-next&quot;&gt;What I’m watching next&lt;/h2&gt;
&lt;p&gt;I won’t judge whether this Robinhood run continues by which coin does another 10x. I’m watching three things&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1. Do stock memes keep producing new leaders&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;AI / NVDA proved it once. If SPACEHOOD / SPCX, MOO / MU keep running, it means the meta is replicable, not a one-off&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2. Does on-chain stock token liquidity keep growing&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This is the real fuel. If stock tokens stay as tiny pools with tens of millions in float, the ceiling stays low&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;3. Can Robinhood DEX volume hold&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Early September already did over $1.5B in a single day. If it holds or makes new highs, it’s not just the first batch of gamblers&lt;/p&gt;
&lt;p&gt;If volume fades fast and AI / PONS / CASHCAT all break down together, no narrative, however elegant, matters&lt;/p&gt;
&lt;p&gt;Price tells the truth&lt;/p&gt;
&lt;h2 id=&quot;closing&quot;&gt;Closing&lt;/h2&gt;
&lt;p&gt;I used to treat HOOD as just another meme casino. That read feels incomplete now&lt;/p&gt;
&lt;p&gt;What’s actually interesting about Robinhood isn’t that it minted a few more 100x memes&lt;/p&gt;
&lt;p&gt;It’s that it’s doing something that was hard to happen naturally before: plugging US stock assets and the crypto casino into the same liquidity network&lt;/p&gt;
&lt;p&gt;Still tiny. Stock memes might just be this cycle’s favorite new toy&lt;/p&gt;
&lt;p&gt;But if this keeps spreading, the next 10x or 50x might not be the next dog&lt;/p&gt;
&lt;p&gt;It might come from the next stock headline&lt;/p&gt;</content:encoded></item><item><title>My Kitty + DMS Theme and Font</title><link>https://blog.040304.xyz/en/posts/kitty-dms-tokyo-night/</link><guid isPermaLink="true">https://blog.040304.xyz/en/posts/kitty-dms-tokyo-night/</guid><description>Kitty on Tokyo Night, DMS to match — Maple Mono NF CN, clean and easy on the eyes</description><pubDate>Tue, 01 Sep 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Two things I’ve settled on recently — worth recommending.&lt;/p&gt;
&lt;h2 id=&quot;font-maple-mono-nf-cn&quot;&gt;Font: Maple Mono NF CN&lt;/h2&gt;
&lt;p&gt;Both Kitty and DMS use it at &lt;code&gt;12.0&lt;/code&gt;.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Monospace, CN variant keeps CJK alignment tidy&lt;/li&gt;
&lt;li&gt;NF carries icons — &lt;code&gt;yazi&lt;/code&gt; / &lt;code&gt;neovim&lt;/code&gt; glyphs render correctly&lt;/li&gt;
&lt;li&gt;Rounded shapes, easy for long sessions&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;code&gt;~/.config/kitty/kitty.conf&lt;/code&gt;:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes min-light night-owl&quot; style=&quot;--shiki-light:#24292eff;--shiki-dark:#d6deeb;--shiki-light-bg:#ffffff;--shiki-dark-bg:#011627; overflow-x: auto; white-space: pre-wrap; word-wrap: break-word;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;font_family Maple Mono NF CN&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;font_size 12.0&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;DMS &lt;code&gt;settings.json&lt;/code&gt; uses the same:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes min-light night-owl&quot; style=&quot;--shiki-light:#24292eff;--shiki-dark:#d6deeb;--shiki-light-bg:#ffffff;--shiki-dark-bg:#011627; overflow-x: auto; white-space: pre-wrap; word-wrap: break-word;&quot; tabindex=&quot;0&quot; data-language=&quot;json&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#ECC48D&quot;&gt;fontFamily&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#ECC48D&quot;&gt;Maple Mono NF CN&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;theme-tokyo-night&quot;&gt;Theme: Tokyo Night&lt;/h2&gt;
&lt;p&gt;Kitty uses &lt;code&gt;tokyo-night.conf&lt;/code&gt;, DMS uses &lt;code&gt;theme_tokyonight.json&lt;/code&gt; — both Tokyo Night.&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes min-light night-owl&quot; style=&quot;--shiki-light:#24292eff;--shiki-dark:#d6deeb;--shiki-light-bg:#ffffff;--shiki-dark-bg:#011627; overflow-x: auto; white-space: pre-wrap; word-wrap: break-word;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;background #1a1b26&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;foreground #c0caf5&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;primary    #7aa2f7&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Deep blue base, not harsh, just the right contrast — very comfortable at night. DMS’s light variant is &lt;code&gt;#d5d6db&lt;/code&gt;, so switching to light doesn’t feel out of place.&lt;/p&gt;
&lt;p&gt;Switching themes in Kitty is one line:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes min-light night-owl&quot; style=&quot;--shiki-light:#24292eff;--shiki-dark:#d6deeb;--shiki-light-bg:#ffffff;--shiki-dark-bg:#011627; overflow-x: auto; white-space: pre-wrap; word-wrap: break-word;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;include tokyo-night.conf&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;# include catppuccin-mocha.conf&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;# include kanagawa-wave.conf&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;# include everforest-dark-hard.conf&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</content:encoded></item><item><title>Skills I Use</title><link>https://blog.040304.xyz/en/posts/skills/</link><guid isPermaLink="true">https://blog.040304.xyz/en/posts/skills/</guid><description>A curated collection of agent skills</description><pubDate>Wed, 12 Aug 2026 13:00:00 GMT</pubDate><content:encoded>&lt;p&gt;I keep the skills I actually use in one repo — one line to install:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes min-light night-owl&quot; style=&quot;--shiki-light:#24292eff;--shiki-dark:#d6deeb;--shiki-light-bg:#ffffff;--shiki-dark-bg:#011627; overflow-x: auto; white-space: pre-wrap; word-wrap: break-word;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-light-font-style:inherit;--shiki-dark:#82AAFF;--shiki-dark-font-style:italic&quot;&gt;npx&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#ECC48D&quot;&gt; skills&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#ECC48D&quot;&gt; add&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#ECC48D&quot;&gt; ArchdevilForge/skills&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Most-used:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/ArchdevilForge/skills/tree/main/thinking&quot;&gt;thinking&lt;/a&gt;: thinking router — pick the right thinking mode for the job.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/ArchdevilForge/skills/tree/main/hustler-mind&quot;&gt;hustler-mind&lt;/a&gt;: hustler’s playbook — how to scheme, arbitrage, and work the angles.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/ArchdevilForge/skills/tree/main/prompt&quot;&gt;prompt&lt;/a&gt;: diagnose and rewrite prompts.&lt;/p&gt;</content:encoded></item><item><title>Just a Tool</title><link>https://blog.040304.xyz/en/posts/on-ai/</link><guid isPermaLink="true">https://blog.040304.xyz/en/posts/on-ai/</guid><description>The gentleman is not different in nature, but good at borrowing from things</description><pubDate>Thu, 02 Jul 2026 16:00:00 GMT</pubDate><content:encoded>&lt;h2 id=&quot;the-funny-debate-about-tools-themselves&quot;&gt;The Funny Debate About Tools Themselves&lt;/h2&gt;
&lt;p&gt;The irony: even heavy AI users warn that AI makes us worse at coding — that without it we can’t do anything, so we shouldn’t rely on it. Before AI you coded with an IDE. Without that IDE, could you code? So should you not rely on IDEs?&lt;/p&gt;
&lt;p&gt;They’re just tools. As Xunzi said: &lt;em&gt;The gentleman is not different in nature; he is good at borrowing from things.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id=&quot;what-ai-is&quot;&gt;What AI Is&lt;/h2&gt;
&lt;p&gt;Think of AI as someone always one step ahead of you cognitively. It always knows a little more than you do. The more you use it, the more you learn, the faster your mind expands.&lt;/p&gt;
&lt;p&gt;But does that make you dumber?&lt;/p&gt;
&lt;p&gt;In some ways, yes. You’ll get rusty at hand-writing bubble sort, crafting regex from scratch, recalling API signatures. Leave something unused long enough and you forget it.&lt;/p&gt;
&lt;p&gt;The question is: did you ever need those abilities?&lt;/p&gt;
&lt;p&gt;90% of what you learn in a field is dead weight — outdated by the time you learn it. What AI helps you skip isn’t coding itself, but all the things you thought you had to learn yet never actually needed.&lt;/p&gt;
&lt;p&gt;AI is leverage, not replacement. It doesn’t make you useless; it lets you spend your energy where you previously couldn’t reach.&lt;/p&gt;
&lt;p&gt;For example, disassemble your mind into SKILLs and let AI channel “how would Buffett see this” — suddenly you’re drawing on an information density far beyond your own domain.&lt;/p&gt;
&lt;h2 id=&quot;ai-is-your-anywhere-door&quot;&gt;AI Is Your Anywhere Door&lt;/h2&gt;
&lt;p&gt;Every model update is another leap. It takes you places you previously lacked the confidence or ability to go.&lt;/p&gt;
&lt;p&gt;You don’t need to learn before you do. You don’t know it, AI does — you learn while doing. That’s the door:&lt;/p&gt;
&lt;p&gt;From “learn first, then do” to “do first, learn along the way.”&lt;/p&gt;
&lt;p&gt;So don’t hesitate.&lt;/p&gt;
&lt;p&gt;The door is already in your hands. Go wherever you want.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;The world is full of wonderlands — go wherever you please.&lt;/em&gt;&lt;/p&gt;</content:encoded></item><item><title>Reverse-Engineering Coinglass&apos;s Encrypted API</title><link>https://blog.040304.xyz/en/posts/coinglass-decrypt/</link><guid isPermaLink="true">https://blog.040304.xyz/en/posts/coinglass-decrypt/</guid><description>A pure-Python break of Coinglass&apos;s encrypted API — double AES-ECB + gzip</description><pubDate>Mon, 15 Jun 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Every public API on &lt;a href=&quot;https://www.coinglass.com&quot;&gt;Coinglass&lt;/a&gt; is encrypted. The response body is ciphertext — but the key is handed to you in the response headers.&lt;/p&gt;
&lt;h2 id=&quot;encryption-scheme&quot;&gt;Encryption Scheme&lt;/h2&gt;
&lt;p&gt;Coinglass uses AES-128-ECB plus double gzip; the decryption key arrives via response header:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes min-light night-owl&quot; style=&quot;--shiki-light:#24292eff;--shiki-dark:#d6deeb;--shiki-light-bg:#ffffff;--shiki-dark-bg:#011627; overflow-x: auto; white-space: pre-wrap; word-wrap: break-word;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Request  → GET /api/spot/rsi/list (with header encryption: true)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Response → Headers: { user: &amp;#x3C;base64 token&gt;, v: &quot;55&quot; }&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Decryption:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;1. v=55 → look up constant &quot;170b070da9654622&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;2. base64(constant)[:16] → Key0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;3. AES-ECB-decrypt(user_token, Key0) → gzip(actual_key)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;4. Gunzip → 16-char hex key&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;5. AES-ECB-decrypt(encrypted_body, actual_key) → gzip(JSON)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;6. Gunzip → plaintext JSON&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;No API key, no cookie, no session. Anyone who can make an HTTP request can decrypt any endpoint.&lt;/p&gt;
&lt;h2 id=&quot;key-constants&quot;&gt;Key Constants&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;v&lt;/code&gt; header selects which constant derives the first-layer key:&lt;/p&gt;






























&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;v&lt;/th&gt;&lt;th&gt;Constant&lt;/th&gt;&lt;th&gt;Source&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;55&lt;/td&gt;&lt;td&gt;&lt;code&gt;170b070da9654622&lt;/code&gt;&lt;/td&gt;&lt;td&gt;webpack module 12471, &lt;code&gt;Kt[22]&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;66&lt;/td&gt;&lt;td&gt;&lt;code&gt;d6537d845a964081&lt;/code&gt;&lt;/td&gt;&lt;td&gt;webpack module 12471, &lt;code&gt;Kt[38]&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;77&lt;/td&gt;&lt;td&gt;&lt;code&gt;863f08689c97435b&lt;/code&gt;&lt;/td&gt;&lt;td&gt;webpack module 12471, &lt;code&gt;BatcW&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;URL path&lt;/td&gt;&lt;td&gt;&lt;code&gt;btoa(url_path)[:16]&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;All constants are hardcoded in the frontend webpack bundle. &lt;code&gt;v=55/66/77&lt;/code&gt; are fixed; &lt;code&gt;v=1&lt;/code&gt; is dynamic — derived from the request path.&lt;/p&gt;
&lt;h2 id=&quot;how-it-was-reversed&quot;&gt;How It Was Reversed&lt;/h2&gt;
&lt;p&gt;The logic lives in Next.js webpack module &lt;code&gt;12471&lt;/code&gt;, publicly fetchable from S3:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes min-light night-owl&quot; style=&quot;--shiki-light:#24292eff;--shiki-dark:#d6deeb;--shiki-light-bg:#ffffff;--shiki-dark-bg:#011627; overflow-x: auto; white-space: pre-wrap; word-wrap: break-word;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;https://s3.coinglass.com/v1/cg/_next/static/chunks/pages/_app-f75bb33a408a04d3.js&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Module 12471 contains:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;AES-ECB&lt;/strong&gt; encrypt/decrypt — CryptoJS&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;FP&lt;/strong&gt; — GET + encrypt + decrypt response&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;xW&lt;/strong&gt; — plain request, no encryption&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Zl&lt;/strong&gt; — POST + encryption&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Request interceptor&lt;/strong&gt; — auto-injects &lt;code&gt;encryption: true&lt;/code&gt;, &lt;code&gt;cache-ts-v2&lt;/code&gt;, etc.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;String obfuscation&lt;/strong&gt; — &lt;code&gt;Qt(offset, seed)&lt;/code&gt; lookup&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Key derivation is in function &lt;code&gt;Yt&lt;/code&gt;. The three constants map to &lt;code&gt;Kt[22]&lt;/code&gt;, &lt;code&gt;Kt[38]&lt;/code&gt;, and &lt;code&gt;BatcW&lt;/code&gt;. Obfuscation is shallow — strings are directly visible.&lt;/p&gt;
&lt;h2 id=&quot;implementation&quot;&gt;Implementation&lt;/h2&gt;
&lt;pre class=&quot;astro-code astro-code-themes min-light night-owl&quot; style=&quot;--shiki-light:#24292eff;--shiki-dark:#d6deeb;--shiki-light-bg:#ffffff;--shiki-dark-bg:#011627; overflow-x: auto; white-space: pre-wrap; word-wrap: break-word;&quot; tabindex=&quot;0&quot; data-language=&quot;python&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#C2C3C5;--shiki-light-font-style:inherit;--shiki-dark:#637777;--shiki-dark-font-style:italic&quot;&gt;# decrypt.py — core logic&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#82AAFF&quot;&gt;_KEY_TABLE&lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#C792EA&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;    &quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#ECC48D&quot;&gt;55&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#ECC48D&quot;&gt;170b070da9654622&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;    &quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#ECC48D&quot;&gt;66&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#ECC48D&quot;&gt;d6537d845a964081&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;    &quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#ECC48D&quot;&gt;77&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#ECC48D&quot;&gt;863f08689c97435b&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#C792EA&quot;&gt;def&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-light-font-style:inherit;--shiki-dark:#82AAFF;--shiki-dark-font-style:italic&quot;&gt; decrypt&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D9F5DD&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--shiki-light:#FF9800;--shiki-dark:#7FDBCA&quot;&gt;encrypted_body&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;--shiki-light:#FF9800;--shiki-dark:#7FDBCA&quot;&gt; user_token_b64&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;--shiki-light:#FF9800;--shiki-dark:#7FDBCA&quot;&gt; v&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;--shiki-light:#FF9800;--shiki-dark:#7FDBCA&quot;&gt; url&lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#7FDBCA&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D9F5DD&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt;    outer &lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#C792EA&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt; json&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B2CCD6&quot;&gt;loads&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#82AAFF&quot;&gt;encrypted_body&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt;    payload &lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#C792EA&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt; base64&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B2CCD6&quot;&gt;b64decode&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#82AAFF&quot;&gt;outer&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#ECC48D&quot;&gt;data&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;])&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt;    token &lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#C792EA&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt; base64&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B2CCD6&quot;&gt;b64decode&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#82AAFF&quot;&gt;user_token_b64&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#C2C3C5;--shiki-light-font-style:inherit;--shiki-dark:#637777;--shiki-dark-font-style:italic&quot;&gt;    # Derive Key0&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt;    constant &lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#C792EA&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#82AAFF&quot;&gt; _KEY_TABLE&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B2CCD6&quot;&gt;get&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#82AAFF&quot;&gt;v&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-light-font-style:inherit;--shiki-dark:#C792EA;--shiki-dark-font-style:italic&quot;&gt; if&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt; v &lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#C792EA&quot;&gt;!=&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#ECC48D&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-light-font-style:inherit;--shiki-dark:#C792EA;--shiki-dark-font-style:italic&quot;&gt; else&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B2CCD6&quot;&gt; urlparse&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#82AAFF&quot;&gt;url&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;).&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt;path&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt;    key0 &lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#C792EA&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt; base64&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B2CCD6&quot;&gt;b64encode&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#82AAFF&quot;&gt;constant.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B2CCD6&quot;&gt;encode&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;()).&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B2CCD6&quot;&gt;decode&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;()&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D9F5DD&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--shiki-light:#1976D2;--shiki-dark:#F78C6C&quot;&gt;16&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D9F5DD&quot;&gt;]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#C2C3C5;--shiki-light-font-style:inherit;--shiki-dark:#637777;--shiki-dark-font-style:italic&quot;&gt;    # Layer 1: decrypt user token → actual key&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt;    step1 &lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#C792EA&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B2CCD6&quot;&gt; unpad&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#82AAFF&quot;&gt;AES.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B2CCD6&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#82AAFF&quot;&gt;key0.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B2CCD6&quot;&gt;encode&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;()&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D9F5DD&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#82AAFF&quot;&gt; AES.MODE_ECB&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#82AAFF&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B2CCD6&quot;&gt;decrypt&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#82AAFF&quot;&gt;token&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D9F5DD&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;--shiki-light:#1976D2;--shiki-dark:#F78C6C&quot;&gt; 16&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt;    actual_key &lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#C792EA&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt; gzip&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B2CCD6&quot;&gt;decompress&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#82AAFF&quot;&gt;step1&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;).&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B2CCD6&quot;&gt;decode&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;()&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#C2C3C5;--shiki-light-font-style:inherit;--shiki-dark:#637777;--shiki-dark-font-style:italic&quot;&gt;    # Layer 2: decrypt body → plaintext&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt;    step2 &lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#C792EA&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B2CCD6&quot;&gt; unpad&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#82AAFF&quot;&gt;AES.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B2CCD6&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#82AAFF&quot;&gt;actual_key.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B2CCD6&quot;&gt;encode&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;()&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D9F5DD&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#82AAFF&quot;&gt; AES.MODE_ECB&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#82AAFF&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B2CCD6&quot;&gt;decrypt&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#82AAFF&quot;&gt;payload&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D9F5DD&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;--shiki-light:#1976D2;--shiki-dark:#F78C6C&quot;&gt; 16&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-light-font-style:inherit;--shiki-dark:#C792EA;--shiki-dark-font-style:italic&quot;&gt;    return&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt; json&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B2CCD6&quot;&gt;loads&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#82AAFF&quot;&gt;gzip.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B2CCD6&quot;&gt;decompress&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#82AAFF&quot;&gt;step2&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#82AAFF&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B2CCD6&quot;&gt;decode&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;())&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Usage:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes min-light night-owl&quot; style=&quot;--shiki-light:#24292eff;--shiki-dark:#d6deeb;--shiki-light-bg:#ffffff;--shiki-dark-bg:#011627; overflow-x: auto; white-space: pre-wrap; word-wrap: break-word;&quot; tabindex=&quot;0&quot; data-language=&quot;python&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-light-font-style:inherit;--shiki-dark:#C792EA;--shiki-dark-font-style:italic&quot;&gt;from&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt; decrypt &lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-light-font-style:inherit;--shiki-dark:#C792EA;--shiki-dark-font-style:italic&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt; fetch_and_decrypt&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt;data &lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#C792EA&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B2CCD6&quot;&gt; fetch_and_decrypt&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;(&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;    &quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#ECC48D&quot;&gt;https://capi.coinglass.com/api/spot/rsi/list&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D9F5DD&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#82AAFF&quot;&gt;    {&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#ECC48D&quot;&gt;pageSize&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#82AAFF&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--shiki-light:#1976D2;--shiki-dark:#F78C6C&quot;&gt;500&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#82AAFF&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#ECC48D&quot;&gt;pageNum&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#82AAFF&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--shiki-light:#1976D2;--shiki-dark:#F78C6C&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#82AAFF&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D9F5DD&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#C5E478&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#82AAFF&quot;&gt;data&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#ECC48D&quot;&gt;list&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D9F5DD&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;--shiki-light:#1976D2;--shiki-dark:#F78C6C&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D9F5DD&quot;&gt;][&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#ECC48D&quot;&gt;rsi4h&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D9F5DD&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;--shiki-light:#C2C3C5;--shiki-light-font-style:inherit;--shiki-dark:#637777;--shiki-dark-font-style:italic&quot;&gt;  # → &quot;62.34&quot;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;scale&quot;&gt;Scale&lt;/h2&gt;
&lt;p&gt;More than &lt;strong&gt;280&lt;/strong&gt; encrypted endpoints were uncovered, covering:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Spot&lt;/strong&gt; — RSI, market cap, price moves&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Futures&lt;/strong&gt; — funding rates, open interest, liquidations, long/short ratios&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Options&lt;/strong&gt; — OI, volume, Max Pain&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;ETF flows&lt;/strong&gt; — BTC/ETH/SOL/XRP&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;On-chain metrics&lt;/strong&gt; — SOPR, MVRV, active addresses, CDD and 50+ more&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;On-chain indices&lt;/strong&gt; — CGDI, CGRI, Pi Cycle, AHR999, Puell Multiple&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Macro&lt;/strong&gt; — economic calendar, TradFi overview&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Hyperliquid&lt;/strong&gt; — vaults, whale positions, user distribution&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Full list in &lt;a href=&quot;https://github.com/xeronsh/coinglass-decrypt/blob/main/discovered_endpoints.py&quot;&gt;discovered_endpoints.py&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&quot;disclaimer&quot;&gt;Disclaimer&lt;/h2&gt;
&lt;p&gt;For education and research only. The scheme was reversed from publicly accessible frontend code. Please respect Coinglass’s Terms of Service.&lt;/p&gt;
&lt;p&gt;Repo: &lt;a href=&quot;https://github.com/xeronsh/coinglass-decrypt&quot;&gt;github.com/xeronsh/coinglass-decrypt&lt;/a&gt;&lt;/p&gt;</content:encoded></item><item><title>MiMo Code Free Model Proxy</title><link>https://blog.040304.xyz/en/posts/mimo-proxy/</link><guid isPermaLink="true">https://blog.040304.xyz/en/posts/mimo-proxy/</guid><description>Reverse-engineering MiMo Code&apos;s free API auth to expose an OpenAI-compatible proxy</description><pubDate>Mon, 15 Jun 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;a href=&quot;https://github.com/XiaomiMiMo/MiMo-Code&quot;&gt;MiMo Code&lt;/a&gt; is Xiaomi’s AI coding tool with a free quota — but only usable inside MiMo Code. Let’s break it open.&lt;/p&gt;
&lt;h2 id=&quot;reverse-engineering-the-auth&quot;&gt;Reverse-Engineering the Auth&lt;/h2&gt;
&lt;p&gt;The free API needs no login. Auth is done via a bootstrap endpoint:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes min-light night-owl&quot; style=&quot;--shiki-light:#24292eff;--shiki-dark:#d6deeb;--shiki-light-bg:#ffffff;--shiki-dark-bg:#011627; overflow-x: auto; white-space: pre-wrap; word-wrap: break-word;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;POST https://api.xiaomimimo.com/api/free-ai/bootstrap&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Body: {&quot;client&quot;: &quot;&amp;#x3C;device fingerprint&gt;&quot;}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Response: {&quot;jwt&quot;: &quot;eyJhbG...&quot;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Just sniff the traffic. No OAuth, no API key, no session — one POST gets you a JWT for the chat API.&lt;/p&gt;
&lt;h3 id=&quot;device-fingerprint&quot;&gt;Device Fingerprint&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;client&lt;/code&gt; param is a locally generated fingerprint:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes min-light night-owl&quot; style=&quot;--shiki-light:#24292eff;--shiki-dark:#d6deeb;--shiki-light-bg:#ffffff;--shiki-dark-bg:#011627; overflow-x: auto; white-space: pre-wrap; word-wrap: break-word;&quot; tabindex=&quot;0&quot; data-language=&quot;python&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-light-font-style:inherit;--shiki-dark:#C792EA;--shiki-dark-font-style:italic&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt; hashlib&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt; platform&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt; os&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#C792EA&quot;&gt;def&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-light-font-style:inherit;--shiki-dark:#82AAFF;--shiki-dark-font-style:italic&quot;&gt; get_fingerprint&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D9F5DD&quot;&gt;()&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt; -&gt;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#1976D2;--shiki-dark:#C5E478&quot;&gt; str&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt;    raw &lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#C792EA&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#ECC48D&quot;&gt;|&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B2CCD6&quot;&gt;join&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D9F5DD&quot;&gt;[&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#82AAFF&quot;&gt;        platform.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B2CCD6&quot;&gt;node&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;()&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#82AAFF&quot;&gt;,                        &lt;/span&gt;&lt;span style=&quot;--shiki-light:#C2C3C5;--shiki-light-font-style:inherit;--shiki-dark:#637777;--shiki-dark-font-style:italic&quot;&gt;# hostname&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#82AAFF&quot;&gt;        platform.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B2CCD6&quot;&gt;system&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;()&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#82AAFF&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B2CCD6&quot;&gt;lower&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;()&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#82AAFF&quot;&gt;,              &lt;/span&gt;&lt;span style=&quot;--shiki-light:#C2C3C5;--shiki-light-font-style:inherit;--shiki-dark:#637777;--shiki-dark-font-style:italic&quot;&gt;# darwin / linux / windows&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#82AAFF&quot;&gt;        platform.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B2CCD6&quot;&gt;machine&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;()&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#82AAFF&quot;&gt;,                     &lt;/span&gt;&lt;span style=&quot;--shiki-light:#C2C3C5;--shiki-light-font-style:inherit;--shiki-dark:#637777;--shiki-dark-font-style:italic&quot;&gt;# arm64 / x86_64&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#82AAFF&quot;&gt;        platform.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B2CCD6&quot;&gt;processor&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;()&lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#C792EA&quot;&gt; or&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#ECC48D&quot;&gt;unknown-cpu&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#82AAFF&quot;&gt;,  &lt;/span&gt;&lt;span style=&quot;--shiki-light:#C2C3C5;--shiki-light-font-style:inherit;--shiki-dark:#637777;--shiki-dark-font-style:italic&quot;&gt;# CPU model&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#82AAFF&quot;&gt;        os.environ.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B2CCD6&quot;&gt;get&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#ECC48D&quot;&gt;USER&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#C792EA&quot;&gt; or&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#ECC48D&quot;&gt;unknown&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#82AAFF&quot;&gt;,    &lt;/span&gt;&lt;span style=&quot;--shiki-light:#C2C3C5;--shiki-light-font-style:inherit;--shiki-dark:#637777;--shiki-dark-font-style:italic&quot;&gt;# username&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D9F5DD&quot;&gt;    ]&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-light-font-style:inherit;--shiki-dark:#C792EA;--shiki-dark-font-style:italic&quot;&gt;    return&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt; hashlib&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B2CCD6&quot;&gt;sha256&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#82AAFF&quot;&gt;raw.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B2CCD6&quot;&gt;encode&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;()).&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B2CCD6&quot;&gt;hexdigest&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;()&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;It’s persisted to &lt;code&gt;~/.local/share/mimocode/mimo-free-client&lt;/code&gt; so the same machine always bootstraps to the same token:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes min-light night-owl&quot; style=&quot;--shiki-light:#24292eff;--shiki-dark:#d6deeb;--shiki-light-bg:#ffffff;--shiki-dark-bg:#011627; overflow-x: auto; white-space: pre-wrap; word-wrap: break-word;&quot; tabindex=&quot;0&quot; data-language=&quot;python&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-light-font-style:inherit;--shiki-dark:#C792EA;--shiki-dark-font-style:italic&quot;&gt;from&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt; pathlib &lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-light-font-style:inherit;--shiki-dark:#C792EA;--shiki-dark-font-style:italic&quot;&gt;import&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt; Path&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#82AAFF&quot;&gt;FINGERPRINT_FILE&lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#C792EA&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt; Path&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B2CCD6&quot;&gt;home&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;()&lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#C792EA&quot;&gt; /&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#ECC48D&quot;&gt;.local/share/mimocode/mimo-free-client&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#C792EA&quot;&gt;def&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-light-font-style:inherit;--shiki-dark:#82AAFF;--shiki-dark-font-style:italic&quot;&gt; get_fingerprint&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D9F5DD&quot;&gt;()&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt; -&gt;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#1976D2;--shiki-dark:#C5E478&quot;&gt; str&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-light-font-style:inherit;--shiki-dark:#C792EA;--shiki-dark-font-style:italic&quot;&gt;    if&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#82AAFF&quot;&gt; FINGERPRINT_FILE&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B2CCD6&quot;&gt;exists&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;():&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-light-font-style:inherit;--shiki-dark:#C792EA;--shiki-dark-font-style:italic&quot;&gt;        return&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#82AAFF&quot;&gt; FINGERPRINT_FILE&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B2CCD6&quot;&gt;read_text&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;().&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B2CCD6&quot;&gt;strip&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;()&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt;    fp &lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#C792EA&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt; hashlib&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B2CCD6&quot;&gt;sha256&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#82AAFF&quot;&gt;...&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;).&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B2CCD6&quot;&gt;hexdigest&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;()&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#82AAFF&quot;&gt;    FINGERPRINT_FILE&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt;parent&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B2CCD6&quot;&gt;mkdir&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D7DBE0&quot;&gt;parents&lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#C792EA&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--shiki-light:#1976D2;--shiki-dark:#FF5874&quot;&gt;True&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D9F5DD&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D7DBE0&quot;&gt; exist_ok&lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#C792EA&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--shiki-light:#1976D2;--shiki-dark:#FF5874&quot;&gt;True&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#82AAFF&quot;&gt;    FINGERPRINT_FILE&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B2CCD6&quot;&gt;write_text&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#82AAFF&quot;&gt;fp&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#82AAFF&quot;&gt;    FINGERPRINT_FILE&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B2CCD6&quot;&gt;chmod&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#C792EA&quot;&gt;0o&lt;/span&gt;&lt;span style=&quot;--shiki-light:#1976D2;--shiki-dark:#F78C6C&quot;&gt;600&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-light-font-style:inherit;--shiki-dark:#C792EA;--shiki-dark-font-style:italic&quot;&gt;    return&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt; fp&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;parsing-the-jwt&quot;&gt;Parsing the JWT&lt;/h3&gt;
&lt;p&gt;The JWT’s &lt;code&gt;exp&lt;/code&gt; field tells you when it expires:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes min-light night-owl&quot; style=&quot;--shiki-light:#24292eff;--shiki-dark:#d6deeb;--shiki-light-bg:#ffffff;--shiki-dark-bg:#011627; overflow-x: auto; white-space: pre-wrap; word-wrap: break-word;&quot; tabindex=&quot;0&quot; data-language=&quot;python&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#C792EA&quot;&gt;def&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-light-font-style:inherit;--shiki-dark:#82AAFF;--shiki-dark-font-style:italic&quot;&gt; _parse_jwt_exp&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D9F5DD&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--shiki-light:#FF9800;--shiki-dark:#7FDBCA&quot;&gt;jwt&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--shiki-light:#1976D2;--shiki-dark:#C5E478&quot;&gt; str&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D9F5DD&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt; -&gt;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#1976D2;--shiki-dark:#C5E478&quot;&gt; float&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#C2C3C5;--shiki-light-font-style:inherit;--shiki-dark:#637777;--shiki-dark-font-style:italic&quot;&gt;    # JWT payload is base64url-encoded JSON&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt;    parts &lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#C792EA&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt; jwt&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B2CCD6&quot;&gt;split&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#ECC48D&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt;    pad &lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#C792EA&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--shiki-light:#1976D2;--shiki-dark:#F78C6C&quot;&gt; 4&lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#C792EA&quot;&gt; -&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#C5E478&quot;&gt; len&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#82AAFF&quot;&gt;parts&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;--shiki-light:#1976D2;--shiki-dark:#F78C6C&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;])&lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#C792EA&quot;&gt; %&lt;/span&gt;&lt;span style=&quot;--shiki-light:#1976D2;--shiki-dark:#F78C6C&quot;&gt; 4&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt;    payload &lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#C792EA&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt; json&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B2CCD6&quot;&gt;loads&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#82AAFF&quot;&gt;base64.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B2CCD6&quot;&gt;urlsafe_b64decode&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#82AAFF&quot;&gt;parts&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;--shiki-light:#1976D2;--shiki-dark:#F78C6C&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#C792EA&quot;&gt; +&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#ECC48D&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#C792EA&quot;&gt; *&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#82AAFF&quot;&gt; pad&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;))&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-light-font-style:inherit;--shiki-dark:#C792EA;--shiki-dark-font-style:italic&quot;&gt;    return&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt; payload&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B2CCD6&quot;&gt;get&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#ECC48D&quot;&gt;exp&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D9F5DD&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#82AAFF&quot;&gt; time.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B2CCD6&quot;&gt;time&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;()&lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#C792EA&quot;&gt; +&lt;/span&gt;&lt;span style=&quot;--shiki-light:#1976D2;--shiki-dark:#F78C6C&quot;&gt; 3600&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#C792EA&quot;&gt; *&lt;/span&gt;&lt;span style=&quot;--shiki-light:#1976D2;--shiki-dark:#F78C6C&quot;&gt; 1000&lt;/span&gt;&lt;span style=&quot;--shiki-light:#C2C3C5;--shiki-light-font-style:inherit;--shiki-dark:#637777;--shiki-dark-font-style:italic&quot;&gt;  # milliseconds&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The proxy auto-refreshes 5 minutes before expiry:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes min-light night-owl&quot; style=&quot;--shiki-light:#24292eff;--shiki-dark:#d6deeb;--shiki-light-bg:#ffffff;--shiki-dark-bg:#011627; overflow-x: auto; white-space: pre-wrap; word-wrap: break-word;&quot; tabindex=&quot;0&quot; data-language=&quot;python&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#C792EA&quot;&gt;async&lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#C792EA&quot;&gt; def&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-light-font-style:inherit;--shiki-dark:#82AAFF;--shiki-dark-font-style:italic&quot;&gt; get_token&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D9F5DD&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--shiki-light:#FF9800;--shiki-dark:#7FDBCA&quot;&gt;self&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D9F5DD&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt; -&gt;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#1976D2;--shiki-dark:#C5E478&quot;&gt; str&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-light-font-style:inherit;--shiki-dark:#C792EA;--shiki-dark-font-style:italic&quot;&gt;    if&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#8EACE3&quot;&gt; self&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt;_jwt &lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#C792EA&quot;&gt;and&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#8EACE3&quot;&gt; self&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt;_exp &lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#C792EA&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt; time&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B2CCD6&quot;&gt;time&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;()&lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#C792EA&quot;&gt; *&lt;/span&gt;&lt;span style=&quot;--shiki-light:#1976D2;--shiki-dark:#F78C6C&quot;&gt; 1000&lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#C792EA&quot;&gt; &gt;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#1976D2;--shiki-dark:#F78C6C&quot;&gt; 300_000&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--shiki-light:#C2C3C5;--shiki-light-font-style:inherit;--shiki-dark:#637777;--shiki-dark-font-style:italic&quot;&gt;  # 5 min left&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-light-font-style:inherit;--shiki-dark:#C792EA;--shiki-dark-font-style:italic&quot;&gt;        return&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#8EACE3&quot;&gt; self&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt;_jwt&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#C2C3C5;--shiki-light-font-style:inherit;--shiki-dark:#637777;--shiki-dark-font-style:italic&quot;&gt;    # ... bootstrap for a new token&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;concurrency-safety&quot;&gt;Concurrency Safety&lt;/h3&gt;
&lt;p&gt;When multiple requests notice expiry at once, only one bootstrap should fire:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes min-light night-owl&quot; style=&quot;--shiki-light:#24292eff;--shiki-dark:#d6deeb;--shiki-light-bg:#ffffff;--shiki-dark-bg:#011627; overflow-x: auto; white-space: pre-wrap; word-wrap: break-word;&quot; tabindex=&quot;0&quot; data-language=&quot;python&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#C792EA&quot;&gt;async&lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#C792EA&quot;&gt; def&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-light-font-style:inherit;--shiki-dark:#82AAFF;--shiki-dark-font-style:italic&quot;&gt; get_token&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D9F5DD&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--shiki-light:#FF9800;--shiki-dark:#7FDBCA&quot;&gt;self&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D9F5DD&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt; -&gt;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#1976D2;--shiki-dark:#C5E478&quot;&gt; str&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-light-font-style:inherit;--shiki-dark:#C792EA;--shiki-dark-font-style:italic&quot;&gt;    if&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#8EACE3&quot;&gt; self&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt;_bootstrapping&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--shiki-light:#C2C3C5;--shiki-light-font-style:inherit;--shiki-dark:#637777;--shiki-dark-font-style:italic&quot;&gt;  # another request is already bootstrapping&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-light-font-style:inherit;--shiki-dark:#C792EA;--shiki-dark-font-style:italic&quot;&gt;        return&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-light-font-style:inherit;--shiki-dark:#C792EA;--shiki-dark-font-style:italic&quot;&gt;await&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#8EACE3&quot;&gt; self&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt;_bootstrapping)&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D9F5DD&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;--shiki-light:#1976D2;--shiki-dark:#F78C6C&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D9F5DD&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;--shiki-light:#C2C3C5;--shiki-light-font-style:inherit;--shiki-dark:#637777;--shiki-dark-font-style:italic&quot;&gt;  # wait and reuse&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#8EACE3&quot;&gt;    self&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt;_bootstrapping &lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#C792EA&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt; asyncio&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B2CCD6&quot;&gt;ensure_future&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#8EACE3&quot;&gt;self&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#82AAFF&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B2CCD6&quot;&gt;_bootstrap&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;())&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-light-font-style:inherit;--shiki-dark:#C792EA;--shiki-dark-font-style:italic&quot;&gt;    try&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#8EACE3&quot;&gt;        self&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt;_jwt&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#8EACE3&quot;&gt; self&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt;_exp &lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#C792EA&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-light-font-style:inherit;--shiki-dark:#C792EA;--shiki-dark-font-style:italic&quot;&gt; await&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#8EACE3&quot;&gt; self&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt;_bootstrapping&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-light-font-style:inherit;--shiki-dark:#C792EA;--shiki-dark-font-style:italic&quot;&gt;        return&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#8EACE3&quot;&gt; self&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt;_jwt&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-light-font-style:inherit;--shiki-dark:#C792EA;--shiki-dark-font-style:italic&quot;&gt;    finally&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#8EACE3&quot;&gt;        self&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt;_bootstrapping &lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#C792EA&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--shiki-light:#1976D2;--shiki-dark:#FF5874&quot;&gt; None&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;request-forwarding&quot;&gt;Request Forwarding&lt;/h2&gt;
&lt;p&gt;With the token, forward to the chat endpoint:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes min-light night-owl&quot; style=&quot;--shiki-light:#24292eff;--shiki-dark:#d6deeb;--shiki-light-bg:#ffffff;--shiki-dark-bg:#011627; overflow-x: auto; white-space: pre-wrap; word-wrap: break-word;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;POST https://api.xiaomimimo.com/api/free-ai/openai/chat&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Headers:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  Authorization: Bearer &amp;#x3C;jwt&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  X-Mimo-Source: mimocode-cli-free&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;  User-Agent: mimocode/0.1.0 ai-sdk/provider-utils/4.0.23 runtime/bun/1.3.14&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Body: &amp;#x3C;OpenAI-format JSON&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;But you can’t just pass through — the client format differs from standard OpenAI.&lt;/p&gt;
&lt;h3 id=&quot;body-rewriting&quot;&gt;Body Rewriting&lt;/h3&gt;
&lt;pre class=&quot;astro-code astro-code-themes min-light night-owl&quot; style=&quot;--shiki-light:#24292eff;--shiki-dark:#d6deeb;--shiki-light-bg:#ffffff;--shiki-dark-bg:#011627; overflow-x: auto; white-space: pre-wrap; word-wrap: break-word;&quot; tabindex=&quot;0&quot; data-language=&quot;python&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#C792EA&quot;&gt;def&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-light-font-style:inherit;--shiki-dark:#82AAFF;--shiki-dark-font-style:italic&quot;&gt; _prepare_body&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D9F5DD&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--shiki-light:#FF9800;--shiki-dark:#7FDBCA&quot;&gt;body&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--shiki-light:#1976D2;--shiki-dark:#C5E478&quot;&gt; bytes&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D9F5DD&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt; -&gt;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#1976D2;--shiki-dark:#C5E478&quot;&gt; bytes&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt;    payload &lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#C792EA&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt; json&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B2CCD6&quot;&gt;loads&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#82AAFF&quot;&gt;body&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt;    messages &lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#C792EA&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt; payload&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B2CCD6&quot;&gt;get&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#ECC48D&quot;&gt;messages&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D9F5DD&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D9F5DD&quot;&gt; []&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt;    normalized &lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#C792EA&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D9F5DD&quot;&gt; []&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt;    has_system_prompt &lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#C792EA&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--shiki-light:#1976D2;--shiki-dark:#FF5874&quot;&gt; False&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-light-font-style:inherit;--shiki-dark:#C792EA;--shiki-dark-font-style:italic&quot;&gt;    for&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt; msg &lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-light-font-style:inherit;--shiki-dark:#C792EA;--shiki-dark-font-style:italic&quot;&gt;in&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt; messages&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt;        item &lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#C792EA&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--shiki-light:#1976D2;--shiki-dark:#C5E478&quot;&gt; dict&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#82AAFF&quot;&gt;msg&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#C2C3C5;--shiki-light-font-style:inherit;--shiki-dark:#637777;--shiki-dark-font-style:italic&quot;&gt;        # MiMo Code uses developer role; standard is system&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-light-font-style:inherit;--shiki-dark:#C792EA;--shiki-dark-font-style:italic&quot;&gt;        if&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt; item&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B2CCD6&quot;&gt;get&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#ECC48D&quot;&gt;role&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#C792EA&quot;&gt; ==&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#ECC48D&quot;&gt;developer&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt;            item&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#ECC48D&quot;&gt;role&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#C792EA&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#ECC48D&quot;&gt;system&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#C2C3C5;--shiki-light-font-style:inherit;--shiki-dark:#637777;--shiki-dark-font-style:italic&quot;&gt;        # Check for existing system prompt&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-light-font-style:inherit;--shiki-dark:#C792EA;--shiki-dark-font-style:italic&quot;&gt;        if&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt; item&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B2CCD6&quot;&gt;get&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#ECC48D&quot;&gt;role&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#C792EA&quot;&gt; ==&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#ECC48D&quot;&gt;system&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#C792EA&quot;&gt; and&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#C5E478&quot;&gt; isinstance&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#82AAFF&quot;&gt;item.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B2CCD6&quot;&gt;get&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#ECC48D&quot;&gt;content&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D9F5DD&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;--shiki-light:#1976D2;--shiki-dark:#C5E478&quot;&gt; str&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;):&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-light-font-style:inherit;--shiki-dark:#C792EA;--shiki-dark-font-style:italic&quot;&gt;            if&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt; item&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#ECC48D&quot;&gt;content&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;].&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B2CCD6&quot;&gt;startswith&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#ECC48D&quot;&gt;You are MiMoCode&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;):&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt;                has_system_prompt &lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#C792EA&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--shiki-light:#1976D2;--shiki-dark:#FF5874&quot;&gt; True&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt;        normalized&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B2CCD6&quot;&gt;append&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#82AAFF&quot;&gt;item&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#C2C3C5;--shiki-light-font-style:inherit;--shiki-dark:#637777;--shiki-dark-font-style:italic&quot;&gt;    # Inject default prompt if none present&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-light-font-style:inherit;--shiki-dark:#C792EA;--shiki-dark-font-style:italic&quot;&gt;    if&lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#C792EA&quot;&gt; not&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt; has_system_prompt&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt;        normalized&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B2CCD6&quot;&gt;insert&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--shiki-light:#1976D2;--shiki-dark:#F78C6C&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D9F5DD&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#82AAFF&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;            &quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#ECC48D&quot;&gt;role&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#82AAFF&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#ECC48D&quot;&gt;system&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#82AAFF&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;            &quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#ECC48D&quot;&gt;content&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#82AAFF&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#ECC48D&quot;&gt;You are MiMoCode, an interactive CLI tool...&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#82AAFF&quot;&gt;        }&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt;    payload&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#ECC48D&quot;&gt;messages&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#C792EA&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt; normalized&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#C2C3C5;--shiki-light-font-style:inherit;--shiki-dark:#637777;--shiki-dark-font-style:italic&quot;&gt;    # MiMo requires stream_options for streaming&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-light-font-style:inherit;--shiki-dark:#C792EA;--shiki-dark-font-style:italic&quot;&gt;    if&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt; payload&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B2CCD6&quot;&gt;get&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#ECC48D&quot;&gt;stream&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;):&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt;        payload&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B2CCD6&quot;&gt;setdefault&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#ECC48D&quot;&gt;stream_options&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D9F5DD&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#82AAFF&quot;&gt; {&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#ECC48D&quot;&gt;include_usage&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#82AAFF&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;--shiki-light:#1976D2;--shiki-dark:#FF5874&quot;&gt;True&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#82AAFF&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-light-font-style:inherit;--shiki-dark:#C792EA;--shiki-dark-font-style:italic&quot;&gt;    return&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt; json&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B2CCD6&quot;&gt;dumps&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#82AAFF&quot;&gt;payload&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D9F5DD&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D7DBE0&quot;&gt; separators&lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#C792EA&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#82AAFF&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#ECC48D&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#82AAFF&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#ECC48D&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#82AAFF&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D9F5DD&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D7DBE0&quot;&gt; ensure_ascii&lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#C792EA&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--shiki-light:#1976D2;--shiki-dark:#FF5874&quot;&gt;False&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;).&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B2CCD6&quot;&gt;encode&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;()&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;retry-on-expiry&quot;&gt;Retry on Expiry&lt;/h3&gt;
&lt;p&gt;Auto re-bootstrap on 401/403:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes min-light night-owl&quot; style=&quot;--shiki-light:#24292eff;--shiki-dark:#d6deeb;--shiki-light-bg:#ffffff;--shiki-dark-bg:#011627; overflow-x: auto; white-space: pre-wrap; word-wrap: break-word;&quot; tabindex=&quot;0&quot; data-language=&quot;python&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt;resp &lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#C792EA&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-light-font-style:inherit;--shiki-dark:#C792EA;--shiki-dark-font-style:italic&quot;&gt; await&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt; client&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B2CCD6&quot;&gt;send&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#82AAFF&quot;&gt;req&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-light-font-style:inherit;--shiki-dark:#C792EA;--shiki-dark-font-style:italic&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt; resp&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt;status_code &lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#C792EA&quot;&gt;in&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;--shiki-light:#1976D2;--shiki-dark:#F78C6C&quot;&gt;401&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;--shiki-light:#1976D2;--shiki-dark:#F78C6C&quot;&gt; 403&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-light-font-style:inherit;--shiki-dark:#C792EA;--shiki-dark-font-style:italic&quot;&gt;    await&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt; jwt_mgr&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B2CCD6&quot;&gt;invalidate&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;()&lt;/span&gt;&lt;span style=&quot;--shiki-light:#C2C3C5;--shiki-light-font-style:inherit;--shiki-dark:#637777;--shiki-dark-font-style:italic&quot;&gt;           # discard old token&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt;    token &lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#C792EA&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-light-font-style:inherit;--shiki-dark:#C792EA;--shiki-dark-font-style:italic&quot;&gt; await&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt; jwt_mgr&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B2CCD6&quot;&gt;get_token&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;()&lt;/span&gt;&lt;span style=&quot;--shiki-light:#C2C3C5;--shiki-light-font-style:inherit;--shiki-dark:#637777;--shiki-dark-font-style:italic&quot;&gt;    # bootstrap anew&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt;    resp &lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#C792EA&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-light-font-style:inherit;--shiki-dark:#C792EA;--shiki-dark-font-style:italic&quot;&gt; await&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt; client&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B2CCD6&quot;&gt;send&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#82AAFF&quot;&gt;req&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;--shiki-light:#C2C3C5;--shiki-light-font-style:inherit;--shiki-dark:#637777;--shiki-dark-font-style:italic&quot;&gt;        # retry&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;streaming-passthrough&quot;&gt;Streaming Passthrough&lt;/h3&gt;
&lt;p&gt;SSE is piped directly without decoding:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes min-light night-owl&quot; style=&quot;--shiki-light:#24292eff;--shiki-dark:#d6deeb;--shiki-light-bg:#ffffff;--shiki-dark-bg:#011627; overflow-x: auto; white-space: pre-wrap; word-wrap: break-word;&quot; tabindex=&quot;0&quot; data-language=&quot;python&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#C792EA&quot;&gt;async&lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#C792EA&quot;&gt; def&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-light-font-style:inherit;--shiki-dark:#82AAFF;--shiki-dark-font-style:italic&quot;&gt; _send_streaming&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D9F5DD&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--shiki-light:#FF9800;--shiki-dark:#7FDBCA&quot;&gt;body&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--shiki-light:#1976D2;--shiki-dark:#C5E478&quot;&gt; bytes&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D9F5DD&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt;    token &lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#C792EA&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-light-font-style:inherit;--shiki-dark:#C792EA;--shiki-dark-font-style:italic&quot;&gt; await&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt; jwt_mgr&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B2CCD6&quot;&gt;get_token&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;()&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt;    client &lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#C792EA&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt; httpx&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B2CCD6&quot;&gt;AsyncClient&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D7DBE0&quot;&gt;timeout&lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#C792EA&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--shiki-light:#1976D2;--shiki-dark:#F78C6C&quot;&gt;120&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt;    resp &lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#C792EA&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-light-font-style:inherit;--shiki-dark:#C792EA;--shiki-dark-font-style:italic&quot;&gt; await&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt; client&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B2CCD6&quot;&gt;send&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;(&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#82AAFF&quot;&gt;        client.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B2CCD6&quot;&gt;build_request&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#ECC48D&quot;&gt;POST&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D9F5DD&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#82AAFF&quot;&gt; CHAT_URL&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D9F5DD&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D7DBE0&quot;&gt; headers&lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#C792EA&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B2CCD6&quot;&gt;_build_headers&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#82AAFF&quot;&gt;token&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D9F5DD&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D7DBE0&quot;&gt; content&lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#C792EA&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#82AAFF&quot;&gt;body&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D9F5DD&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D7DBE0&quot;&gt;        stream&lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#C792EA&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--shiki-light:#1976D2;--shiki-dark:#FF5874&quot;&gt;True&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D9F5DD&quot;&gt;,&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;    )&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#C792EA&quot;&gt;    async&lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#C792EA&quot;&gt; def&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-light-font-style:inherit;--shiki-dark:#82AAFF;--shiki-dark-font-style:italic&quot;&gt; stream&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D9F5DD&quot;&gt;()&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-light-font-style:inherit;--shiki-dark:#C792EA;--shiki-dark-font-style:italic&quot;&gt;        try&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-light-font-style:inherit;--shiki-dark:#C792EA;--shiki-dark-font-style:italic&quot;&gt;            async&lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-light-font-style:inherit;--shiki-dark:#C792EA;--shiki-dark-font-style:italic&quot;&gt; for&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt; chunk &lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-light-font-style:inherit;--shiki-dark:#C792EA;--shiki-dark-font-style:italic&quot;&gt;in&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt; resp&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B2CCD6&quot;&gt;aiter_bytes&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;():&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-light-font-style:inherit;--shiki-dark:#C792EA;--shiki-dark-font-style:italic&quot;&gt;                yield&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt; chunk&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-light-font-style:inherit;--shiki-dark:#C792EA;--shiki-dark-font-style:italic&quot;&gt;        finally&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-light-font-style:inherit;--shiki-dark:#C792EA;--shiki-dark-font-style:italic&quot;&gt;            await&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt; resp&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B2CCD6&quot;&gt;aclose&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;()&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-light-font-style:inherit;--shiki-dark:#C792EA;--shiki-dark-font-style:italic&quot;&gt;            await&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt; client&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B2CCD6&quot;&gt;aclose&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;()&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-light-font-style:inherit;--shiki-dark:#C792EA;--shiki-dark-font-style:italic&quot;&gt;    return&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B2CCD6&quot;&gt; StreamingResponse&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B2CCD6&quot;&gt;stream&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;()&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D9F5DD&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D7DBE0&quot;&gt; media_type&lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#C792EA&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#ECC48D&quot;&gt;text/event-stream&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#212121;--shiki-dark:#D6DEEB&quot;&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;MiMo’s stream is already standard SSE — just pipe it through.&lt;/p&gt;</content:encoded></item><item><title>Pi Toolchain</title><link>https://blog.040304.xyz/en/posts/pi-toolchain/</link><guid isPermaLink="true">https://blog.040304.xyz/en/posts/pi-toolchain/</guid><description>My Pi setup — the extensions and MCPs that survived</description><pubDate>Mon, 15 Jun 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Months with Pi, and only these stayed.&lt;/p&gt;
&lt;h2 id=&quot;extensions&quot;&gt;Extensions&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/DietrichGebert/ponytail&quot;&gt;ponytail&lt;/a&gt;: lazy senior mode. Cures GPT’s compulsive over-engineering. Currently on.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;npm:pi-mcp-adapter&lt;/code&gt;: MCP adapter — both mcpScript and MCP tools run through it.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;npm:pi-cache-optimizer&lt;/code&gt;: prompt and KV cache hit-rate optimization.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;~/.pi/agent/extensions/rpiv-local&lt;/code&gt;: my local extension. Packs i18n, ask_user_question, and todo — that’s it.&lt;/p&gt;
&lt;h2 id=&quot;mcps&quot;&gt;MCPs&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/exa-labs/exa-mcp-server&quot;&gt;exa&lt;/a&gt;: web search.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/SammySnake-d/fast-context-mcp&quot;&gt;fast-context&lt;/a&gt;: semantic code search.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/microsoft/playwright-mcp&quot;&gt;playwright&lt;/a&gt;: browser automation.&lt;/p&gt;</content:encoded></item><item><title>Tacit Knowledge</title><link>https://blog.040304.xyz/en/posts/tacit-knowledge/</link><guid isPermaLink="true">https://blog.040304.xyz/en/posts/tacit-knowledge/</guid><description>Why rules always fall short, and how to actually talk to LLMs</description><pubDate>Sun, 10 May 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Michael Polanyi put it bluntly: we know more than we can tell.&lt;/p&gt;
&lt;p&gt;Your body knows how to balance a bicycle, yet you cannot write a manual that teaches someone to ride instantly. You look at a code snippet and know it stinks, but if asked to cite the exact violated rule, words fail.&lt;/p&gt;
&lt;p&gt;That is &lt;strong&gt;tacit knowledge&lt;/strong&gt;: judgment you actively practice but can never fully formalize.&lt;/p&gt;
&lt;h2 id=&quot;longer-style-guides-worse-code&quot;&gt;Longer Style Guides, Worse Code&lt;/h2&gt;
&lt;p&gt;Anyone who has mentored junior devs knows this agony.&lt;/p&gt;
&lt;p&gt;You write down clean rules: use camelCase, keep functions under 50 lines, do one thing per function. The PR comes back ticking every checkbox, yet the architecture is an absolute mess.&lt;/p&gt;
&lt;p&gt;Good taste lives between the rules. Where abstraction stops, structural rhythm, and when to pragmatically bend the rules cannot be codified into rigid statutes.&lt;/p&gt;
&lt;p&gt;Style guides grow thicker and thicker until nobody reads them, yet bad code keeps slipping through.&lt;/p&gt;
&lt;h2 id=&quot;prompting-by-rules-is-a-dead-end&quot;&gt;Prompting by Rules Is a Dead End&lt;/h2&gt;
&lt;p&gt;When prompting LLMs, many act like strict school principals: you must do this, you must never do that, format must match step 1, 2, 3.&lt;/p&gt;
&lt;p&gt;The more rules you stack, the stiffer the output becomes. Where rules leave a gap, the model defaults to bland corporate filler.&lt;/p&gt;
&lt;p&gt;Only three approaches actually work:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Provide examples, not abstract definitions&lt;/strong&gt;: saying “keep the tone concise and natural” achieves nothing; pasting three actual sentences you like lets the model extract the pattern directly&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Show negative examples&lt;/strong&gt;: “don’t sound like this” sets hard boundaries faster than describing the ideal state&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Admit when you can’t define it&lt;/strong&gt;: if the draft feels off, tell it: “this feels fake, rewrite with a raw conversational voice”. Keep judgment in your hands instead of expecting one prompt to solve everything forever&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Instead of exhausting yourself translating intuitive taste into rigid rules, pass concrete samples. You lose far less signal in the process.&lt;/p&gt;</content:encoded></item><item><title>Polymarket Weather Markets — Field Notes</title><link>https://blog.040304.xyz/en/posts/polymarket-weather-trading/</link><guid isPermaLink="true">https://blog.040304.xyz/en/posts/polymarket-weather-trading/</guid><description>A review of strategies for Polymarket&apos;s daily high-temp bucket markets</description><pubDate>Thu, 23 Apr 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Polymarket’s daily high-temperature bucket markets: bet which temperature interval a city’s daily high will land in — Hong Kong, Seoul, Tokyo and more. Multi-outcome buckets, decent liquidity.&lt;/p&gt;
&lt;p&gt;I ran them for a while. Here’s what hurt and what actually works.&lt;/p&gt;
&lt;h2 id=&quot;cheap-yes-lottery&quot;&gt;Cheap YES Lottery&lt;/h2&gt;
&lt;p&gt;Buy YES at 0.1–2¢ in narrow or extreme buckets where your model shows a small edge, then size up. One hit pays 50–5000x, enough to cover a long losing streak.&lt;/p&gt;
&lt;p&gt;The most promising line. Capital-efficient: little money covers 20–30 cities at once. Ants moving house.&lt;/p&gt;
&lt;p&gt;But win rate is brutal — dozens of losers in a row is normal. Forecast models update slowly; you often trade on stale data and the edge evaporates. Low-price buckets are illiquid — you can’t stop out mid-flight, you hold to settlement.&lt;/p&gt;
&lt;h2 id=&quot;expensive-no-grind&quot;&gt;Expensive NO Grind&lt;/h2&gt;
&lt;p&gt;The idea: buy NO at 80–99¢ in extreme buckets, near-certain small profit.&lt;/p&gt;
&lt;p&gt;You simply can’t buy it. It shows 85¢, you lift and slippage takes you to 99¢ — no one sells a near-certain winner cheap. Edge rounds to zero, capital efficiency dies. Abandoned.&lt;/p&gt;
&lt;h2 id=&quot;forecast-vs-market-edge&quot;&gt;Forecast vs. Market Edge&lt;/h2&gt;
&lt;p&gt;Compare professional forecasts — JMA, ECMWF, AccuWeather — against the market’s implied probabilities. Only fire when mispricing exceeds 5–8%, buying 5–30¢ mid-to-cheap buckets.&lt;/p&gt;
&lt;p&gt;Painful in practice.&lt;/p&gt;
&lt;p&gt;Forecasts lag. JMA and ECMWF refresh far slower than the market; by the time you get the latest run, the price has been arbed away. The market gets more efficient every week — bots and real-time data shops abound, and manually beating them on speed is a losing game.&lt;/p&gt;
&lt;p&gt;Scanning 20+ cities by hand, comparing, deciding, executing — one to two hours gone. Fatiguing. Emotion creeps in, and after missing a few edges you start revenge-trading.&lt;/p&gt;
&lt;p&gt;One person caps at 10–20 concurrent positions. With dozens of weather markets running daily, you bleed opportunity.&lt;/p&gt;
&lt;p&gt;Doing edge-hunting by hand is racing pro automation on foot. Not how small capital survives.&lt;/p&gt;
&lt;h2 id=&quot;open-source-starting-points&quot;&gt;Open-Source Starting Points&lt;/h2&gt;
&lt;p&gt;A few repos I found useful when exploring automation:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/suislanchez/polymarket-kalshi-weather-bot&quot;&gt;suislanchez/polymarket-kalshi-weather-bot&lt;/a&gt;: dual-platform, 31-member GFS ensemble, scans every 5 minutes&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/alteregoeth-ai/weatherbot&quot;&gt;alteregoeth-ai/weatherbot&lt;/a&gt;: Polymarket-focused, 20+ cities, Kelly + EV filter, simulation mode&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/yangyuan-zhen/PolyWeather&quot;&gt;yangyuan-zhen/PolyWeather&lt;/a&gt;: web dashboard + Telegram alerts&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;And on Twitter, &lt;a href=&quot;https://x.com/AlterEgo_eth&quot;&gt;@AlterEgo_eth&lt;/a&gt;, &lt;a href=&quot;https://x.com/0xMovez&quot;&gt;@0xMovez&lt;/a&gt;, &lt;a href=&quot;https://x.com/woody_research&quot;&gt;@woody_research&lt;/a&gt; share solid live data and code notes.&lt;/p&gt;
&lt;h2 id=&quot;risk-management&quot;&gt;Risk Management&lt;/h2&gt;
&lt;p&gt;Manual or automated, rule one for small accounts: don’t donate the bankroll.&lt;/p&gt;</content:encoded></item><item><title>Model Orchestration</title><link>https://blog.040304.xyz/en/posts/subagent-orchestration/</link><guid isPermaLink="true">https://blog.040304.xyz/en/posts/subagent-orchestration/</guid><description>Not every task needs the strongest model</description><pubDate>Mon, 13 Apr 2026 00:00:00 GMT</pubDate><content:encoded>&lt;h2 id=&quot;max-tokens-max-thinking&quot;&gt;Max Tokens, Max Thinking&lt;/h2&gt;
&lt;p&gt;Just bought ChatGPT Pro at $200/month — felt like I had to max it out to get my money’s worth. Plus everyone knows gpt-5.4 xhigh is the strongest coding model. So I cranked everything to max. More thinking must be better, right?&lt;/p&gt;
&lt;h2 id=&quot;what-broke&quot;&gt;What Broke&lt;/h2&gt;
&lt;p&gt;After a stretch at high intensity — 500M tokens a day, 2–4 windows, each with 0–3 subagents — the cracks showed.&lt;/p&gt;
&lt;p&gt;Slow. xhigh is genuinely stronger, but it’s also genuinely slow. For everyday coding, the idea has already gone cold while the model is still deep in thought.&lt;/p&gt;
&lt;p&gt;Premature optimization. Most obvious in glue code: it invents compatibility for legacy logic you don’t need, and plans for contingencies that aren’t on the roadmap. Progress drags, code doesn’t get better.&lt;/p&gt;
&lt;p&gt;Wait forever, get a worse result.&lt;/p&gt;
&lt;h2 id=&quot;thinking-via-omo&quot;&gt;Thinking via OMO&lt;/h2&gt;
&lt;p&gt;I’d brushed past &lt;a href=&quot;https://github.com/code-yeongyu/oh-my-openagent&quot;&gt;oh-my-opencode&lt;/a&gt; before without getting why model orchestration matters.&lt;/p&gt;
&lt;p&gt;The point of subagents isn’t more thinking — it’s division of labor. Right agent for the right job.&lt;/p&gt;
&lt;p&gt;OMO lets you assign different models to different roles:&lt;/p&gt;























































&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Role&lt;/th&gt;&lt;th&gt;Responsibility&lt;/th&gt;&lt;th&gt;Model&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Sisyphus&lt;/td&gt;&lt;td&gt;overall coordination, task breakdown&lt;/td&gt;&lt;td&gt;gpt-5.4 high&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Hephaestus&lt;/td&gt;&lt;td&gt;hands-on coding&lt;/td&gt;&lt;td&gt;gpt-5.4 high&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Oracle&lt;/td&gt;&lt;td&gt;architecture decisions&lt;/td&gt;&lt;td&gt;gpt-5.4 high&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Explore&lt;/td&gt;&lt;td&gt;fast codebase search&lt;/td&gt;&lt;td&gt;gpt-5.4-mini-fast medium&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Prometheus + Metis&lt;/td&gt;&lt;td&gt;upfront planning&lt;/td&gt;&lt;td&gt;gpt-5.4-mini-fast high&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Momus&lt;/td&gt;&lt;td&gt;rigorous review, nitpicking&lt;/td&gt;&lt;td&gt;gpt-5.4 xhigh&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;visual-engineering&lt;/td&gt;&lt;td&gt;frontend visuals&lt;/td&gt;&lt;td&gt;gemini-3.1-flash-lite-preview high&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Librarian&lt;/td&gt;&lt;td&gt;knowledge retrieval&lt;/td&gt;&lt;td&gt;gpt-5.4-mini-fast high&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Atlas&lt;/td&gt;&lt;td&gt;deploy &amp;#x26; ops&lt;/td&gt;&lt;td&gt;gpt-5.4-mini-fast high&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;Simple logic: reserve xhigh only where deep thinking matters.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Momus on xhigh: review demands depth.&lt;/li&gt;
&lt;li&gt;ultrabrain on xhigh: architecture planning demands depth.&lt;/li&gt;
&lt;li&gt;Execution, search, everyday tasks drop to high or medium.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Speed returns, flow stays intact. And where depth is needed, it’s still deep.&lt;/p&gt;</content:encoded></item><item><title>Linear vs Compounding</title><link>https://blog.040304.xyz/en/posts/altman-how-to-be-successful/</link><guid isPermaLink="true">https://blog.040304.xyz/en/posts/altman-how-to-be-successful/</guid><description>The only parts that actually matter in Altman&apos;s essay</description><pubDate>Sat, 28 Mar 2026 10:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Many read Sam Altman’s &lt;a href=&quot;https://blog.samaltman.com/how-to-be-successful&quot;&gt;How To Be Successful&lt;/a&gt; as motivational fluff with a dozen bullet points.&lt;/p&gt;
&lt;p&gt;Filter out the filler, and only two core ideas remain.&lt;/p&gt;
&lt;h2 id=&quot;never-trade-your-life-for-linear-growth&quot;&gt;Never Trade Your Life for Linear Growth&lt;/h2&gt;
&lt;p&gt;The first filter for any pursuit is whether it compounds.&lt;/p&gt;
&lt;p&gt;Ask what separates someone 10 years in from someone 2 years in. If it is just 20% more efficiency, it is a linear career. Don’t get stuck there.&lt;/p&gt;
&lt;p&gt;Linear work sells time by the hour, capped at 24 hours in a day.&lt;/p&gt;
&lt;p&gt;Real leverage comes in four forms: code, capital, brand, and network effects. Code runs for millions while you sleep; equity rides market tides. Without leverage, hard work just makes you a hamster running faster on a wheel.&lt;/p&gt;
&lt;h2 id=&quot;every-role-is-sales&quot;&gt;Every Role Is Sales&lt;/h2&gt;
&lt;p&gt;Many technical people hold a quiet snobbery: build it and they will come, looking down on marketing and sales.&lt;/p&gt;
&lt;p&gt;Reality crushes that fantasy.&lt;/p&gt;
&lt;p&gt;Products must be sold to users, ideas sold to teammates, and vision sold to investors. If you can’t bring yourself to sell what you built, you don’t actually believe in it yourself.&lt;/p&gt;
&lt;p&gt;Engineering is just execution; distribution is the only bridge that turns value into reality.&lt;/p&gt;</content:encoded></item><item><title>Mental Operating System</title><link>https://blog.040304.xyz/en/posts/thinking-principles/</link><guid isPermaLink="true">https://blog.040304.xyz/en/posts/thinking-principles/</guid><description>First principles and KISS in plain English</description><pubDate>Fri, 20 Mar 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;There are countless frameworks out there, but only two are worth using as an OS foundation.&lt;/p&gt;
&lt;h2 id=&quot;first-principles-stop-copying-homework&quot;&gt;First Principles: Stop Copying Homework&lt;/h2&gt;
&lt;p&gt;First principles has been hyped into mythology, but the core is simple: reject analogy.&lt;/p&gt;
&lt;p&gt;Looking at how others do it or what “best practice” dictates is just copying homework. It feels fast, but when they step into a trap, you follow right behind.&lt;/p&gt;
&lt;p&gt;Strip an issue down to bare physical facts, then build upward from zero. It takes longer, but the conclusion belongs to you, and when something breaks, you know exactly which brick came loose.&lt;/p&gt;
&lt;h2 id=&quot;kiss-beware-intellectual-vanity&quot;&gt;KISS: Beware Intellectual Vanity&lt;/h2&gt;
&lt;p&gt;Everyone quotes KISS, yet few actually practice it.&lt;/p&gt;
&lt;p&gt;Engineers have intellectual vanity. Writing a tiny tool and wrapping it in three layers of design patterns, or building a personal blog on microservices and Kubernetes. That complexity never serves users; it just strokes the developer’s ego.&lt;/p&gt;
&lt;p&gt;Complex systems create exponentially more surface area for bugs and maintenance headaches.&lt;/p&gt;
&lt;p&gt;If a shell script works, don’t build a project. If SQLite handles the load, don’t spin up a distributed cluster. Deleting code feels better than writing it, and only simple things survive reality.&lt;/p&gt;</content:encoded></item><item><title>We Bought a Coin and Never Worked Again</title><link>https://blog.040304.xyz/en/posts/neet-meme/</link><guid isPermaLink="true">https://blog.040304.xyz/en/posts/neet-meme/</guid><description>The slogan of a meme coin</description><pubDate>Thu, 05 Mar 2026 16:00:00 GMT</pubDate><content:encoded>&lt;p&gt;There’s a meme coin called NEET. Its slogan: “We bought a coin and never worked again.”&lt;/p&gt;
&lt;p&gt;Line one of the whitepaper: &lt;em&gt;no intrinsic value or expectation of financial return.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Community mantras: “Reject the wagie cage” and “DO NOTHING. GET PAID.”&lt;/p&gt;
&lt;p&gt;Inside lives a cohort called NEET Contractors — people who quit work and try to live off crypto gains. Some got rekt, some are still hanging on, some truly never went back.&lt;/p&gt;
&lt;p&gt;It’s a meme. But some memes spread because they say out loud what many have wanted to say and never dared:&lt;/p&gt;
&lt;p&gt;“We bought a coin and never worked again” — absurd? Absolutely. But on second thought, maybe not so absurd at all.&lt;/p&gt;</content:encoded></item><item><title>Clash Fake IP Breaks TLS Handshake</title><link>https://blog.040304.xyz/en/posts/clash-fake-ip-tls/</link><guid isPermaLink="true">https://blog.040304.xyz/en/posts/clash-fake-ip-tls/</guid><description>Debugging TLS handshake failures under Clash Fake-IP mode</description><pubDate>Sun, 18 Jan 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Installing an AUR package with &lt;code&gt;paru&lt;/code&gt; failed with &lt;code&gt;TLS connect error: error:0A000126:SSL routines::unexpected eof while reading&lt;/code&gt; — even with TUN and global proxy on. Turned out to be Clash’s Fake IP.&lt;/p&gt;
&lt;h2 id=&quot;how-i-found-it&quot;&gt;How I Found It&lt;/h2&gt;
&lt;p&gt;First, confirm the proxy itself is fine:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes min-light night-owl&quot; style=&quot;--shiki-light:#24292eff;--shiki-dark:#d6deeb;--shiki-light-bg:#ffffff;--shiki-dark-bg:#011627; overflow-x: auto; white-space: pre-wrap; word-wrap: break-word;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-light-font-style:inherit;--shiki-dark:#82AAFF;--shiki-dark-font-style:italic&quot;&gt;curl&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#ECC48D&quot;&gt; ipinfo.io&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#C2C3C5;--shiki-light-font-style:inherit;--shiki-dark:#637777;--shiki-dark-font-style:italic&quot;&gt;# US IP — proxy works&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Then check DNS, and the culprit shows up:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes min-light night-owl&quot; style=&quot;--shiki-light:#24292eff;--shiki-dark:#d6deeb;--shiki-light-bg:#ffffff;--shiki-dark-bg:#011627; overflow-x: auto; white-space: pre-wrap; word-wrap: break-word;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-light-font-style:inherit;--shiki-dark:#82AAFF;--shiki-dark-font-style:italic&quot;&gt;nslookup&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#ECC48D&quot;&gt; dl.google.com&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#C2C3C5;--shiki-light-font-style:inherit;--shiki-dark:#637777;--shiki-dark-font-style:italic&quot;&gt;# Address: 198.18.0.15  ← Fake IP&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;code&gt;198.18.0.0/16&lt;/code&gt; is Clash’s Fake-IP range. Inspect the handshake with &lt;code&gt;curl -v&lt;/code&gt;:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes min-light night-owl&quot; style=&quot;--shiki-light:#24292eff;--shiki-dark:#d6deeb;--shiki-light-bg:#ffffff;--shiki-dark-bg:#011627; overflow-x: auto; white-space: pre-wrap; word-wrap: break-word;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-light-font-style:inherit;--shiki-dark:#82AAFF;--shiki-dark-font-style:italic&quot;&gt;curl&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#82AAFF&quot;&gt; -v&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#ECC48D&quot;&gt; https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-canary/google-chrome-canary_146.0.7637.0-1_amd64.deb&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#82AAFF&quot;&gt; -o&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#ECC48D&quot;&gt; /tmp/test.deb&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#C2C3C5;--shiki-light-font-style:inherit;--shiki-dark:#637777;--shiki-dark-font-style:italic&quot;&gt;# * Trying 198.18.0.15:443...&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#C2C3C5;--shiki-light-font-style:inherit;--shiki-dark:#637777;--shiki-dark-font-style:italic&quot;&gt;# * TLSv1.3 (OUT), TLS handshake, Client hello (1):&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#C2C3C5;--shiki-light-font-style:inherit;--shiki-dark:#637777;--shiki-dark-font-style:italic&quot;&gt;# * TLS connect error: error:0A000126:SSL routines::unexpected eof while reading&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;After resolving to a Fake IP, &lt;a href=&quot;https://github.com/MetaCubeX/mihomo&quot;&gt;Mihomo&lt;/a&gt; (Clash Meta) should transparently proxy to the real server, but its handling of TLS handshakes for certain domains under Fake-IP has compatibility issues — likely SNI-related. Google’s CDN sees a malformed handshake and drops the connection.&lt;/p&gt;
&lt;h2 id=&quot;fix&quot;&gt;Fix&lt;/h2&gt;
&lt;p&gt;The cleanest fix is to exclude &lt;code&gt;dl.google.com&lt;/code&gt; from Fake IP. Add a &lt;code&gt;fake-ip-filter&lt;/code&gt; to your Clash config (&lt;code&gt;~/.config/clash/config.yaml&lt;/code&gt; or &lt;code&gt;~/.config/mihomo/config.yaml&lt;/code&gt;):&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes min-light night-owl&quot; style=&quot;--shiki-light:#24292eff;--shiki-dark:#d6deeb;--shiki-light-bg:#ffffff;--shiki-dark-bg:#011627; overflow-x: auto; white-space: pre-wrap; word-wrap: break-word;&quot; tabindex=&quot;0&quot; data-language=&quot;yaml&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#7FDBCA&quot;&gt;dns&lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#D6DEEB&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#7FDBCA&quot;&gt;  fake-ip-filter&lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#D6DEEB&quot;&gt;:&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt;    - &lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#ECC48D&quot;&gt;dl.google.com&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt;    - &lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#ECC48D&quot;&gt;*.dl.google.com&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Restart Clash and it will resolve with the real IP — handshake succeeds.&lt;/p&gt;
&lt;p&gt;If you don’t want to touch the config, downloading the &lt;code&gt;.deb&lt;/code&gt; in a browser also works. Browsers use a different TLS stack and don’t hit this bug:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes min-light night-owl&quot; style=&quot;--shiki-light:#24292eff;--shiki-dark:#d6deeb;--shiki-light-bg:#ffffff;--shiki-dark-bg:#011627; overflow-x: auto; white-space: pre-wrap; word-wrap: break-word;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-light-font-style:inherit;--shiki-dark:#C5E478;--shiki-dark-font-style:italic&quot;&gt;cd&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#ECC48D&quot;&gt; ~/Downloads&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-light-font-style:inherit;--shiki-dark:#82AAFF;--shiki-dark-font-style:italic&quot;&gt;ar&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#ECC48D&quot;&gt; x&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#ECC48D&quot;&gt; google-chrome-canary_&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#7FDBCA&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#ECC48D&quot;&gt;.deb&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-light-font-style:inherit;--shiki-dark:#82AAFF;--shiki-dark-font-style:italic&quot;&gt;tar&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#ECC48D&quot;&gt; xf&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#ECC48D&quot;&gt; data.tar.xz&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-light-font-style:inherit;--shiki-dark:#82AAFF;--shiki-dark-font-style:italic&quot;&gt;sudo&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#ECC48D&quot;&gt; cp&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#82AAFF&quot;&gt; -r&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#ECC48D&quot;&gt; opt/google/chrome-canary&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#ECC48D&quot;&gt; /opt/&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-light-font-style:inherit;--shiki-dark:#82AAFF;--shiki-dark-font-style:italic&quot;&gt;sudo&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#ECC48D&quot;&gt; cp&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#82AAFF&quot;&gt; -r&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#ECC48D&quot;&gt; usr/&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#7FDBCA&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#ECC48D&quot;&gt; /usr/&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</content:encoded></item><item><title>Fixing npm Global Install Permission Errors</title><link>https://blog.040304.xyz/en/posts/npm-permission/</link><guid isPermaLink="true">https://blog.040304.xyz/en/posts/npm-permission/</guid><description>Fixing EACCES when installing npm packages globally</description><pubDate>Thu, 11 Dec 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;code&gt;npm install -g&lt;/code&gt; throws &lt;code&gt;EACCES: permission denied&lt;/code&gt; because npm tries to write global packages to system directories like &lt;code&gt;/usr/lib/node_modules&lt;/code&gt;, where a normal user has no write access.&lt;/p&gt;
&lt;p&gt;It looks like this:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes min-light night-owl&quot; style=&quot;--shiki-light:#24292eff;--shiki-dark:#d6deeb;--shiki-light-bg:#ffffff;--shiki-dark-bg:#011627; overflow-x: auto; white-space: pre-wrap; word-wrap: break-word;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-light-font-style:inherit;--shiki-dark:#82AAFF;--shiki-dark-font-style:italic&quot;&gt;npm&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#ECC48D&quot;&gt; error&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#ECC48D&quot;&gt; code&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#ECC48D&quot;&gt; EACCES&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-light-font-style:inherit;--shiki-dark:#82AAFF;--shiki-dark-font-style:italic&quot;&gt;npm&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#ECC48D&quot;&gt; error&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#ECC48D&quot;&gt; syscall&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#ECC48D&quot;&gt; rename&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-light-font-style:inherit;--shiki-dark:#82AAFF;--shiki-dark-font-style:italic&quot;&gt;npm&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#ECC48D&quot;&gt; error&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#ECC48D&quot;&gt; path&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#ECC48D&quot;&gt; /usr/lib/node_modules/npm/node_modules/env-paths&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-light-font-style:inherit;--shiki-dark:#82AAFF;--shiki-dark-font-style:italic&quot;&gt;npm&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#ECC48D&quot;&gt; error&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#ECC48D&quot;&gt; errno&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#82AAFF&quot;&gt; -13&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-light-font-style:inherit;--shiki-dark:#82AAFF;--shiki-dark-font-style:italic&quot;&gt;npm&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#ECC48D&quot;&gt; error&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#ECC48D&quot;&gt; Error:&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#ECC48D&quot;&gt; EACCES:&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#ECC48D&quot;&gt; permission&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#ECC48D&quot;&gt; denied&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Don’t brute-force it with &lt;code&gt;sudo&lt;/code&gt; — that just chowns a bunch of files to root and makes things worse. Move the global prefix into your home directory instead:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes min-light night-owl&quot; style=&quot;--shiki-light:#24292eff;--shiki-dark:#d6deeb;--shiki-light-bg:#ffffff;--shiki-dark-bg:#011627; overflow-x: auto; white-space: pre-wrap; word-wrap: break-word;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-light-font-style:inherit;--shiki-dark:#82AAFF;--shiki-dark-font-style:italic&quot;&gt;mkdir&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#ECC48D&quot;&gt; ~/.npm-global&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-light-font-style:inherit;--shiki-dark:#82AAFF;--shiki-dark-font-style:italic&quot;&gt;npm&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#ECC48D&quot;&gt; config&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#ECC48D&quot;&gt; set&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#ECC48D&quot;&gt; prefix&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt; &apos;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#ECC48D&quot;&gt;~/.npm-global&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&apos;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Then add its &lt;code&gt;bin&lt;/code&gt; to your &lt;code&gt;PATH&lt;/code&gt; in your shell config (&lt;code&gt;~/.bashrc&lt;/code&gt; for bash, &lt;code&gt;~/.zshrc&lt;/code&gt; for zsh):&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes min-light night-owl&quot; style=&quot;--shiki-light:#24292eff;--shiki-dark:#d6deeb;--shiki-light-bg:#ffffff;--shiki-dark-bg:#011627; overflow-x: auto; white-space: pre-wrap; word-wrap: break-word;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-light-font-style:inherit;--shiki-dark:#C792EA;--shiki-dark-font-style:italic&quot;&gt;export&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#C5E478&quot;&gt; PATH&lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#C792EA&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#7FDBCA&quot;&gt;~&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt;/.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#C5E478&quot;&gt;npm-global&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#C5E478&quot;&gt;bin&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#C5E478&quot;&gt;$PATH&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Source it, and &lt;code&gt;npm install -g&lt;/code&gt; works without sudo:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes min-light night-owl&quot; style=&quot;--shiki-light:#24292eff;--shiki-dark:#d6deeb;--shiki-light-bg:#ffffff;--shiki-dark-bg:#011627; overflow-x: auto; white-space: pre-wrap; word-wrap: break-word;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-light-font-style:inherit;--shiki-dark:#C5E478;--shiki-dark-font-style:italic&quot;&gt;source&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#ECC48D&quot;&gt; ~/.bashrc&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-light-font-style:inherit;--shiki-dark:#82AAFF;--shiki-dark-font-style:italic&quot;&gt;npm&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#ECC48D&quot;&gt; install&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#82AAFF&quot;&gt; -g&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#ECC48D&quot;&gt; @musistudio/claude-code-router&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</content:encoded></item><item><title>Fixing IME on Wayland</title><link>https://blog.040304.xyz/en/posts/wayland-input/</link><guid isPermaLink="true">https://blog.040304.xyz/en/posts/wayland-input/</guid><description>Fixing garbled input in Electron apps on Wayland + Fcitx5</description><pubDate>Sat, 30 Aug 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;On Wayland, typing Chinese fast in Electron apps (like Cherry Studio) scrambles the characters — they shuffle and reorder. Type slowly and it’s fine. Happens across multiple Electron apps, so it’s clearly Electron’s input path on Wayland/XWayland, not the IME itself.&lt;/p&gt;
&lt;p&gt;Others hit the same issue: &lt;a href=&quot;https://github.com/CherryHQ/cherry-studio/issues/104&quot;&gt;Cherry Studio #104&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&quot;fix&quot;&gt;Fix&lt;/h2&gt;
&lt;p&gt;Enable native Wayland IME and Ozone for Electron. Edit &lt;code&gt;~/.config/electron-flags.conf&lt;/code&gt;:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes min-light night-owl&quot; style=&quot;--shiki-light:#24292eff;--shiki-dark:#d6deeb;--shiki-light-bg:#ffffff;--shiki-dark-bg:#011627; overflow-x: auto; white-space: pre-wrap; word-wrap: break-word;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;--enable-wayland-ime&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;--ozone-platform-hint=auto&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;--ozone-platform=wayland&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;--enable-features=UseOzonePlatform,WaylandWindowDecorations&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Save, then fully quit the target app and reopen (not just close the window — kill the process). Most Electron apps read this file automatically and switch to the native input path. The scrambling stops.&lt;/p&gt;
&lt;p&gt;Two gotchas:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;If the app still runs as XWayland, check its launcher for a forced &lt;code&gt;--ozone-platform=x11&lt;/code&gt; and remove it&lt;/li&gt;
&lt;li&gt;Works for both Fcitx5 and IBus, on Hyprland, Sway, or KDE Wayland&lt;/li&gt;
&lt;/ul&gt;</content:encoded></item><item><title>Fixing the Web3 &quot;Replacement Transaction Underpriced&quot; Error</title><link>https://blog.040304.xyz/en/posts/web3-transaction/</link><guid isPermaLink="true">https://blog.040304.xyz/en/posts/web3-transaction/</guid><description>How to fix the Ethereum replacement transaction underpriced error</description><pubDate>Sat, 25 Jan 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Binance Web3 Wallet throws &lt;code&gt;replacement transaction underpriced&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Ethereum lets you replace a pending transaction with a new one using the same nonce, but the new gas price must be at least 10% higher — otherwise nodes reject it outright. So this error almost always means one thing: you didn’t bump gas enough to override the previous tx.&lt;/p&gt;
&lt;p&gt;Options:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Bump gas by 10%+ and resubmit&lt;/li&gt;
&lt;li&gt;Wait for the pending tx to confirm if you’re not in a hurry&lt;/li&gt;
&lt;li&gt;To cancel a stuck tx: send a 0 ETH self-transfer with the same nonce and a higher gas price — an empty tx that squeezes out the old one&lt;/li&gt;
&lt;/ul&gt;</content:encoded></item><item><title>Removing __pycache__ from Git</title><link>https://blog.040304.xyz/en/posts/pycache-fix/</link><guid isPermaLink="true">https://blog.040304.xyz/en/posts/pycache-fix/</guid><description>Removing __pycache__ from a Git repo for good</description><pubDate>Sat, 18 Jan 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;code&gt;__pycache__&lt;/code&gt; is Python’s bytecode cache (those &lt;code&gt;.pyc&lt;/code&gt; files). It doesn’t belong in Git.&lt;/p&gt;
&lt;p&gt;Ignore it first. Add to &lt;code&gt;.gitignore&lt;/code&gt;:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes min-light night-owl&quot; style=&quot;--shiki-light:#24292eff;--shiki-dark:#d6deeb;--shiki-light-bg:#ffffff;--shiki-dark-bg:#011627; overflow-x: auto; white-space: pre-wrap; word-wrap: break-word;&quot; tabindex=&quot;0&quot; data-language=&quot;txt&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;**/__pycache__/&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If you’ve already committed it, remove it from the index but keep local files:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes min-light night-owl&quot; style=&quot;--shiki-light:#24292eff;--shiki-dark:#d6deeb;--shiki-light-bg:#ffffff;--shiki-dark-bg:#011627; overflow-x: auto; white-space: pre-wrap; word-wrap: break-word;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-light-font-style:inherit;--shiki-dark:#82AAFF;--shiki-dark-font-style:italic&quot;&gt;git&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#ECC48D&quot;&gt; rm&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#82AAFF&quot;&gt; -r&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#82AAFF&quot;&gt; --cached&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#ECC48D&quot;&gt; __pycache__&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-light-font-style:inherit;--shiki-dark:#82AAFF;--shiki-dark-font-style:italic&quot;&gt;git&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#ECC48D&quot;&gt; commit&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#82AAFF&quot;&gt; -m&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#ECC48D&quot;&gt;Remove __pycache__ from version control&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-light-font-style:inherit;--shiki-dark:#82AAFF;--shiki-dark-font-style:italic&quot;&gt;git&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#ECC48D&quot;&gt; push&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;That stops tracking going forward. But if it’s deep in history, it still lives there. To purge history, rewrite it with &lt;a href=&quot;https://rtyley.github.io/bfg-repo-cleaner/&quot;&gt;BFG Repo-Cleaner&lt;/a&gt; (on Arch: &lt;code&gt;yay -S bfg-repo-cleaner&lt;/code&gt;, otherwise grab the jar from the &lt;a href=&quot;https://github.com/rtyley/bfg-repo-cleaner/releases&quot;&gt;releases page&lt;/a&gt;):&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes min-light night-owl&quot; style=&quot;--shiki-light:#24292eff;--shiki-dark:#d6deeb;--shiki-light-bg:#ffffff;--shiki-dark-bg:#011627; overflow-x: auto; white-space: pre-wrap; word-wrap: break-word;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-light-font-style:inherit;--shiki-dark:#82AAFF;--shiki-dark-font-style:italic&quot;&gt;bfg&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#82AAFF&quot;&gt; --delete-folders&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt; &apos;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#ECC48D&quot;&gt;__pycache__&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#82AAFF&quot;&gt; --no-blob-protection&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-light-font-style:inherit;--shiki-dark:#82AAFF;--shiki-dark-font-style:italic&quot;&gt;git&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#ECC48D&quot;&gt; reflog&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#ECC48D&quot;&gt; expire&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#82AAFF&quot;&gt; --expire=now&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#82AAFF&quot;&gt; --all&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-light-font-style:inherit;--shiki-dark:#82AAFF;--shiki-dark-font-style:italic&quot;&gt;git&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#ECC48D&quot;&gt; gc&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#82AAFF&quot;&gt; --prune=now&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#82AAFF&quot;&gt; --aggressive&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-light-font-style:inherit;--shiki-dark:#82AAFF;--shiki-dark-font-style:italic&quot;&gt;git&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#ECC48D&quot;&gt; push&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#82AAFF&quot;&gt; --force&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;code&gt;--force&lt;/code&gt; rewrites remote history. If others collaborate on the repo, warn them first — don’t nuke their branches.&lt;/p&gt;</content:encoded></item><item><title>Hard Truths About Trading</title><link>https://blog.040304.xyz/en/posts/trading-thoughts/</link><guid isPermaLink="true">https://blog.040304.xyz/en/posts/trading-thoughts/</guid><description>Things textbooks skip, learned through real losses</description><pubDate>Fri, 29 Nov 2024 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Textbooks talk about position sizing, moving averages, and sentiment cycles. It all makes sense until real money is on the line.&lt;/p&gt;
&lt;h2 id=&quot;win-rate-is-a-trap&quot;&gt;Win Rate Is a Trap&lt;/h2&gt;
&lt;p&gt;Beginners obsess over high win rates.&lt;/p&gt;
&lt;p&gt;An 80% win rate sounds great, but in reality you take ten small wins and wipe them all out holding one losing bag.&lt;/p&gt;
&lt;p&gt;Trading is never about win rate; it is about risk-to-reward. Cut mistakes at a few hundred bucks, and when you are right, have the stomach to sit tight and let profits run.&lt;/p&gt;
&lt;h2 id=&quot;position-size-controls-your-brain&quot;&gt;Position Size Controls Your Brain&lt;/h2&gt;
&lt;p&gt;Forget indicators. Once size gets too big, psychology falls apart.&lt;/p&gt;
&lt;p&gt;With heavy leverage, a tiny 5-minute wick spikes your heart rate to 120. In that state, rational thinking is gone, replaced entirely by prayer and panic.&lt;/p&gt;
&lt;p&gt;Risk only fixed capital per trade. Withdraw profits, never double down to revenge-trade. If a zero on this position won’t ruin your sleep, your size is right.&lt;/p&gt;
&lt;h2 id=&quot;most-time-is-garbage-time&quot;&gt;Most Time Is Garbage Time&lt;/h2&gt;
&lt;p&gt;Real trending moves happen across maybe two months out of a whole year.&lt;/p&gt;
&lt;p&gt;The other ten months are choppy, boring ranges designed to grind your mental capital down.&lt;/p&gt;
&lt;p&gt;Trading out of boredom just feeds fees to the exchange. Closing charts and playing games beats any technical analysis during flat markets.&lt;/p&gt;
&lt;h2 id=&quot;the-enemy-of-stop-losses-is-hope&quot;&gt;The Enemy of Stop-Losses Is Hope&lt;/h2&gt;
&lt;p&gt;The second price breaks your stop level, the first thought that pops into your head is always: maybe the next candle bounces.&lt;/p&gt;
&lt;p&gt;That hope kills accounts every single time.&lt;/p&gt;
&lt;p&gt;Even if it bounces, it is no longer your trade. When the stop triggers, cut it immediately without hesitation.&lt;/p&gt;</content:encoded></item><item><title>Neovim Clipboard on Wayland</title><link>https://blog.040304.xyz/en/posts/nvim-clipboard/</link><guid isPermaLink="true">https://blog.040304.xyz/en/posts/nvim-clipboard/</guid><description>Fixing Neovim clipboard sharing on Wayland</description><pubDate>Thu, 14 Nov 2024 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;You &lt;code&gt;d&lt;/code&gt;-delete a block in Neovim, then try to paste what you yanked earlier — but what comes out is what you just deleted.&lt;/p&gt;
&lt;p&gt;At first I thought Neovim wasn’t talking to &lt;a href=&quot;https://github.com/bugaevc/wl-clipboard&quot;&gt;&lt;code&gt;wl-clipboard&lt;/code&gt;&lt;/a&gt;:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes min-light night-owl&quot; style=&quot;--shiki-light:#24292eff;--shiki-dark:#d6deeb;--shiki-light-bg:#ffffff;--shiki-dark-bg:#011627; overflow-x: auto; white-space: pre-wrap; word-wrap: break-word;&quot; tabindex=&quot;0&quot; data-language=&quot;lua&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#C5E478&quot;&gt;vim&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt;.opt.clipboard &lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#7FDBCA&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#ECC48D&quot;&gt;unnamedplus&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;That wasn’t it. &lt;code&gt;unnamedplus&lt;/code&gt; syncs every &lt;code&gt;d&lt;/code&gt; to the system clipboard, so the delete overwrites what you had yanked.&lt;/p&gt;
&lt;p&gt;Vim’s logic is: delete &lt;em&gt;is&lt;/em&gt; cut — deleted text goes to a register by default. To make &lt;code&gt;d&lt;/code&gt; delete without yanking, route it to the black-hole register &lt;code&gt;_&lt;/code&gt; in &lt;code&gt;~/.config/nvim/init.lua&lt;/code&gt;:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes min-light night-owl&quot; style=&quot;--shiki-light:#24292eff;--shiki-dark:#d6deeb;--shiki-light-bg:#ffffff;--shiki-dark-bg:#011627; overflow-x: auto; white-space: pre-wrap; word-wrap: break-word;&quot; tabindex=&quot;0&quot; data-language=&quot;lua&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#C5E478&quot;&gt;vim&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt;.api.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#C5E478&quot;&gt;nvim_set_keymap&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#ECC48D&quot;&gt;n&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#ECC48D&quot;&gt;d&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#ECC48D&quot;&gt;&quot;_d&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt;, { &lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#C5E478&quot;&gt;noremap&lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#7FDBCA&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;--shiki-light:#1976D2;--shiki-dark:#82AAFF&quot;&gt; true&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt; })&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#C5E478&quot;&gt;vim&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt;.api.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#C5E478&quot;&gt;nvim_set_keymap&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#ECC48D&quot;&gt;n&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#ECC48D&quot;&gt;D&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#ECC48D&quot;&gt;&quot;_D&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt;, { &lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#C5E478&quot;&gt;noremap&lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#7FDBCA&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;--shiki-light:#1976D2;--shiki-dark:#82AAFF&quot;&gt; true&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt; })&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#C5E478&quot;&gt;vim&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt;.api.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#C5E478&quot;&gt;nvim_set_keymap&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#ECC48D&quot;&gt;n&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#ECC48D&quot;&gt;dd&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#ECC48D&quot;&gt;&quot;_dd&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&apos;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt;, { &lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#C5E478&quot;&gt;noremap&lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#7FDBCA&quot;&gt; =&lt;/span&gt;&lt;span style=&quot;--shiki-light:#1976D2;--shiki-dark:#82AAFF&quot;&gt; true&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292EFF;--shiki-dark:#D6DEEB&quot;&gt; })&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</content:encoded></item><item><title>Python OCR Automation on Hyprland</title><link>https://blog.040304.xyz/en/posts/ocr-script/</link><guid isPermaLink="true">https://blog.040304.xyz/en/posts/ocr-script/</guid><description>Screenshot OCR with Grim + Tesseract</description><pubDate>Wed, 16 Oct 2024 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Couldn’t find an OCR tool I liked on Hyprland, so I wrote one.&lt;/p&gt;
&lt;p&gt;You need four pieces: &lt;a href=&quot;https://github.com/tesseract-ocr/tesseract&quot;&gt;Tesseract&lt;/a&gt; (OCR engine), &lt;a href=&quot;https://github.com/emersion/grim&quot;&gt;Grim&lt;/a&gt; (Wayland screenshots), &lt;a href=&quot;https://github.com/emersion/slurp&quot;&gt;Slurp&lt;/a&gt; (region selection), and &lt;a href=&quot;https://github.com/bugaevc/wl-clipboard&quot;&gt;wl-clipboard&lt;/a&gt; (clipboard).&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes min-light night-owl&quot; style=&quot;--shiki-light:#24292eff;--shiki-dark:#d6deeb;--shiki-light-bg:#ffffff;--shiki-dark-bg:#011627; overflow-x: auto; white-space: pre-wrap; word-wrap: break-word;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-light-font-style:inherit;--shiki-dark:#82AAFF;--shiki-dark-font-style:italic&quot;&gt;sudo&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#ECC48D&quot;&gt; pacman&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#82AAFF&quot;&gt; -S&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#ECC48D&quot;&gt; tesseract&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#ECC48D&quot;&gt; grim&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#ECC48D&quot;&gt; slurp&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#ECC48D&quot;&gt; wl-clipboard&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Three steps: Slurp selects a region for Grim to capture, Tesseract reads it, result goes to the clipboard:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes min-light night-owl&quot; style=&quot;--shiki-light:#24292eff;--shiki-dark:#d6deeb;--shiki-light-bg:#ffffff;--shiki-dark-bg:#011627; overflow-x: auto; white-space: pre-wrap; word-wrap: break-word;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#C2C3C5;--shiki-light-font-style:inherit;--shiki-dark:#637777;--shiki-dark-font-style:italic&quot;&gt;#!/bin/bash&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-light-font-style:inherit;--shiki-dark:#82AAFF;--shiki-dark-font-style:italic&quot;&gt;grim&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#82AAFF&quot;&gt; -g&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt; &quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#ECC48D&quot;&gt;$(&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-light-font-style:inherit;--shiki-dark:#82AAFF;--shiki-dark-font-style:italic&quot;&gt;slurp&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#ECC48D&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;--shiki-light:#22863A;--shiki-dark:#D9F5DD&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#ECC48D&quot;&gt; /tmp/screenshot.png&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-light-font-style:inherit;--shiki-dark:#82AAFF;--shiki-dark-font-style:italic&quot;&gt;tesseract&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#ECC48D&quot;&gt; /tmp/screenshot.png&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#ECC48D&quot;&gt; -&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#82AAFF&quot;&gt; -l&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#ECC48D&quot;&gt; chi_sim+eng&lt;/span&gt;&lt;span style=&quot;--shiki-light:#D32F2F;--shiki-dark:#7FDBCA&quot;&gt; |&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-light-font-style:inherit;--shiki-dark:#82AAFF;--shiki-dark-font-style:italic&quot;&gt; wl-copy&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-light-font-style:inherit;--shiki-dark:#82AAFF;--shiki-dark-font-style:italic&quot;&gt;rm&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#ECC48D&quot;&gt; /tmp/screenshot.png&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;code&gt;-l chi_sim+eng&lt;/code&gt; does Chinese + English. Swap in whatever language packs you need.&lt;/p&gt;
&lt;p&gt;Save it somewhere on your &lt;code&gt;PATH&lt;/code&gt; and make it executable:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes min-light night-owl&quot; style=&quot;--shiki-light:#24292eff;--shiki-dark:#d6deeb;--shiki-light-bg:#ffffff;--shiki-dark-bg:#011627; overflow-x: auto; white-space: pre-wrap; word-wrap: break-word;&quot; tabindex=&quot;0&quot; data-language=&quot;bash&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-light-font-style:inherit;--shiki-dark:#82AAFF;--shiki-dark-font-style:italic&quot;&gt;chmod&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#ECC48D&quot;&gt; +x&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#ECC48D&quot;&gt; ocr_screenshot.sh&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-light-font-style:inherit;--shiki-dark:#82AAFF;--shiki-dark-font-style:italic&quot;&gt;sudo&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#ECC48D&quot;&gt; mv&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#ECC48D&quot;&gt; ocr_screenshot.sh&lt;/span&gt;&lt;span style=&quot;--shiki-light:#2B5581;--shiki-dark:#ECC48D&quot;&gt; /usr/local/bin/&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Bind it in &lt;code&gt;~/.config/hypr/hyprland.conf&lt;/code&gt; — Super+O to OCR anything on screen:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes min-light night-owl&quot; style=&quot;--shiki-light:#24292eff;--shiki-dark:#d6deeb;--shiki-light-bg:#ffffff;--shiki-dark-bg:#011627; overflow-x: auto; white-space: pre-wrap; word-wrap: break-word;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;bind = SUPER, O, exec, ocr_screenshot.sh&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</content:encoded></item><item><title>ENS Is an Identity, Not a Speculation Tool</title><link>https://blog.040304.xyz/en/posts/ens-registration/</link><guid isPermaLink="true">https://blog.040304.xyz/en/posts/ens-registration/</guid><description>Treat it as an on-chain business card, not an asset flip</description><pubDate>Fri, 02 Aug 2024 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Most people who hoarded 3-digit and 4-digit ENS domains during the hype are now holding bags, reluctant to even pay annual renewal fees.&lt;/p&gt;
&lt;h2 id=&quot;it-is-an-identity-not-an-investment&quot;&gt;It Is an Identity, Not an Investment&lt;/h2&gt;
&lt;p&gt;The real value of ENS is never secondary market flips. It is turning unreadable &lt;code&gt;0x&lt;/code&gt; hex addresses into human language.&lt;/p&gt;
&lt;p&gt;Sending funds without verifying the first and last four characters, immune to clipboard hijacker malware, is where the utility actually lives.&lt;/p&gt;
&lt;h2 id=&quot;practical-takeaways&quot;&gt;Practical Takeaways&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Register for 5 to 10 years upfront&lt;/strong&gt;: domain fees are predictable, but mainnet gas spikes hurt. Renewing yearly just bleeds fees to validators; locking a long window is far cheaper&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Always set the Primary Name&lt;/strong&gt;: without reverse resolution, dApps and wallets still show a garbled hex string, rendering the purchase useless&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Don’t overcomplicate site hosting&lt;/strong&gt;: mapping IPFS static sites to ENS sounds cool, but public gateways load painfully slow. A basic redirect or simple profile page is plenty&lt;/li&gt;
&lt;/ul&gt;</content:encoded></item><item><title>Neovim Search and Replace</title><link>https://blog.040304.xyz/en/posts/neovim-replace/</link><guid isPermaLink="true">https://blog.040304.xyz/en/posts/neovim-replace/</guid><description>Batch find-and-replace in Neovim</description><pubDate>Sat, 22 Jun 2024 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Batch replace across multiple files — load them with &lt;code&gt;:args&lt;/code&gt;, then run &lt;code&gt;:argdo&lt;/code&gt;:&lt;/p&gt;
&lt;pre class=&quot;astro-code astro-code-themes min-light night-owl&quot; style=&quot;--shiki-light:#24292eff;--shiki-dark:#d6deeb;--shiki-light-bg:#ffffff;--shiki-dark-bg:#011627; overflow-x: auto; white-space: pre-wrap; word-wrap: break-word;&quot; tabindex=&quot;0&quot; data-language=&quot;plaintext&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;:args file1.txt file2.txt file3.txt&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;:argdo %s/pattern/replacement/g&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If that’s too much ceremony, use &lt;a href=&quot;https://github.com/nvim-pack/nvim-spectre&quot;&gt;nvim-spectre&lt;/a&gt;. Visual search and replace — you see exactly what will change, at a glance.&lt;/p&gt;</content:encoded></item><item><title>Minimalism</title><link>https://blog.040304.xyz/en/posts/minimalism-life/</link><guid isPermaLink="true">https://blog.040304.xyz/en/posts/minimalism-life/</guid><description>Strip away the excess — what remains is what matters.</description><pubDate>Tue, 24 Oct 2023 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Minimalism isn’t a contest of who throws away more. First figure out what truly matters to you — the rest becomes easy to let go.&lt;/p&gt;
&lt;p&gt;Once you’ve subtracted, what remains is what you actually care about.&lt;/p&gt;</content:encoded></item><item><title>The Essence of Text</title><link>https://blog.040304.xyz/en/posts/text-essence/</link><guid isPermaLink="true">https://blog.040304.xyz/en/posts/text-essence/</guid><description>The value of pure text</description><pubDate>Tue, 24 Oct 2023 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;The early internet looked like this: a black screen, a blinking cursor, and nothing but text.&lt;/p&gt;
&lt;p&gt;This blog is the same — no thumbnails, no sidebar, just text and you.&lt;/p&gt;
&lt;p&gt;Images feed you the picture directly. Text forces you to build it in your head. That participation is something no high-res image can replace. As a bonus, pure-text pages load absurdly fast — even the oldest device handles them fine.&lt;/p&gt;</content:encoded></item><item><title>Web Design Means Getting Out of the Way</title><link>https://blog.040304.xyz/en/posts/web-design/</link><guid isPermaLink="true">https://blog.040304.xyz/en/posts/web-design/</guid><description>The modern web has gotten way too noisy</description><pubDate>Tue, 24 Oct 2023 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Modern websites have become bloated beyond reason.&lt;/p&gt;
&lt;p&gt;Click into a tech blog and you are greeted by a 5MB JavaScript bundle, a cookie consent banner, a newsletter modal, and a slick entry transition.&lt;/p&gt;
&lt;p&gt;Your phone heats up before you even see the first paragraph.&lt;/p&gt;
&lt;h2 id=&quot;the-best-ui-doesnt-compete-for-attention&quot;&gt;The Best UI Doesn’t Compete for Attention&lt;/h2&gt;
&lt;p&gt;The purpose of a website is carrying information, not acting as a developer’s animation playground.&lt;/p&gt;
&lt;p&gt;Brutalism and HTML-first aesthetics are returning because people are exhausted by decorative clutter.&lt;/p&gt;
&lt;p&gt;Clear typographic hierarchy, decent line height, high contrast, and clean HTML do 90% of the design work.&lt;/p&gt;
&lt;h2 id=&quot;doing-less-beats-doing-more&quot;&gt;Doing Less Beats Doing More&lt;/h2&gt;
&lt;p&gt;Ditch the crowded sidebar, ditch the floating widgets, ditch the skeleton screens built just to show off.&lt;/p&gt;
&lt;p&gt;Instant load, readable text, close the tab when done.&lt;/p&gt;
&lt;p&gt;Hitting those three basics puts a site ahead of almost everything modern frontend culture churns out.&lt;/p&gt;</content:encoded></item></channel></rss>