<rss version="2.0">
  <channel>
    <title>Dev Notes on Leon Mika</title>
    <link>https://lmika.org/categories/dev/</link>
    <description></description>
    
    <language>en</language>
    
    <lastBuildDate>Fri, 04 Sep 2026 14:17:28 +1000</lastBuildDate>
    
    <item>
      <title></title>
      <link>https://lmika.org/2026/09/04/small-til-about-zed-if.html</link>
      <pubDate>Fri, 04 Sep 2026 14:17:28 +1000</pubDate>
      
      <guid>http://lmika.micro.blog/2026/09/04/small-til-about-zed-if.html</guid>
      <description>&lt;p&gt;Small TIL about Zed: if you have something selected, and you hold down the Option key, you can spawn a new cursor and selection region. Useful for renaming things that are not identifiers: select one, then Option+Double Click to select other instances, then simply type in the new name.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title></title>
      <link>https://lmika.org/2026/09/03/the-recent-version-of-zed.html</link>
      <pubDate>Thu, 03 Sep 2026 09:52:47 +1000</pubDate>
      
      <guid>http://lmika.micro.blog/2026/09/03/the-recent-version-of-zed.html</guid>
      <description>&lt;p&gt;The recent version of Zed changed the caret movements of &lt;kbd&gt;⌥&lt;/kbd&gt;&lt;kbd&gt;←&lt;/kbd&gt; and &lt;kbd&gt;⌥&lt;/kbd&gt;&lt;kbd&gt;→&lt;/kbd&gt; from one based on word boundaries to one based on &lt;a href=&#34;https://zed.dev/docs/key-bindings#subword-navigation&#34;&gt;sub-word boundaries&lt;/a&gt;, like when a case change occurs. If your caret was on the left of an identifier like &lt;code&gt;MyFancyIdentifier&lt;/code&gt;, when you pressed &lt;kbd&gt;⌥&lt;/kbd&gt;&lt;kbd&gt;→&lt;/kbd&gt;, instead of going to the end of the word, it&amp;rsquo;s moved to the front of &amp;ldquo;Fancy&amp;rdquo; since it detected a case change.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s a style of navigation I don&amp;rsquo;t care for. Fortunately, you can turn it off by opening &lt;code&gt;keymap.json&lt;/code&gt; and adding the following:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-json&#34; data-lang=&#34;json&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;// keymap.json
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;[
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#f92672&#34;&gt;&amp;#34;unbind&amp;#34;&lt;/span&gt;: {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &lt;span style=&#34;color:#75715e&#34;&gt;// -- Snip --
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &lt;span style=&#34;color:#f92672&#34;&gt;&amp;#34;alt-left&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;editor::MoveToPreviousSubwordStart&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &lt;span style=&#34;color:#f92672&#34;&gt;&amp;#34;alt-right&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;editor::MoveToNextSubwordEnd&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &lt;span style=&#34;color:#f92672&#34;&gt;&amp;#34;shift-alt-left&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;editor::SelectToPreviousSubwordStart&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &lt;span style=&#34;color:#f92672&#34;&gt;&amp;#34;shift-alt-right&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;editor::SelectToNextSubwordEnd&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &lt;span style=&#34;color:#75715e&#34;&gt;// -- Snip --
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    }
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  }
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;]
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
    </item>
    
    <item>
      <title></title>
      <link>https://lmika.org/2026/08/31/deploy-a-postgresql-db-migration.html</link>
      <pubDate>Mon, 31 Aug 2026 14:41:55 +1000</pubDate>
      
      <guid>http://lmika.micro.blog/2026/08/31/deploy-a-postgresql-db-migration.html</guid>
      <description>&lt;p&gt;Deployed a PostgreSQL database migration with some new nullable columns:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;ALTER TABLE example ADD COLUMN thing TEXT;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The table has 100,000,000s of rows, so I was expecting the migration to take a few minutes. Instead, it was so fast I thought it wasn&amp;rsquo;t applied at all. PostgreSQL frickin&amp;rsquo; rocks!&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title></title>
      <link>https://lmika.org/2026/08/28/for-anyone-else-using-hugo.html</link>
      <pubDate>Fri, 28 Aug 2026 23:00:07 +1000</pubDate>
      
      <guid>http://lmika.micro.blog/2026/08/28/for-anyone-else-using-hugo.html</guid>
      <description>&lt;p&gt;For anyone else using Hugo that would like to use files in the &lt;code&gt;static&lt;/code&gt; directory as resources, to do things like &lt;a href=&#34;https://gohugo.io/methods/resource/resize/&#34;&gt;produce images thumbnails&lt;/a&gt;, you can &amp;ldquo;mount&amp;rdquo; the static directory within the resource directory using Hugo modules. &lt;a href=&#34;https://me.micahrl.com/til/mount-assets-static/&#34;&gt;This blog post documents how&lt;/a&gt;. Did it myself and it worked a treat.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Working Around One-Shot GPUParticles2D Emitter Slowdown</title>
      <link>https://lmika.org/2026/08/24/working-around-oneshot-gpuparticlesd-emitter.html</link>
      <pubDate>Mon, 24 Aug 2026 22:15:44 +1000</pubDate>
      
      <guid>http://lmika.micro.blog/2026/08/24/working-around-oneshot-gpuparticlesd-emitter.html</guid>
      <description>&lt;p&gt;I&amp;rsquo;ve got a couple of one-shot &lt;code&gt;GPUParticles2D&lt;/code&gt; emitters in my Godot game, and they have a habit of causing slowdown when they&amp;rsquo;re emitted for the first time. For a while I tolerated this, but it&amp;rsquo;s got to the point where gameplay was being affected, and this had to be dealt with.&lt;/p&gt;
&lt;p&gt;I had some success removing that slowdown using a variant of the technique &lt;a href=&#34;https://www.reddit.com/r/godot/comments/1mtsxul/efficiently_using_gpuparticles2d_in_web_export/&#34;&gt;documented here&lt;/a&gt;. Basically, you fire the emitter within the &lt;code&gt;_ready()&lt;/code&gt; function, wait a single frame, then hide the emitter:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-gdscript&#34; data-lang=&#34;gdscript&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;func&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;_ready&lt;/span&gt;():
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    pop_emitter&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;emitting &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;true&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#66d9ef&#34;&gt;await&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;get_tree&lt;/span&gt;()&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;process_frame
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    pop_emitter&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;visible &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;false&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This does mean you&amp;rsquo;ll need to set the emitter visibility to true when you want to fire it for real:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-gdscript&#34; data-lang=&#34;gdscript&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;func&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;emit_for_real&lt;/span&gt;():
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    pop_emitter&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;visible &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;true&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    pop_emitter&lt;span style=&#34;color:#f92672&#34;&gt;.&lt;/span&gt;emitting &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;true&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Based on my experience, the order is pretty important. The emitter needs to be visible while it&amp;rsquo;s emitting in order for the material to load. But it seems like a single frame is enough for that to happen. The technique also works if the emitter is a fair distance from the camera. And in that case, you probably don&amp;rsquo;t need to hide the emitter at all.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title></title>
      <link>https://lmika.org/2026/08/11/had-to-do-some-changes.html</link>
      <pubDate>Tue, 11 Aug 2026 15:01:41 +1000</pubDate>
      
      <guid>http://lmika.micro.blog/2026/08/11/had-to-do-some-changes.html</guid>
      <description>&lt;p&gt;Had to do some changes to NATS streams and consumers today, and learnt a few things from doing so.&lt;/p&gt;
&lt;p&gt;First, it is possible to change the subject filters of a NATS consumer while it&amp;rsquo;s being used. That is, a client could be using it to pull messages, and it doesn&amp;rsquo;t need to reconnect or anything to get the effect of the consumer change. It will continue to receive messages, so long as they match the new subject filter.&lt;/p&gt;
&lt;p&gt;Second, if you&amp;rsquo;re using the NATS CLI to change the filter, in order to specify multiple subject filters, include multiple &lt;code&gt;--filter&lt;/code&gt; switches:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ dc-nats consumer edit &lt;span style=&#34;color:#ae81ff&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        --filter&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;topic.one&amp;#39;&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        --filter&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;topic.two&amp;#39;&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        --filter&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;topic.reset.&amp;gt;&amp;#39;&lt;/span&gt; my-stream my-consumer
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Specifying a single &lt;code&gt;--filter&lt;/code&gt; value with subjects separated by commas will not work. I&amp;rsquo;m not entirely sure what will happen but I suspect that it will create a subject filter that includes the commas in some way.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title></title>
      <link>https://lmika.org/2026/08/05/im-not-sure-if-im.html</link>
      <pubDate>Wed, 05 Aug 2026 21:17:36 +1000</pubDate>
      
      <guid>http://lmika.micro.blog/2026/08/05/im-not-sure-if-im.html</guid>
      <description>&lt;p&gt;I&amp;rsquo;m not sure if I&amp;rsquo;m the only one that experiences this but SSH on MacOS seems to have awful keep-alive out of the box. Connections constantly hang when I look away for more than a few minutes. So I can recommend this change in your SSH config:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# /etc/ssh/ssh_config
Host *
    ServerAliveInterval 30
&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    
    <item>
      <title></title>
      <link>https://lmika.org/2026/07/21/the-stripe-cli-doesnt-have.html</link>
      <pubDate>Tue, 21 Jul 2026 11:26:11 +1000</pubDate>
      
      <guid>http://lmika.micro.blog/2026/07/21/the-stripe-cli-doesnt-have.html</guid>
      <description>&lt;p&gt;The Stripe CLI doesn&amp;rsquo;t have a command for listing account tax IDs, but it&amp;rsquo;s still possible to list them using the &lt;code&gt;get&lt;/code&gt; subcommand. For anyone else that needs it, here&amp;rsquo;s how you can list them:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;stripe get /v1/tax_ids
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;And to get a single tax ID:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;stripe get /v1/tax_ids/txi_abc123
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
    </item>
    
    <item>
      <title></title>
      <link>https://lmika.org/2026/05/14/tial-that-sleep-is-actually.html</link>
      <pubDate>Thu, 14 May 2026 15:10:02 +1000</pubDate>
      
      <guid>http://lmika.micro.blog/2026/05/14/tial-that-sleep-is-actually.html</guid>
      <description>&lt;p&gt;TIAL that &lt;code&gt;sleep&lt;/code&gt; is actually not available on the Distroless Docker images, at least from what I can see from &lt;a href=&#34;https://stackoverflow.com/questions/66579990/how-can-run-sleep-command-to-distroless&#34;&gt;Stack Overflow&lt;/a&gt;. So if you&amp;rsquo;re going to use Pod Lifecycle events to wait for requests to finish up, you&amp;rsquo;ll need some other means of sleeping.&lt;/p&gt;

</description>
    </item>
    
  </channel>
</rss>