<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>Renuo TIL</title>
    <link>https://til.renuo.ch/</link>
    <description>Today I Learned (TIL) posts from Renuo team members. A collection of insights, tips, and lessons learned from our daily work.</description>
    <lastBuildDate>Thu, 23 Jul 2026 22:01:41 +0000</lastBuildDate>
    
      
      <item>
        <title>Daniel Bengl</title>
        <link>https://til.renuo.ch/til/2026/07/21/til-that-a-better-version-of.html</link>
        <guid isPermaLink="true">https://til.renuo.ch/til/2026/07/21/til-that-a-better-version-of.html</guid>
        <pubDate>Tue, 21 Jul 2026 14:38:14 +0000</pubDate>
        <description>TIL that a better version of echo &quot;$GL_PAT&quot; is printenv GL_PAT man7.org/linux/man-pages/man1/printenv.1.html</description>
        <content><p>TIL that a better version of</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>echo "$GL_PAT"
</code></pre></div></div>
<p>is</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>printenv GL_PAT
</code></pre></div></div>
<p><a href="https://man7.org/linux/man-pages/man1/printenv.1.html">man7.org/linux/man-pages/man1/printenv.1.html</a></p>
</content>
      </item>
    
      
      <item>
        <title>Simon Isler</title>
        <link>https://til.renuo.ch/til/2026/06/30/til-about-githubcomapplecontainerhttpsgithubcomappl.html</link>
        <guid isPermaLink="true">https://til.renuo.ch/til/2026/06/30/til-about-githubcomapplecontainerhttpsgithubcomappl.html</guid>
        <pubDate>Tue, 30 Jun 2026 09:16:47 +0000</pubDate>
        <description>TIL about github.com/apple/container</description>
        <content><p>TIL about <a href="https://github.com/apple/container">github.com/apple/container</a></p>
</content>
      </item>
    
      
      <item>
        <title>Samuel Steiner</title>
        <link>https://til.renuo.ch/til/2026/06/25/url-paths-are-case-sensitive-while-wwwzhchzhcorpora.html</link>
        <guid isPermaLink="true">https://til.renuo.ch/til/2026/06/25/url-paths-are-case-sensitive-while-wwwzhchzhcorpora.html</guid>
        <pubDate>Thu, 25 Jun 2026 14:58:10 +0000</pubDate>
        <description>URL paths are case sensitive! While www.zh.ch/ZHCorporateTax is working, www.zh.ch/ZHCorporatetax is not.</description>
        <content><p>URL paths are case sensitive! While <a href="http://www.zh.ch/ZHCorporateTax">www.zh.ch/ZHCorporateTax</a> is working, <a href="http://www.zh.ch/ZHCorporatetax">www.zh.ch/ZHCorporatetax</a> is not.</p>
</content>
      </item>
    
      
      <item>
        <title>Samuel Steiner</title>
        <link>https://til.renuo.ch/til/2026/06/22/das-wort-schischi-ist-nicht-nur-schweizerdeutsch-so.html</link>
        <guid isPermaLink="true">https://til.renuo.ch/til/2026/06/22/das-wort-schischi-ist-nicht-nur-schweizerdeutsch-so.html</guid>
        <pubDate>Mon, 22 Jun 2026 18:38:56 +0000</pubDate>
        <description>Das Wort “Schischi” ist nicht nur Schweizerdeutsch, sondern offizielles Hochdeutsch. Und schreibt sich “Chichi” –&amp;gt; https://www.duden.de/rechtschreibung/Chichi</description>
        <content><p>Das Wort “Schischi” ist nicht nur Schweizerdeutsch, sondern offizielles Hochdeutsch. Und schreibt sich “Chichi” –&gt; <a href="https://www.duden.de/rechtschreibung/Chichi">https://www.duden.de/rechtschreibung/Chichi</a></p>
</content>
      </item>
    
      
      <item>
        <title>Alessandro Rodi</title>
        <link>https://til.renuo.ch/til/2026/06/08/til-about-stoplight-httpsgithubcombolshakovstopligh.html</link>
        <guid isPermaLink="true">https://til.renuo.ch/til/2026/06/08/til-about-stoplight-httpsgithubcombolshakovstopligh.html</guid>
        <pubDate>Mon, 08 Jun 2026 08:18:58 +0000</pubDate>
        <description>TIL about Stoplight: https://github.com/bolshakov/stoplight</description>
        <content><p>TIL about Stoplight: <a href="https://github.com/bolshakov/stoplight">https://github.com/bolshakov/stoplight</a></p>
</content>
      </item>
    
      
      <item>
        <title>Alessandro Rodi</title>
        <link>https://til.renuo.ch/til/2026/06/03/til-about-star-of-laufenburg-httpsyoutubeqcdj6zx290.html</link>
        <guid isPermaLink="true">https://til.renuo.ch/til/2026/06/03/til-about-star-of-laufenburg-httpsyoutubeqcdj6zx290.html</guid>
        <pubDate>Wed, 03 Jun 2026 16:32:26 +0000</pubDate>
        <description>Til about Star of Laufenburg. https://youtu.be/QC-dj6ZX290?is=EzMHEWJ3cl-V9hwB</description>
        <content><p>Til about Star of Laufenburg. <a href="https://youtu.be/QC-dj6ZX290?is=EzMHEWJ3cl-V9hwB">https://youtu.be/QC-dj6ZX290?is=EzMHEWJ3cl-V9hwB</a></p>
</content>
      </item>
    
      
      <item>
        <title>Daniel Bengl</title>
        <link>https://til.renuo.ch/til/2026/04/30/httpsgithubcomdandavisondeltahttpsgithubcomdandavis.html</link>
        <guid isPermaLink="true">https://til.renuo.ch/til/2026/04/30/httpsgithubcomdandavisondeltahttpsgithubcomdandavis.html</guid>
        <pubDate>Thu, 30 Apr 2026 09:59:45 +0000</pubDate>
        <description>https://github.com/dandavison/delta rgp() { # Rip Grep Pretty rg --json -C 2 &quot;$*&quot; | delta }</description>
        <content><p><a href="https://github.com/dandavison/delta">https://github.com/dandavison/delta</a></p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>rgp() { # Rip Grep Pretty
  rg --json -C 2 "$*" | delta
}
</code></pre></div></div>
</content>
      </item>
    
      
      <item>
        <title>Lukas Bischof</title>
        <link>https://til.renuo.ch/til/2026/04/29/til-again-that-rails-console-sandbox-existed.html</link>
        <guid isPermaLink="true">https://til.renuo.ch/til/2026/04/29/til-again-that-rails-console-sandbox-existed.html</guid>
        <pubDate>Wed, 29 Apr 2026 09:23:32 +0000</pubDate>
        <description>TIL again that rails console --sandbox existed</description>
        <content><p>TIL again that <code class="language-plaintext highlighter-rouge">rails console --sandbox</code> existed</p>
</content>
      </item>
    
      
      <item>
        <title>Alessandro Rodi</title>
        <link>https://til.renuo.ch/til/2026/04/22/theres-a-very-cool-bi-tool-available-as-rails-engin.html</link>
        <guid isPermaLink="true">https://til.renuo.ch/til/2026/04/22/theres-a-very-cool-bi-tool-available-as-rails-engin.html</guid>
        <pubDate>Wed, 22 Apr 2026 09:14:37 +0000</pubDate>
        <description>There’s a very cool BI Tool available as Rails Engine: https://github.com/motor-admin/motor-admin-rails</description>
        <content><p>There’s a very cool BI Tool available as Rails Engine: <a href="https://github.com/motor-admin/motor-admin-rails">https://github.com/motor-admin/motor-admin-rails</a></p>
</content>
      </item>
    
      
      <item>
        <title>Raphael Nestler</title>
        <link>https://til.renuo.ch/til/2026/04/16/til-that-nonosh-injects-a-hook-into-claude-code-to.html</link>
        <guid isPermaLink="true">https://til.renuo.ch/til/2026/04/16/til-that-nonosh-injects-a-hook-into-claude-code-to.html</guid>
        <pubDate>Thu, 16 Apr 2026 11:00:30 +0000</pubDate>
        <description>TIL that nono.sh injects a hook into claude code to tell it when it hit a security boundary: https://nono.sh/docs/cli/clients/claude-code#automatic-hook-integration</description>
        <content><p>TIL that nono.sh injects a hook into claude code to tell it when it hit a security boundary: <a href="https://nono.sh/docs/cli/clients/claude-code#automatic-hook-integration">https://nono.sh/docs/cli/clients/claude-code#automatic-hook-integration</a></p>
</content>
      </item>
    
      
      <item>
        <title>Alessandro Rodi</title>
        <link>https://til.renuo.ch/til/2026/04/15/i-can-generate-readonly-credentials-for-a-database.html</link>
        <guid isPermaLink="true">https://til.renuo.ch/til/2026/04/15/i-can-generate-readonly-credentials-for-a-database.html</guid>
        <pubDate>Wed, 15 Apr 2026 06:46:58 +0000</pubDate>
        <description>I can generate read-only credentials for a database on heroku, so I can give them to claude and ask for an analysis without worrying it might delete stuff. https://devcenter.heroku.com/articles/heroku-postgresql-credentials#managing-permissions</description>
        <content><p>I can generate read-only credentials for a database on heroku, so I can give them to claude and ask for an analysis without worrying it might delete stuff.
<a href="https://devcenter.heroku.com/articles/heroku-postgresql-credentials#managing-permissions">https://devcenter.heroku.com/articles/heroku-postgresql-credentials#managing-permissions</a></p>
</content>
      </item>
    
      
      <item>
        <title>Raphael Nestler</title>
        <link>https://til.renuo.ch/til/2026/03/26/til-that-the-plural-of-goose-is-geese.html</link>
        <guid isPermaLink="true">https://til.renuo.ch/til/2026/03/26/til-that-the-plural-of-goose-is-geese.html</guid>
        <pubDate>Thu, 26 Mar 2026 16:36:09 +0000</pubDate>
        <description>TIL that the plural of goose is geese</description>
        <content><p>TIL that the plural of goose is geese</p>
</content>
      </item>
    
      
      <item>
        <title>Alessandro Rodi</title>
        <link>https://til.renuo.ch/til/2026/03/25/reverse-dns-record-is-a-thing-ptr-record.html</link>
        <guid isPermaLink="true">https://til.renuo.ch/til/2026/03/25/reverse-dns-record-is-a-thing-ptr-record.html</guid>
        <pubDate>Wed, 25 Mar 2026 12:36:12 +0000</pubDate>
        <description>Reverse DNS record is a thing (PTR record): Normal (forward) DNS translates a name -&amp;gt; IP mail.renuo.ch → 85.195.10.42 Reverse DNS (PTR record) does the opposite — it translates an IP -&amp;gt; name: 85.195.10.42 → mail.renuo.ch When a server sends an email, the receiving mail server does a quick background check: It connects and says “Hi, I’m *mail.renuo.ch”* The receiver looks at your connecting IP It does a reverse DNS lookup: “Who owns this IP?” If the answer matches what you claimed — mail.renuo.ch –&amp;gt; all good If there’s no PTR record –&amp;gt; spam signal It’s essentially a way for receivers to verify: “Does this IP actually belong to who they claim to be?” only the owner of the IP address can set these.</description>
        <content><p>Reverse DNS record is a thing (PTR record):</p>

<p>Normal (forward) DNS translates a <strong>name -&gt; IP</strong></p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>mail.renuo.ch  →  85.195.10.42
</code></pre></div></div>
<p>Reverse DNS (PTR record) does the opposite — it translates an <strong>IP -&gt; name</strong>:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>85.195.10.42  →  mail.renuo.ch
</code></pre></div></div>
<p>When a server sends an email, the receiving mail server does a quick background check:</p>
<ul>
  <li>It connects and says <em>“Hi, I’m *<a href="http://mail.renuo.ch">mail.renuo.ch</a></em>”*</li>
  <li>The receiver looks at your connecting IP</li>
  <li>It does a reverse DNS lookup: <em>“Who owns this IP?”</em></li>
  <li>If the answer matches what you claimed — <a href="http://mail.renuo.ch">mail.renuo.ch</a> –&gt; all good</li>
  <li>If there’s no PTR record –&gt; spam signal
It’s essentially a way for receivers to verify: <em>“Does this IP actually belong to who they claim to be?”</em></li>
</ul>

<p>only the <strong>owner of the IP address</strong> can set these.</p>
</content>
      </item>
    
      
      <item>
        <title>Alessandro Rodi</title>
        <link>https://til.renuo.ch/til/2026/03/20/til-about-httpsgithubcomsue445rspectempdirhttpsgith.html</link>
        <guid isPermaLink="true">https://til.renuo.ch/til/2026/03/20/til-about-httpsgithubcomsue445rspectempdirhttpsgith.html</guid>
        <pubDate>Fri, 20 Mar 2026 14:03:03 +0000</pubDate>
        <description>TIL about https://github.com/sue445/rspec-temp_dir</description>
        <content><p>TIL about <a href="https://github.com/sue445/rspec-temp_dir">https://github.com/sue445/rspec-temp_dir</a></p>
</content>
      </item>
    
      
      <item>
        <title>Julian Duss</title>
        <link>https://til.renuo.ch/til/2026/03/08/til-about-the-simpleformat-method-in-rails-httpsapi.html</link>
        <guid isPermaLink="true">https://til.renuo.ch/til/2026/03/08/til-about-the-simpleformat-method-in-rails-httpsapi.html</guid>
        <pubDate>Sun, 08 Mar 2026 08:48:40 +0000</pubDate>
        <description>TIL about the simple_format method in Rails: https://api.rubyonrails.org/v8.0/classes/ActionView/Helpers/TextHelper.html</description>
        <content><p>TIL about the <code class="language-plaintext highlighter-rouge">simple_format</code> method in Rails: <a href="https://api.rubyonrails.org/v8.0/classes/ActionView/Helpers/TextHelper.html">https://api.rubyonrails.org/v8.0/classes/ActionView/Helpers/TextHelper.html</a></p>
</content>
      </item>
    
      
      <item>
        <title>Chris Hunziker</title>
        <link>https://til.renuo.ch/til/2026/03/06/til-about-the-four-types-of-documentationhttpsdocsd.html</link>
        <guid isPermaLink="true">https://til.renuo.ch/til/2026/03/06/til-about-the-four-types-of-documentationhttpsdocsd.html</guid>
        <pubDate>Fri, 06 Mar 2026 18:10:39 +0000</pubDate>
        <description>TIL about the four types of documentation</description>
        <content><p>TIL about the <a href="https://docs.divio.com/documentation-system/">four types of documentation</a></p>
</content>
      </item>
    
      
      <item>
        <title>Alessandro Rodi</title>
        <link>https://til.renuo.ch/til/2026/03/05/til-about-satisfy-in-rspec-httpsrspecinfofeatures31.html</link>
        <guid isPermaLink="true">https://til.renuo.ch/til/2026/03/05/til-about-satisfy-in-rspec-httpsrspecinfofeatures31.html</guid>
        <pubDate>Thu, 05 Mar 2026 15:34:48 +0000</pubDate>
        <description>TIL about satisfy in RSpec. https://rspec.info/features/3-13/rspec-expectations/built-in-matchers/satisfy/</description>
        <content><p>TIL about <code class="language-plaintext highlighter-rouge">satisfy</code> in RSpec. <a href="https://rspec.info/features/3-13/rspec-expectations/built-in-matchers/satisfy/">https://rspec.info/features/3-13/rspec-expectations/built-in-matchers/satisfy/</a></p>
</content>
      </item>
    
      
      <item>
        <title>Daniel Bengl</title>
        <link>https://til.renuo.ch/til/2026/02/24/til-that-true-and-false-dont-exist-in-standard-c-ve.html</link>
        <guid isPermaLink="true">https://til.renuo.ch/til/2026/02/24/til-that-true-and-false-dont-exist-in-standard-c-ve.html</guid>
        <pubDate>Tue, 24 Feb 2026 16:03:39 +0000</pubDate>
        <description>TIL that true and false don’t exist in standard C version: gcc ./foo.c -o c &amp;amp;&amp;amp; ./c ./foo.c:18:9: error: use of undeclared identifier &apos;true&apos; 18 | while(true) { | ^ 1 error generated. The values true and false can be imported by the stdbool library. Which declares them as integers: // ... #define true 1 #define false 0 // ... Any non-zero value gets interpreted as True. These are the small things that make me appreciate :ruby: and other high level languages.</description>
        <content><p>TIL that <code class="language-plaintext highlighter-rouge">true</code> and <code class="language-plaintext highlighter-rouge">false</code> don’t exist in standard C version:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>gcc ./foo.c -o c &amp;&amp; ./c
./foo.c:18:9: error: use of undeclared identifier 'true'
   18 |   while(true) {
      |         ^
1 error generated.
</code></pre></div></div>
<p>The values  <code class="language-plaintext highlighter-rouge">true</code> and <code class="language-plaintext highlighter-rouge">false</code> can be imported by the <a href="https://github.com/gcc-mirror/gcc/blob/master/gcc/ginclude/stdbool.h">stdbool</a> library. Which declares them as integers:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>// ...
#define true	1
#define false	0
// ...
</code></pre></div></div>
<p>Any non-zero value gets interpreted as True.</p>

<p>These are the small things that make me appreciate :ruby: and other high level languages.</p>
</content>
      </item>
    
      
      <item>
        <title>Daniel Bengl</title>
        <link>https://til.renuo.ch/til/2026/02/11/today-while-debugging-tag-concatination-i-learned-t.html</link>
        <guid isPermaLink="true">https://til.renuo.ch/til/2026/02/11/today-while-debugging-tag-concatination-i-learned-t.html</guid>
        <pubDate>Wed, 11 Feb 2026 10:16:27 +0000</pubDate>
        <description>Today (while debugging tag concatination) I learned that you can create mutable Strings in Ruby using +&quot;foo&quot; and immutable Strings using -&quot;foo&quot; https://docs.ruby-lang.org/en/4.0/String.html#method-i-2B This one concatinates label(...) + content_tag(...) This one returns just a mutable variant of the content tag: label(...) + content_tag(...) I expected + content_tag(...) to raise. Thanks for :duck: @Lukas Bischof</description>
        <content><p>Today (while debugging tag concatination) I learned that you can create mutable Strings in Ruby using <code class="language-plaintext highlighter-rouge">+"foo"</code> and immutable Strings using <code class="language-plaintext highlighter-rouge">-"foo"</code>
<a href="https://docs.ruby-lang.org/en/4.0/String.html#method-i-2B">https://docs.ruby-lang.org/en/4.0/String.html#method-i-2B</a></p>

<ol>
  <li>This one concatinates</li>
</ol>

<div class="language-rb highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">label</span><span class="p">(</span><span class="o">...</span><span class="p">)</span> <span class="o">+</span> <span class="n">content_tag</span><span class="p">(</span><span class="o">...</span><span class="p">)</span>
</code></pre></div></div>

<ul>
  <li>This one returns just a mutable variant of the content tag:</li>
</ul>

<div class="language-rb highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">label</span><span class="p">(</span><span class="o">...</span><span class="p">)</span>
<span class="o">+</span> <span class="n">content_tag</span><span class="p">(</span><span class="o">...</span><span class="p">)</span>
</code></pre></div></div>

<p>I expected <code class="language-plaintext highlighter-rouge">+ content_tag(...)</code> to raise.
Thanks for :duck: <a href="https://renuo.ch/team/lukas-bischof">@Lukas Bischof</a></p>
</content>
      </item>
    
      
      <item>
        <title>Daniel Bengl</title>
        <link>https://til.renuo.ch/til/2026/01/31/til-that-rust-doesnt-support-traditional-parameter.html</link>
        <guid isPermaLink="true">https://til.renuo.ch/til/2026/01/31/til-that-rust-doesnt-support-traditional-parameter.html</guid>
        <pubDate>Sat, 31 Jan 2026 23:53:45 +0000</pubDate>
        <description>TIL that Rust doesn’t support traditional parameter overloading but you can still achieve it by implementing generic traits This doesn’t compile: impl Noise { pub fn new(seed: u32) -&amp;gt; Self { Self { seed, perlin: Perlin::new(seed), } } pub fn get(&amp;amp;self, position: DVec3) -&amp;gt; f64 { self.perlin.get(position.to_array()) } pub fn get(&amp;amp;self, position: DVec2) -&amp;gt; f64 { self.perlin.get(position.to_array()) } } This does: pub trait NoiseSample&amp;lt;T&amp;gt; { fn get(&amp;amp;self, position: T) -&amp;gt; f64; } impl Noise { pub fn new(seed: u32) -&amp;gt; Self { Self { seed, perlin: Perlin::new(seed), } } } impl NoiseSample&amp;lt;DVec3&amp;gt; for Noise { fn get(&amp;amp;self, position: DVec3) -&amp;gt; f64 { self.perlin.get(position.to_array()) } } impl NoiseSample&amp;lt;DVec2&amp;gt; for Noise { fn get(&amp;amp;self, position: DVec2) -&amp;gt; f64 { self.perlin.get(position.to_array()) } } Would probably be less boilerplate if the library I am using here accepted structs instead of fixed length arrays.</description>
        <content><p>TIL that Rust doesn’t support traditional parameter overloading but you can still achieve it by implementing generic traits</p>

<p>This doesn’t compile:</p>

<div class="language-rs highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">impl</span> <span class="n">Noise</span> <span class="p">{</span>
    <span class="k">pub</span> <span class="k">fn</span> <span class="nf">new</span><span class="p">(</span><span class="n">seed</span><span class="p">:</span> <span class="nb">u32</span><span class="p">)</span> <span class="k">-&gt;</span> <span class="k">Self</span> <span class="p">{</span>
        <span class="k">Self</span> <span class="p">{</span>
            <span class="n">seed</span><span class="p">,</span>
            <span class="n">perlin</span><span class="p">:</span> <span class="nn">Perlin</span><span class="p">::</span><span class="nf">new</span><span class="p">(</span><span class="n">seed</span><span class="p">),</span>
        <span class="p">}</span>
    <span class="p">}</span>

    <span class="k">pub</span> <span class="k">fn</span> <span class="nf">get</span><span class="p">(</span><span class="o">&amp;</span><span class="k">self</span><span class="p">,</span> <span class="n">position</span><span class="p">:</span> <span class="n">DVec3</span><span class="p">)</span> <span class="k">-&gt;</span> <span class="nb">f64</span> <span class="p">{</span>
        <span class="k">self</span><span class="py">.perlin</span><span class="nf">.get</span><span class="p">(</span><span class="n">position</span><span class="nf">.to_array</span><span class="p">())</span>
    <span class="p">}</span>

    <span class="k">pub</span> <span class="k">fn</span> <span class="nf">get</span><span class="p">(</span><span class="o">&amp;</span><span class="k">self</span><span class="p">,</span> <span class="n">position</span><span class="p">:</span> <span class="n">DVec2</span><span class="p">)</span> <span class="k">-&gt;</span> <span class="nb">f64</span> <span class="p">{</span>
        <span class="k">self</span><span class="py">.perlin</span><span class="nf">.get</span><span class="p">(</span><span class="n">position</span><span class="nf">.to_array</span><span class="p">())</span>
    <span class="p">}</span>
<span class="p">}</span>
</code></pre></div></div>

<p>This does:</p>

<div class="language-rs highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">pub</span> <span class="k">trait</span> <span class="n">NoiseSample</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span> <span class="p">{</span>
    <span class="k">fn</span> <span class="nf">get</span><span class="p">(</span><span class="o">&amp;</span><span class="k">self</span><span class="p">,</span> <span class="n">position</span><span class="p">:</span> <span class="n">T</span><span class="p">)</span> <span class="k">-&gt;</span> <span class="nb">f64</span><span class="p">;</span>
<span class="p">}</span>

<span class="k">impl</span> <span class="n">Noise</span> <span class="p">{</span>
    <span class="k">pub</span> <span class="k">fn</span> <span class="nf">new</span><span class="p">(</span><span class="n">seed</span><span class="p">:</span> <span class="nb">u32</span><span class="p">)</span> <span class="k">-&gt;</span> <span class="k">Self</span> <span class="p">{</span>
        <span class="k">Self</span> <span class="p">{</span>
            <span class="n">seed</span><span class="p">,</span>
            <span class="n">perlin</span><span class="p">:</span> <span class="nn">Perlin</span><span class="p">::</span><span class="nf">new</span><span class="p">(</span><span class="n">seed</span><span class="p">),</span>
        <span class="p">}</span>
    <span class="p">}</span>
<span class="p">}</span>

<span class="k">impl</span> <span class="n">NoiseSample</span><span class="o">&lt;</span><span class="n">DVec3</span><span class="o">&gt;</span> <span class="k">for</span> <span class="n">Noise</span> <span class="p">{</span>
    <span class="k">fn</span> <span class="nf">get</span><span class="p">(</span><span class="o">&amp;</span><span class="k">self</span><span class="p">,</span> <span class="n">position</span><span class="p">:</span> <span class="n">DVec3</span><span class="p">)</span> <span class="k">-&gt;</span> <span class="nb">f64</span> <span class="p">{</span>
        <span class="k">self</span><span class="py">.perlin</span><span class="nf">.get</span><span class="p">(</span><span class="n">position</span><span class="nf">.to_array</span><span class="p">())</span>
    <span class="p">}</span>
<span class="p">}</span>

<span class="k">impl</span> <span class="n">NoiseSample</span><span class="o">&lt;</span><span class="n">DVec2</span><span class="o">&gt;</span> <span class="k">for</span> <span class="n">Noise</span> <span class="p">{</span>
    <span class="k">fn</span> <span class="nf">get</span><span class="p">(</span><span class="o">&amp;</span><span class="k">self</span><span class="p">,</span> <span class="n">position</span><span class="p">:</span> <span class="n">DVec2</span><span class="p">)</span> <span class="k">-&gt;</span> <span class="nb">f64</span> <span class="p">{</span>
        <span class="k">self</span><span class="py">.perlin</span><span class="nf">.get</span><span class="p">(</span><span class="n">position</span><span class="nf">.to_array</span><span class="p">())</span>
    <span class="p">}</span>
<span class="p">}</span>
</code></pre></div></div>

<p>Would probably be less boilerplate if the library I am using here accepted structs instead of fixed length arrays.</p>
</content>
      </item>
    
      
      <item>
        <title>Daniel Bengl</title>
        <link>https://til.renuo.ch/til/2026/01/29/til-that-fzf-comes-with-vim-plugin.html</link>
        <guid isPermaLink="true">https://til.renuo.ch/til/2026/01/29/til-that-fzf-comes-with-vim-plugin.html</guid>
        <pubDate>Thu, 29 Jan 2026 19:10:32 +0000</pubDate>
        <description>TIL that fzf comes with vim plugin: brew install fzf vim.opt.runtimepath:append(&quot;/opt/homebrew/opt/fzf&quot;) Open fuzzy search popup in NVIM with current dir: :FZF</description>
        <content><p>TIL that <code class="language-plaintext highlighter-rouge">fzf</code> comes with vim plugin:</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>brew <span class="nb">install </span>fzf
</code></pre></div></div>

<div class="language-lua highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">vim</span><span class="p">.</span><span class="n">opt</span><span class="p">.</span><span class="n">runtimepath</span><span class="p">:</span><span class="n">append</span><span class="p">(</span><span class="s2">"/opt/homebrew/opt/fzf"</span><span class="p">)</span>
</code></pre></div></div>

<p>Open fuzzy search popup in NVIM with current dir:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>:FZF
</code></pre></div></div>
</content>
      </item>
    
      
      <item>
        <title>Alessandro Rodi</title>
        <link>https://til.renuo.ch/til/2026/01/22/til-that-these-two-exist.html</link>
        <guid isPermaLink="true">https://til.renuo.ch/til/2026/01/22/til-that-these-two-exist.html</guid>
        <pubDate>Thu, 22 Jan 2026 12:54:51 +0000</pubDate>
        <description>TIL that these two exist: https://charm-ruby.dev/ https://www.ratatui-ruby.dev/</description>
        <content><p>TIL that these two exist:</p>
<ul>
  <li><a href="https://charm-ruby.dev/">https://charm-ruby.dev/</a></li>
  <li><a href="https://www.ratatui-ruby.dev/">https://www.ratatui-ruby.dev/</a></li>
</ul>
</content>
      </item>
    
      
      <item>
        <title>Daniel Bengl</title>
        <link>https://til.renuo.ch/til/2026/01/04/today-when-implementing-quicksort-in-ruby-i-learned.html</link>
        <guid isPermaLink="true">https://til.renuo.ch/til/2026/01/04/today-when-implementing-quicksort-in-ruby-i-learned.html</guid>
        <pubDate>Sun, 04 Jan 2026 23:22:01 +0000</pubDate>
        <description>Today when implementing Quick-Sort in Ruby I learned about the block parameter shorthand _N. v is the 1st argument so it can be refactored as follows: - l_part = a.filter { |v| v &amp;lt;= p } + l_part = a.filter { _1 &amp;lt;= p }</description>
        <content><p>Today when implementing Quick-Sort in Ruby I learned about the block parameter shorthand <code class="language-plaintext highlighter-rouge">_N</code>.
<code class="language-plaintext highlighter-rouge">v</code> is the <code class="language-plaintext highlighter-rouge">1</code>st argument so it can be refactored as follows:</p>

<div class="language-diff highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="gd">- l_part = a.filter { |v| v &lt;= p }
</span><span class="gi">+ l_part = a.filter { _1 &lt;= p }
</span></code></pre></div></div>
</content>
      </item>
    
      
      <item>
        <title>Daniel Bengl</title>
        <link>https://til.renuo.ch/til/2025/12/28/vim.html</link>
        <guid isPermaLink="true">https://til.renuo.ch/til/2025/12/28/vim.html</guid>
        <pubDate>Sun, 28 Dec 2025 00:03:51 +0000</pubDate>
        <description>:vim: j0w→+</description>
        <content><p>:vim:
<code class="language-plaintext highlighter-rouge">j0w</code>→<code class="language-plaintext highlighter-rouge">+</code></p>
</content>
      </item>
    
      
      <item>
        <title>Lukas Bischof</title>
        <link>https://til.renuo.ch/til/2025/12/27/til-about-throwaway-worktrees-git-worktree-add-d-pa.html</link>
        <guid isPermaLink="true">https://til.renuo.ch/til/2025/12/27/til-about-throwaway-worktrees-git-worktree-add-d-pa.html</guid>
        <pubDate>Sat, 27 Dec 2025 12:02:39 +0000</pubDate>
        <description>TIL about throwaway worktrees: git worktree add -d **&amp;lt;path&amp;gt;**** **which creates a new worktree with a detached HEAD at the same commit as the current branch</description>
        <content><p>TIL about throwaway worktrees: <code class="language-plaintext highlighter-rouge">git worktree add -d </code><code class="language-plaintext highlighter-rouge">**&lt;path&gt;**</code>** **which creates a new worktree with a detached HEAD at the same commit as the current branch</p>
</content>
      </item>
    
      
      <item>
        <title>Daniel Bengl</title>
        <link>https://til.renuo.ch/til/2025/12/23/til-that-you-can-exit-vim-using-zz.html</link>
        <guid isPermaLink="true">https://til.renuo.ch/til/2025/12/23/til-that-you-can-exit-vim-using-zz.html</guid>
        <pubDate>Tue, 23 Dec 2025 10:46:49 +0000</pubDate>
        <description>TIL that you can exit VIM using ZZ</description>
        <content><p>TIL that you can exit VIM using <code class="language-plaintext highlighter-rouge">ZZ</code></p>
</content>
      </item>
    
      
      <item>
        <title>Daniel Bengl</title>
        <link>https://til.renuo.ch/til/2025/12/20/til-about-repeatedpermutation.html</link>
        <guid isPermaLink="true">https://til.renuo.ch/til/2025/12/20/til-about-repeatedpermutation.html</guid>
        <pubDate>Sat, 20 Dec 2025 06:47:30 +0000</pubDate>
        <description>TIL about repeated_permutation: The “Old” Nested Way: (0..31).each do |x| (0..31).each do |y| (0..31).each do |z| # Runs 32,768 times puts &quot;Coordinate: #{x}, #{y}, #{z}&quot; end end end The “New” DRY Way: (0..31).to_a.repeated_permutation(3) do |x, y, z| # This automatically nests 3 levels deep # Runs 32^3 times puts &quot;Coordinate: #{x}, #{y}, #{z}&quot; end (Edit: formatting)</description>
        <content><p>TIL about <code class="language-plaintext highlighter-rouge">repeated_permutation</code>:</p>

<p><strong>The “Old” Nested Way:</strong></p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>(0..31).each do |x|
  (0..31).each do |y|
    (0..31).each do |z|
      # Runs 32,768 times
      puts "Coordinate: #{x}, #{y}, #{z}"
    end
  end
end
</code></pre></div></div>

<p><strong>The “New” DRY Way:</strong></p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>(0..31).to_a.repeated_permutation(3) do |x, y, z|
  # This automatically nests 3 levels deep
  # Runs 32^3 times
  puts "Coordinate: #{x}, #{y}, #{z}"
end
</code></pre></div></div>

<p>(Edit: formatting)</p>
</content>
      </item>
    
      
      <item>
        <title>Daniel Bengl</title>
        <link>https://til.renuo.ch/til/2025/12/19/til-about-datethen-in-ruby.html</link>
        <guid isPermaLink="true">https://til.renuo.ch/til/2025/12/19/til-about-datethen-in-ruby.html</guid>
        <pubDate>Fri, 19 Dec 2025 16:52:12 +0000</pubDate>
        <description>TIL about date.then in Ruby my_object.date&amp;amp;.then { |d| I18n.l(d) } As an alternative to: I18n.l(my_object.date) if my_object.date.present? Example: my_object.date = nil my_object.date&amp;amp;.then { |d| I18n.l(d) } || &quot;-&quot; # =&amp;gt; &quot;-&quot; my_object.date = 1.day.ago # =&amp;gt; 2025-12-18 17:47:17.694132000 CET +01:00 my_object.date&amp;amp;.then { |d| I18n.l(d) } || &quot;-&quot; # =&amp;gt; &quot;Thu, 18 Dec 2025 17:47:17 +0100&quot; vs: my_object.date = nil my_object.date.present? ? I18n.l(my_object.date) : &quot;-&quot; # =&amp;gt; &quot;-&quot; my_object.date = 1.day.ago # =&amp;gt; 2025-12-18 17:47:17.694132000 CET +01:00 my_object.date.present? ? I18n.l(my_object.date) : &quot;-&quot; # =&amp;gt; &quot;Thu, 18 Dec 2025 17:47:17 +0100&quot;</description>
        <content><p>TIL about <code class="language-plaintext highlighter-rouge">date.then</code> in Ruby</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>my_object.date&amp;.then { |d| I18n.l(d) }
</code></pre></div></div>
<p>As an alternative to:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>I18n.l(my_object.date) if my_object.date.present?
</code></pre></div></div>

<p>Example:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>my_object.date = nil
my_object.date&amp;.then { |d| I18n.l(d) } || "-" # =&gt; "-"
my_object.date = 1.day.ago # =&gt; 2025-12-18 17:47:17.694132000 CET +01:00
my_object.date&amp;.then { |d| I18n.l(d) } || "-" # =&gt; "Thu, 18 Dec 2025 17:47:17 +0100"
</code></pre></div></div>
<p>vs:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>my_object.date = nil
my_object.date.present? ? I18n.l(my_object.date) : "-" # =&gt; "-"
my_object.date = 1.day.ago # =&gt; 2025-12-18 17:47:17.694132000 CET +01:00
my_object.date.present? ? I18n.l(my_object.date) : "-" # =&gt; "Thu, 18 Dec 2025 17:47:17 +0100"
</code></pre></div></div>
</content>
      </item>
    
      
      <item>
        <title>Alessandro Rodi</title>
        <link>https://til.renuo.ch/til/2025/12/15/colormix-so-i-can-change-the-transparency-of-my-col.html</link>
        <guid isPermaLink="true">https://til.renuo.ch/til/2025/12/15/colormix-so-i-can-change-the-transparency-of-my-col.html</guid>
        <pubDate>Mon, 15 Dec 2025 21:15:13 +0000</pubDate>
        <description>color-mix! So I can change the transparency of my color defined in a CSS variable. https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Values/color_value/color-mix background: color-mix(in srgb, var(--color-brown) 70%, transparent);</description>
        <content><p>color-mix! So I can change the transparency of my color defined in a CSS variable.
<a href="https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Values/color_value/color-mix">https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Values/color_value/color-mix</a></p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>background: color-mix(in srgb, var(--color-brown) 70%, transparent);
</code></pre></div></div>
</content>
      </item>
    
      
      <item>
        <title>Alessandro Rodi</title>
        <link>https://til.renuo.ch/til/2025/12/11/til-that-all-requests-in-a-controller-go-through-a.html</link>
        <guid isPermaLink="true">https://til.renuo.ch/til/2025/12/11/til-that-all-requests-in-a-controller-go-through-a.html</guid>
        <pubDate>Thu, 11 Dec 2025 19:34:51 +0000</pubDate>
        <description>TIL that all requests in a controller go through a process method: https://github.com/rails/rails/blob/90a1eaa1b30ba1f2d524e197460e549c03cf5698/actionpack/lib/abstract_controller/base.rb#L145 def process(action, ...) @_action_name = action.to_s unless action_name = _find_action_name(@_action_name) raise ActionNotFound.new(&quot;The action &apos;#{action}&apos; could not be found for #{self.class.name}&quot;, self, action) end @_response_body = nil process_action(action_name, ...) end</description>
        <content><p>TIL that all requests in a controller go through a <code class="language-plaintext highlighter-rouge">process</code> method: <a href="https://github.com/rails/rails/blob/90a1eaa1b30ba1f2d524e197460e549c03cf5698/actionpack/lib/abstract_controller/base.rb#L145">https://github.com/rails/rails/blob/90a1eaa1b30ba1f2d524e197460e549c03cf5698/actionpack/lib/abstract_controller/base.rb#L145</a></p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code> def process(action, ...)
      @_action_name = action.to_s

      unless action_name = _find_action_name(@_action_name)
        raise ActionNotFound.new("The action '#{action}' could not be found for #{self.class.name}", self, action)
      end

      @_response_body = nil

      process_action(action_name, ...)
 end
</code></pre></div></div>
</content>
      </item>
    
      
      <item>
        <title>Josua Schmid</title>
        <link>https://til.renuo.ch/til/2025/12/10/there-is-a-nice-test-helper-which-alessandro-rodiht.html</link>
        <guid isPermaLink="true">https://til.renuo.ch/til/2025/12/10/there-is-a-nice-test-helper-which-alessandro-rodiht.html</guid>
        <pubDate>Wed, 10 Dec 2025 09:12:18 +0000</pubDate>
        <description>There is a nice test helper which @Alessandro Rodi made in 2017: module InjectSession include Warden::Test::Helpers def inject_session(hash) Warden.on_next_request do |proxy| hash.each do |key, value| proxy.raw_session[key] = value end end end end</description>
        <content><p>There is a nice test helper which <a href="https://renuo.ch/team/alessandro-rodi">@Alessandro Rodi</a> made in 2017:</p>

<div class="language-ruby highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">module</span> <span class="nn">InjectSession</span>
  <span class="kp">include</span> <span class="no">Warden</span><span class="o">::</span><span class="no">Test</span><span class="o">::</span><span class="no">Helpers</span>

  <span class="k">def</span> <span class="nf">inject_session</span><span class="p">(</span><span class="nb">hash</span><span class="p">)</span>
    <span class="no">Warden</span><span class="p">.</span><span class="nf">on_next_request</span> <span class="k">do</span> <span class="o">|</span><span class="n">proxy</span><span class="o">|</span>
      <span class="nb">hash</span><span class="p">.</span><span class="nf">each</span> <span class="k">do</span> <span class="o">|</span><span class="n">key</span><span class="p">,</span> <span class="n">value</span><span class="o">|</span>
        <span class="n">proxy</span><span class="p">.</span><span class="nf">raw_session</span><span class="p">[</span><span class="n">key</span><span class="p">]</span> <span class="o">=</span> <span class="n">value</span>
      <span class="k">end</span>
    <span class="k">end</span>
  <span class="k">end</span>
<span class="k">end</span>
</code></pre></div></div>
</content>
      </item>
    
      
      <item>
        <title>Simon Isler</title>
        <link>https://til.renuo.ch/til/2025/12/09/til-about-the-activestorage-mirror-service-httpsgui.html</link>
        <guid isPermaLink="true">https://til.renuo.ch/til/2025/12/09/til-about-the-activestorage-mirror-service-httpsgui.html</guid>
        <pubDate>Tue, 09 Dec 2025 10:46:35 +0000</pubDate>
        <description>TIL about the ActiveStorage Mirror Service: https://guides.rubyonrails.org/active_storage_overview.html#mirror-service to migrate assets like https://eidel.io/rails-how-to-migrate-s3-providers-via-activestorage-mirroring/</description>
        <content><p>TIL about the ActiveStorage Mirror Service: <a href="https://guides.rubyonrails.org/active_storage_overview.html#mirror-service">https://guides.rubyonrails.org/active_storage_overview.html#mirror-service</a> to migrate assets like <a href="https://eidel.io/rails-how-to-migrate-s3-providers-via-activestorage-mirroring/">https://eidel.io/rails-how-to-migrate-s3-providers-via-activestorage-mirroring/</a></p>
</content>
      </item>
    
      
      <item>
        <title>Daniel Bengl</title>
        <link>https://til.renuo.ch/til/2025/12/08/til-that-in-vim-you-can-pass-a-buffer-to-a-command.html</link>
        <guid isPermaLink="true">https://til.renuo.ch/til/2025/12/08/til-that-in-vim-you-can-pass-a-buffer-to-a-command.html</guid>
        <pubDate>Mon, 08 Dec 2025 13:15:41 +0000</pubDate>
        <description>TIL that in VIM you can pass a buffer to a command and have it replace said buffer. For example in a db/schema.rb file you could look for all table definitions as follows: :%!rg &apos;create_table&apos; This passes the contents of the current buffer % to the command rg with the argument &apos;create_table&apos; whose output is piped back to a buffer. So after entering that command you’d only have lines left containing create_table. An additional utility I learned about in this context is tac $ tac --help Usage: tac [OPTION]... [FILE]... Write each FILE to standard output, last line first. With no FILE, or when FILE is -, read standard input. This way you can reverse lines in your buffer using :%!tac current buffer %, ! indicates command, tac is the command being run on the contents of the buffer.</description>
        <content><p>TIL that in <strong>VIM</strong> you can pass a buffer to a command and have it replace said buffer.</p>

<p>For example in a <code class="language-plaintext highlighter-rouge">db/schema.rb</code> file you could look for all table definitions as follows:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>:%!rg 'create_table'
</code></pre></div></div>
<p>This passes the contents of the current buffer <code class="language-plaintext highlighter-rouge">%</code> to the command <code class="language-plaintext highlighter-rouge">rg</code> with the argument <code class="language-plaintext highlighter-rouge">'create_table'</code> whose output is piped back to a buffer.
So after entering that command you’d only have lines left containing <code class="language-plaintext highlighter-rouge">create_table</code>.</p>

<p>An additional utility I learned about in this context is <code class="language-plaintext highlighter-rouge">tac</code></p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ tac --help
Usage: tac [OPTION]... [FILE]...
Write each FILE to standard output, last line first.

With no FILE, or when FILE is -, read standard input.
</code></pre></div></div>

<p>This way you can reverse lines in your buffer using</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>:%!tac
</code></pre></div></div>
<p>current buffer <code class="language-plaintext highlighter-rouge">%</code>, <code class="language-plaintext highlighter-rouge">!</code> indicates command, <code class="language-plaintext highlighter-rouge">tac</code> is the command being run on the contents of the buffer.</p>
</content>
      </item>
    
      
      <item>
        <title>Alessandro Rodi</title>
        <link>https://til.renuo.ch/til/2025/11/28/rails-routes-can-be-marked-as-internal-true-and-the.html</link>
        <guid isPermaLink="true">https://til.renuo.ch/til/2025/11/28/rails-routes-can-be-marked-as-internal-true-and-the.html</guid>
        <pubDate>Fri, 28 Nov 2025 09:31:05 +0000</pubDate>
        <description>rails routes can be marked as internal: true and they will not be displayed by bin/rails routes. https://github.com/rails/rails/blob/af73d4ed24afa004cfacc628b17533c70bd7e056/railties/lib/rails/application/finisher.rb#L140</description>
        <content><p>rails routes can be marked as <code class="language-plaintext highlighter-rouge">internal: true</code> and they will not be displayed by <code class="language-plaintext highlighter-rouge">bin/rails routes</code>.
<a href="https://github.com/rails/rails/blob/af73d4ed24afa004cfacc628b17533c70bd7e056/railties/lib/rails/application/finisher.rb#L140">https://github.com/rails/rails/blob/af73d4ed24afa004cfacc628b17533c70bd7e056/railties/lib/rails/application/finisher.rb#L140</a></p>
</content>
      </item>
    
      
      <item>
        <title>Josua Schmid</title>
        <link>https://til.renuo.ch/til/2025/11/25/today-i-found-gold-httpsgithubcomrailsrailsblobmain.html</link>
        <guid isPermaLink="true">https://til.renuo.ch/til/2025/11/25/today-i-found-gold-httpsgithubcomrailsrailsblobmain.html</guid>
        <pubDate>Tue, 25 Nov 2025 15:46:02 +0000</pubDate>
        <description>Today I found gold: https://github.com/rails/rails/blob/main/railties/lib/rails/commands/console/irb_console.rb Here you can: alter the rails console prompt access ApplicationController instances and helpers create your new Rails app with app(true) in the Rails console alter the reload behaviour</description>
        <content><p>Today I found gold: <a href="https://github.com/rails/rails/blob/main/railties/lib/rails/commands/console/irb_console.rb">https://github.com/rails/rails/blob/main/railties/lib/rails/commands/console/irb_console.rb</a></p>

<p>Here you can:</p>
<ul>
  <li>alter the <code class="language-plaintext highlighter-rouge">rails console</code> prompt</li>
  <li>access <code class="language-plaintext highlighter-rouge">ApplicationController</code> instances and helpers</li>
  <li>create your new Rails <code class="language-plaintext highlighter-rouge">app</code> with <code class="language-plaintext highlighter-rouge">app(true)</code> in the Rails console</li>
  <li>alter the reload behaviour</li>
</ul>
</content>
      </item>
    
      
      <item>
        <title>Daniel Bengl</title>
        <link>https://til.renuo.ch/til/2025/11/13/til-that-if-you-want-audible-feedback-for-when-your.html</link>
        <guid isPermaLink="true">https://til.renuo.ch/til/2025/11/13/til-that-if-you-want-audible-feedback-for-when-your.html</guid>
        <pubDate>Thu, 13 Nov 2025 14:05:33 +0000</pubDate>
        <description>TIL that if you want audible feedback for when your shell command has finished executing, you can just append “say” rake export:generate_pdf &amp;amp;&amp;amp; say &quot;pdf generated&quot;</description>
        <content><p>TIL that if you want audible feedback for when your shell command has finished executing, you can just append “say”</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>rake export:generate_pdf &amp;&amp; say "pdf generated"
</code></pre></div></div>
</content>
      </item>
    
      
      <item>
        <title>Simon Isler</title>
        <link>https://til.renuo.ch/til/2025/11/05/httpsgithubcomsilva96logbenchhttpsgithubcomsilva96l.html</link>
        <guid isPermaLink="true">https://til.renuo.ch/til/2025/11/05/httpsgithubcomsilva96logbenchhttpsgithubcomsilva96l.html</guid>
        <pubDate>Wed, 05 Nov 2025 10:23:01 +0000</pubDate>
        <description>https://github.com/silva96/log_bench can correlate requests</description>
        <content><p><a href="https://github.com/silva96/log_bench">https://github.com/silva96/log_bench</a> can correlate requests</p>
</content>
      </item>
    
      
      <item>
        <title>Alessandro Rodi</title>
        <link>https://til.renuo.ch/til/2025/11/04/i-can-run-robohash-locally-httpsgithubcome1venroboh.html</link>
        <guid isPermaLink="true">https://til.renuo.ch/til/2025/11/04/i-can-run-robohash-locally-httpsgithubcome1venroboh.html</guid>
        <pubDate>Tue, 04 Nov 2025 14:33:44 +0000</pubDate>
        <description>I can run robohash locally https://github.com/e1ven/Robohash</description>
        <content><p>I can run robohash locally <a href="https://github.com/e1ven/Robohash">https://github.com/e1ven/Robohash</a></p>
</content>
      </item>
    
      
      <item>
        <title>Alessandro Rodi</title>
        <link>https://til.renuo.ch/til/2025/11/03/bcrypt-basically-cuts-the-password-after-the-72nd-c.html</link>
        <guid isPermaLink="true">https://til.renuo.ch/til/2025/11/03/bcrypt-basically-cuts-the-password-after-the-72nd-c.html</guid>
        <pubDate>Mon, 03 Nov 2025 16:43:01 +0000</pubDate>
        <description>Bcrypt basically cuts the password after the 72nd character. This was discovered in a penetration test in one of our apps. https://github.com/heartcombo/devise/issues/5307</description>
        <content><p>Bcrypt basically cuts the password after the 72nd character. This was discovered in a penetration test in one of our apps. <a href="https://github.com/heartcombo/devise/issues/5307">https://github.com/heartcombo/devise/issues/5307</a></p>
</content>
      </item>
    
      
      <item>
        <title>Simon Isler</title>
        <link>https://til.renuo.ch/til/2025/10/29/til-about-the-postgres-overlaps-operator-httpswwwpo.html</link>
        <guid isPermaLink="true">https://til.renuo.ch/til/2025/10/29/til-about-the-postgres-overlaps-operator-httpswwwpo.html</guid>
        <pubDate>Wed, 29 Oct 2025 09:42:38 +0000</pubDate>
        <description>TIL about the Postgres OVERLAPS operator: https://www.postgresql.org/docs/current/functions-datetime.html#:~:text=In%20addition%20to%20these%20fun[…]20OVERLAPS%20operator%20is%20supported%3A class Promotions::Tile &amp;lt; ApplicationRecord scope :overlapping, -&amp;gt;(range) { where(&quot;(starts_on, ends_on) OVERLAPS (?, ?)&quot;, range.begin, range.end) } end Promotions::Tile.overlapping(Date.today..Date.tomorrow)</description>
        <content><p>TIL about the Postgres <code class="language-plaintext highlighter-rouge">OVERLAPS</code> operator: <a href="https://www.postgresql.org/docs/current/functions-datetime.html#:~:text=In%20addition%20to%20these%20functions%2C%20the%20SQL%20OVERLAPS%20operator%20is%20supported%3A">https://www.postgresql.org/docs/current/functions-datetime.html#:~:text=In%20addition%20to%20these%20fun[…]20OVERLAPS%20operator%20is%20supported%3A</a></p>

<div class="language-ruby highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">class</span> <span class="nc">Promotions::Tile</span> <span class="o">&lt;</span> <span class="no">ApplicationRecord</span>
  <span class="n">scope</span> <span class="ss">:overlapping</span><span class="p">,</span> <span class="o">-&gt;</span><span class="p">(</span><span class="n">range</span><span class="p">)</span> <span class="p">{</span>
    <span class="n">where</span><span class="p">(</span><span class="s2">"(starts_on, ends_on) OVERLAPS (?, ?)"</span><span class="p">,</span> <span class="n">range</span><span class="p">.</span><span class="nf">begin</span><span class="p">,</span> <span class="n">range</span><span class="p">.</span><span class="nf">end</span><span class="p">)</span>
  <span class="p">}</span>
<span class="k">end</span>

<span class="no">Promotions</span><span class="o">::</span><span class="no">Tile</span><span class="p">.</span><span class="nf">overlapping</span><span class="p">(</span><span class="no">Date</span><span class="p">.</span><span class="nf">today</span><span class="o">..</span><span class="no">Date</span><span class="p">.</span><span class="nf">tomorrow</span><span class="p">)</span>
</code></pre></div></div>
</content>
      </item>
    
      
      <item>
        <title>Josua Schmid</title>
        <link>https://til.renuo.ch/til/2025/10/28/today-i-learned-that-thoughtbot-once-tried-to-sell.html</link>
        <guid isPermaLink="true">https://til.renuo.ch/til/2025/10/28/today-i-learned-that-thoughtbot-once-tried-to-sell.html</guid>
        <pubDate>Tue, 28 Oct 2025 10:56:24 +0000</pubDate>
        <description>Today I learned that Thoughtbot once tried to sell a CMS service called Copycopter: https://web.archive.org/web/20110719112035/https://copycopter.com/ It’s open sourced under https://github.com/copycopter/copycopter-server</description>
        <content><p>Today I learned that Thoughtbot once tried to sell a CMS service called Copycopter: <a href="https://web.archive.org/web/20110719112035/https://copycopter.com/">https://web.archive.org/web/20110719112035/https://copycopter.com/</a>
It’s open sourced under <a href="https://github.com/copycopter/copycopter-server">https://github.com/copycopter/copycopter-server</a></p>
</content>
      </item>
    
      
      <item>
        <title>Josua Schmid</title>
        <link>https://til.renuo.ch/til/2025/10/28/i-just-had-one-of-these-moments-again-oh-i-never-he.html</link>
        <guid isPermaLink="true">https://til.renuo.ch/til/2025/10/28/i-just-had-one-of-these-moments-again-oh-i-never-he.html</guid>
        <pubDate>Tue, 28 Oct 2025 08:34:33 +0000</pubDate>
        <description>I just had one of these moments again: “Oh, I never heard of this Rails feature, let’s look it up, it must be new.” Outcome: It’s there since ever: https://github.com/rails/rails/commit/889bf198577fd914e2814b9e402b49f972cf9551 It’s called ActionView::DependencyTracker and it tracks dependencies. This was done via regex and can be done with the Ruby parser since Rails 8.1.</description>
        <content><p>I just had one of these moments again: “Oh, I never heard of this Rails feature, let’s look it up, it must be new.”
Outcome: It’s there since ever: <a href="https://github.com/rails/rails/commit/889bf198577fd914e2814b9e402b49f972cf9551">https://github.com/rails/rails/commit/889bf198577fd914e2814b9e402b49f972cf9551</a>
It’s called <code class="language-plaintext highlighter-rouge">ActionView::DependencyTracker</code> and it tracks dependencies. This was done via regex and can be done with the Ruby parser since Rails 8.1.</p>
</content>
      </item>
    
      
      <item>
        <title>Daniel Bengl</title>
        <link>https://til.renuo.ch/til/2025/10/24/simplecov-was-interfering-with-the-coverage-reports.html</link>
        <guid isPermaLink="true">https://til.renuo.ch/til/2025/10/24/simplecov-was-interfering-with-the-coverage-reports.html</guid>
        <pubDate>Fri, 24 Oct 2025 13:02:19 +0000</pubDate>
        <description>SimpleCov was interfering with the coverage reports during subsequent task executions: Having: 1 Spec that covers everything: → 100% line coverage vs: 1 Spec that covers everything 1 Spec that skips a block → 70% coverage The solution was to load the rails application tasks only once by changing the implementation - before { Rails.application.load_tasks } + before(:all) { Rails.application.load_tasks } Bonus: - Rake::Task[task_name].reenable - Rake::Task[task_name].invoke + Rake::Task[task_name].execute</description>
        <content><p>SimpleCov was interfering with the coverage reports during subsequent task executions:</p>

<p><strong>Having:</strong></p>
<ul>
  <li>1 Spec that covers everything: 
→ 100% line coverage</li>
</ul>

<p><strong>vs:</strong></p>
<ul>
  <li>1 Spec that covers everything</li>
  <li>1 Spec that skips a block
→  70% coverage</li>
</ul>

<p>The solution was to load the rails application tasks only once by changing the implementation</p>

<div class="language-diff highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="gd">- before { Rails.application.load_tasks }
</span><span class="gi">+ before(:all) { Rails.application.load_tasks }
</span></code></pre></div></div>

<p><strong>Bonus:</strong></p>

<div class="language-diff highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="gd">- Rake::Task[task_name].reenable
- Rake::Task[task_name].invoke
</span><span class="gi">+ Rake::Task[task_name].execute
</span></code></pre></div></div>
</content>
      </item>
    
      
      <item>
        <title>Simon Isler</title>
        <link>https://til.renuo.ch/til/2025/10/20/i-had-a-look-at-httpsgithubcomankaneahoyhttpsgithub.html</link>
        <guid isPermaLink="true">https://til.renuo.ch/til/2025/10/20/i-had-a-look-at-httpsgithubcomankaneahoyhttpsgithub.html</guid>
        <pubDate>Mon, 20 Oct 2025 13:56:31 +0000</pubDate>
        <description>I had a look at https://github.com/ankane/ahoy and learned about https://privacypatterns.org/ and the Anonymity Set, which can be used e.g. to identify a user without cookies. Applied here</description>
        <content><p>I had a look at <a href="https://github.com/ankane/ahoy">https://github.com/ankane/ahoy</a> and learned about <a href="https://privacypatterns.org/">https://privacypatterns.org/</a> and the <a href="https://privacypatterns.org/patterns/Anonymity-set">Anonymity Set</a>, which can be used e.g. to identify a user without cookies. Applied <a href="https://github.com/ankane/ahoy/blob/09005fa03c4ca23daa3a3098487905f78ea83523/lib/ahoy/tracker.rb#L244">here</a></p>
</content>
      </item>
    
      
      <item>
        <title>Lukas Bischof</title>
        <link>https://til.renuo.ch/til/2025/10/15/you-can-save-the-commands-entered-in-an-ipython-env.html</link>
        <guid isPermaLink="true">https://til.renuo.ch/til/2025/10/15/you-can-save-the-commands-entered-in-an-ipython-env.html</guid>
        <pubDate>Wed, 15 Oct 2025 08:17:19 +0000</pubDate>
        <description>You can save the commands entered in an iPython environment to a Python file using the %save magic method</description>
        <content><p>You can save the commands entered in an iPython environment to a Python file using the <code class="language-plaintext highlighter-rouge">%save</code> magic method</p>
</content>
      </item>
    
      
      <item>
        <title>Samuel Steiner</title>
        <link>https://til.renuo.ch/til/2025/10/14/in-switzerland-the-correct-spelling-of-time-is-1700.html</link>
        <guid isPermaLink="true">https://til.renuo.ch/til/2025/10/14/in-switzerland-the-correct-spelling-of-time-is-1700.html</guid>
        <pubDate>Tue, 14 Oct 2025 20:25:35 +0000</pubDate>
        <description>In Switzerland, the correct spelling of time is 17.00, not 17:00. In contrast, Germany and Austria do use : as a separator.</description>
        <content><p>In Switzerland, the correct spelling of time is 17.00, not 17:00. In contrast, Germany and Austria do use <code class="language-plaintext highlighter-rouge">:</code> as a separator.</p>
</content>
      </item>
    
      
      <item>
        <title>Alessandro Rodi</title>
        <link>https://til.renuo.ch/til/2025/09/21/til-about-css-counterincrement-property.html</link>
        <guid isPermaLink="true">https://til.renuo.ch/til/2025/09/21/til-about-css-counterincrement-property.html</guid>
        <pubDate>Sun, 21 Sep 2025 19:23:18 +0000</pubDate>
        <description>TIL about CSS counter-increment property https://developer.mozilla.org/en-US/docs/Web/CSS/counter-increment</description>
        <content><p>TIL about CSS counter-increment property
<a href="https://developer.mozilla.org/en-US/docs/Web/CSS/counter-increment">https://developer.mozilla.org/en-US/docs/Web/CSS/counter-increment</a></p>
</content>
      </item>
    
      
      <item>
        <title>Daniel Bengl</title>
        <link>https://til.renuo.ch/til/2025/09/15/til-about-python-dictionary-comprehensions.html</link>
        <guid isPermaLink="true">https://til.renuo.ch/til/2025/09/15/til-about-python-dictionary-comprehensions.html</guid>
        <pubDate>Mon, 15 Sep 2025 12:32:05 +0000</pubDate>
        <description>TIL about Python dictionary comprehensions: nums = [0, 1, 2, 3, 4] even_num_to_square = {x: x ** 2 for x in nums if x % 2 == 0} print(even_num_to_square)</description>
        <content><p>TIL about Python dictionary comprehensions:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>nums = [0, 1, 2, 3, 4]
even_num_to_square = {x: x ** 2 for x in nums if x % 2 == 0}
print(even_num_to_square)
</code></pre></div></div>
</content>
      </item>
    
      
      <item>
        <title>Alessandro Rodi</title>
        <link>https://til.renuo.ch/til/2025/09/11/how-to-pass-default-values-to-variables-in-bash.html</link>
        <guid isPermaLink="true">https://til.renuo.ch/til/2025/09/11/how-to-pass-default-values-to-variables-in-bash.html</guid>
        <pubDate>Thu, 11 Sep 2025 13:54:06 +0000</pubDate>
        <description>How to pass default values to variables in bash: local base_latency=&quot;${1:-$BASE_LATENCY}&quot; takes the first argument or falls back to the variable BASE_LATENCY</description>
        <content><p>How to pass default values to variables in bash:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>local base_latency="${1:-$BASE_LATENCY}"
</code></pre></div></div>
<p>takes the first argument or falls back to the variable BASE_LATENCY</p>
</content>
      </item>
    
      
      <item>
        <title>Daniel Bengl</title>
        <link>https://til.renuo.ch/til/2025/09/11/til-about-tagged-template-literals-in-javascript.html</link>
        <guid isPermaLink="true">https://til.renuo.ch/til/2025/09/11/til-about-tagged-template-literals-in-javascript.html</guid>
        <pubDate>Thu, 11 Sep 2025 11:32:51 +0000</pubDate>
        <description>TIL about tagged template literals in JavaScript https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#tagged_templates function sql(strings, ...values) { const query = strings.reduce((acc, str, i) =&amp;gt; { return acc + str + (i &amp;lt; values.length ? &quot;?&quot; : &quot;&quot;); }, &quot;&quot;); return [query, values]; } const userId = 42; const status = &quot;active&quot;; const [query, params] = sql`SELECT * FROM users WHERE id = ${userId} AND status = ${status}`; console.log(query); // &quot;SELECT * FROM users WHERE id = ? AND status = ?&quot; console.log(params); // [42, &quot;active&quot;]</description>
        <content><p>TIL about tagged template literals in JavaScript
<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#tagged_templates">https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#tagged_templates</a></p>

<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">function</span> <span class="nf">sql</span><span class="p">(</span><span class="nx">strings</span><span class="p">,</span> <span class="p">...</span><span class="nx">values</span><span class="p">)</span> <span class="p">{</span>
  <span class="kd">const</span> <span class="nx">query</span> <span class="o">=</span> <span class="nx">strings</span><span class="p">.</span><span class="nf">reduce</span><span class="p">((</span><span class="nx">acc</span><span class="p">,</span> <span class="nx">str</span><span class="p">,</span> <span class="nx">i</span><span class="p">)</span> <span class="o">=&gt;</span> <span class="p">{</span>
    <span class="k">return</span> <span class="nx">acc</span> <span class="o">+</span> <span class="nx">str</span> <span class="o">+</span> <span class="p">(</span><span class="nx">i</span> <span class="o">&lt;</span> <span class="nx">values</span><span class="p">.</span><span class="nx">length</span> <span class="p">?</span> <span class="dl">"</span><span class="s2">?</span><span class="dl">"</span> <span class="p">:</span> <span class="dl">""</span><span class="p">);</span>
  <span class="p">},</span> <span class="dl">""</span><span class="p">);</span>
  <span class="k">return</span> <span class="p">[</span><span class="nx">query</span><span class="p">,</span> <span class="nx">values</span><span class="p">];</span>
<span class="p">}</span>

<span class="kd">const</span> <span class="nx">userId</span> <span class="o">=</span> <span class="mi">42</span><span class="p">;</span>
<span class="kd">const</span> <span class="nx">status</span> <span class="o">=</span> <span class="dl">"</span><span class="s2">active</span><span class="dl">"</span><span class="p">;</span>

<span class="kd">const</span> <span class="p">[</span><span class="nx">query</span><span class="p">,</span> <span class="nx">params</span><span class="p">]</span> <span class="o">=</span> <span class="nx">sql</span><span class="s2">`SELECT * FROM users WHERE id = </span><span class="p">${</span><span class="nx">userId</span><span class="p">}</span><span class="s2"> AND status = </span><span class="p">${</span><span class="nx">status</span><span class="p">}</span><span class="s2">`</span><span class="p">;</span>

<span class="nx">console</span><span class="p">.</span><span class="nf">log</span><span class="p">(</span><span class="nx">query</span><span class="p">);</span>  <span class="c1">// "SELECT * FROM users WHERE id = ? AND status = ?"</span>
<span class="nx">console</span><span class="p">.</span><span class="nf">log</span><span class="p">(</span><span class="nx">params</span><span class="p">);</span> <span class="c1">// [42, "active"] </span>
</code></pre></div></div>
</content>
      </item>
    
      
      <item>
        <title>Alessandro Rodi</title>
        <link>https://til.renuo.ch/til/2025/09/10/til-that-you-should-be-careful-with-the-spread-synt.html</link>
        <guid isPermaLink="true">https://til.renuo.ch/til/2025/09/10/til-that-you-should-be-careful-with-the-spread-synt.html</guid>
        <pubDate>Wed, 10 Sep 2025 15:28:34 +0000</pubDate>
        <description>TIL that you should be careful with the spread syntax in Javascript. I encountered this when working on 1+ million numbers: https://stackoverflow.com/questions/1669190/find-the-min-max-element-of-an-array-in-javascript#comment45277115_1669222</description>
        <content><p>TIL that you should be careful with the spread syntax in Javascript. I encountered this when working on 1+ million numbers: <a href="https://stackoverflow.com/questions/1669190/find-the-min-max-element-of-an-array-in-javascript#comment45277115_1669222">https://stackoverflow.com/questions/1669190/find-the-min-max-element-of-an-array-in-javascript#comment45277115_1669222</a></p>
</content>
      </item>
    
      
      <item>
        <title>Alessandro Rodi</title>
        <link>https://til.renuo.ch/til/2025/08/28/there-will-be-a-ruby-conference-in-italy-again-next.html</link>
        <guid isPermaLink="true">https://til.renuo.ch/til/2025/08/28/there-will-be-a-ruby-conference-in-italy-again-next.html</guid>
        <pubDate>Thu, 28 Aug 2025 18:46:53 +0000</pubDate>
        <description>There will be a Ruby Conference in Italy again next year</description>
        <content><p>There will be a Ruby Conference in Italy again next year</p>
</content>
      </item>
    
      
      <item>
        <title>Alessandro Rodi</title>
        <link>https://til.renuo.ch/til/2025/08/28/where-the-name-37signals-comes-from-httpsuiadsabsha.html</link>
        <guid isPermaLink="true">https://til.renuo.ch/til/2025/08/28/where-the-name-37signals-comes-from-httpsuiadsabsha.html</guid>
        <pubDate>Thu, 28 Aug 2025 06:48:54 +0000</pubDate>
        <description>Where the name 37signals comes from: https://ui.adsabs.harvard.edu/abs/1993ApJ…415..218H/abstract</description>
        <content><p>Where the name 37signals comes from: <a href="https://ui.adsabs.harvard.edu/abs/1993ApJ...415..218H/abstract">https://ui.adsabs.harvard.edu/abs/1993ApJ…415..218H/abstract</a></p>
</content>
      </item>
    
      
      <item>
        <title>Alessandro Rodi</title>
        <link>https://til.renuo.ch/til/2025/08/23/i-can-multiply-a-string-with-a-float.html</link>
        <guid isPermaLink="true">https://til.renuo.ch/til/2025/08/23/i-can-multiply-a-string-with-a-float.html</guid>
        <pubDate>Sat, 23 Aug 2025 20:50:33 +0000</pubDate>
        <description>I can multiply a String with a Float: &quot;hello&quot; * 3 =&amp;gt; &quot;hellohellohello&quot; &quot;hello&quot; * 3.1 =&amp;gt; &quot;hellohellohello&quot; &quot;hello&quot; * 3.5 =&amp;gt; &quot;hellohellohello&quot; &quot;hello&quot; * 3.6 =&amp;gt; &quot;hellohellohello&quot; &quot;hello&quot; * 4.0 =&amp;gt; &quot;hellohellohellohello&quot;</description>
        <content><p>I can multiply a String with a Float:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>"hello" * 3
=&gt; "hellohellohello"

"hello" * 3.1
=&gt; "hellohellohello"

"hello" * 3.5
=&gt; "hellohellohello"

"hello" * 3.6
=&gt; "hellohellohello"

"hello" * 4.0
=&gt; "hellohellohellohello"
</code></pre></div></div>
</content>
      </item>
    
      
      <item>
        <title>Chris Hunziker</title>
        <link>https://til.renuo.ch/til/2025/08/18/httpsgithubcomgooglecodesearchhttpsgithubcomgooglec.html</link>
        <guid isPermaLink="true">https://til.renuo.ch/til/2025/08/18/httpsgithubcomgooglecodesearchhttpsgithubcomgooglec.html</guid>
        <pubDate>Mon, 18 Aug 2025 12:29:41 +0000</pubDate>
        <description>https://github.com/google/codesearch</description>
        <content><p><a href="https://github.com/google/codesearch">https://github.com/google/codesearch</a></p>
</content>
      </item>
    
      
      <item>
        <title>Alessandro Rodi</title>
        <link>https://til.renuo.ch/til/2025/08/15/til-about-formnovalidate.html</link>
        <guid isPermaLink="true">https://til.renuo.ch/til/2025/08/15/til-about-formnovalidate.html</guid>
        <pubDate>Fri, 15 Aug 2025 15:27:01 +0000</pubDate>
        <description>TIL about formnovalidate https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/button#formnovalidate</description>
        <content><p>TIL about <code class="language-plaintext highlighter-rouge">formnovalidate</code>
<a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/button#formnovalidate">https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/button#formnovalidate</a></p>
</content>
      </item>
    
      
      <item>
        <title>Julian Duss</title>
        <link>https://til.renuo.ch/til/2025/07/18/til-that-respondsto-only-works-for-public-methods-u.html</link>
        <guid isPermaLink="true">https://til.renuo.ch/til/2025/07/18/til-that-respondsto-only-works-for-public-methods-u.html</guid>
        <pubDate>Fri, 18 Jul 2025 12:41:43 +0000</pubDate>
        <description>TIL that responds_to?() only works for public methods UNLESS you provide the second optional parameter which has to be true</description>
        <content><p>TIL that <code class="language-plaintext highlighter-rouge">responds_to?()</code> only works for public methods UNLESS you provide the second optional parameter which has to be <code class="language-plaintext highlighter-rouge">true</code></p>
</content>
      </item>
    
      
      <item>
        <title>Samuel Steiner</title>
        <link>https://til.renuo.ch/til/2025/07/14/in-german-there-is-a-blank-space-before-a-100-not-1.html</link>
        <guid isPermaLink="true">https://til.renuo.ch/til/2025/07/14/in-german-there-is-a-blank-space-before-a-100-not-1.html</guid>
        <pubDate>Mon, 14 Jul 2025 05:46:05 +0000</pubDate>
        <description>In German, there is a blank space before a “%”: 100 %, not 100%</description>
        <content><p>In German, there is a blank space before a “%”: 100 %, <del>not 100%</del></p>
</content>
      </item>
    
      
      <item>
        <title>Daniel Bengl</title>
        <link>https://til.renuo.ch/til/2025/07/09/twl-today-we-learned-about-the-case-in-syntax-in-ru.html</link>
        <guid isPermaLink="true">https://til.renuo.ch/til/2025/07/09/twl-today-we-learned-about-the-case-in-syntax-in-ru.html</guid>
        <pubDate>Wed, 09 Jul 2025 09:25:44 +0000</pubDate>
        <description>TWL (Today We Learned) about the case in syntax in Ruby: response = [201, { &apos;Content-Type&apos; =&amp;gt; &apos;application/json&apos; }, &apos;{&quot;status&quot;:&quot;ok&quot;}&apos;] case response in [200..299, headers, body] puts &quot;Success! Body: #{body}&quot; in [500, _, _] puts &quot;Server Error!&quot; else puts &quot;Unknown response&quot; end # produces Success! Body: {&quot;status&quot;:&quot;ok&quot;}</description>
        <content><p>TWL (Today We Learned) about the <code class="language-plaintext highlighter-rouge">case</code> <code class="language-plaintext highlighter-rouge">in</code> syntax in Ruby:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>response = [201, { 'Content-Type' =&gt; 'application/json' }, '{"status":"ok"}']

case response
in [200..299, headers, body]
  puts "Success! Body: #{body}"
in [500, _, _]
  puts "Server Error!"
else
  puts "Unknown response"
end

# produces Success! Body: {"status":"ok"}
</code></pre></div></div>
</content>
      </item>
    
      
      <item>
        <title>Alessandro Rodi</title>
        <link>https://til.renuo.ch/til/2025/07/03/today-i-learned-that-sqlite-supports-json-data-type.html</link>
        <guid isPermaLink="true">https://til.renuo.ch/til/2025/07/03/today-i-learned-that-sqlite-supports-json-data-type.html</guid>
        <pubDate>Thu, 03 Jul 2025 20:06:40 +0000</pubDate>
        <description>Today I learned that sqlite supports json data types.</description>
        <content><p>Today I learned that sqlite supports json data types.</p>
</content>
      </item>
    
      
      <item>
        <title>Daniel Bengl</title>
        <link>https://til.renuo.ch/til/2025/07/02/til-that-you-can-visit-a-turbo-frame.html</link>
        <guid isPermaLink="true">https://til.renuo.ch/til/2025/07/02/til-that-you-can-visit-a-turbo-frame.html</guid>
        <pubDate>Wed, 02 Jul 2025 15:55:25 +0000</pubDate>
        <description>TIL that you can “visit” a turbo frame: Turbo.visit(url, { frame: &quot;ctae_table&quot; })</description>
        <content><p>TIL that you can “visit” a turbo frame:</p>

<div class="language-js highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nx">Turbo</span><span class="p">.</span><span class="nf">visit</span><span class="p">(</span><span class="nx">url</span><span class="p">,</span> <span class="p">{</span> <span class="na">frame</span><span class="p">:</span> <span class="dl">"</span><span class="s2">ctae_table</span><span class="dl">"</span> <span class="p">})</span>
</code></pre></div></div>
</content>
      </item>
    
      
      <item>
        <title>Chris Hunziker</title>
        <link>https://til.renuo.ch/til/2025/07/02/til-that-postgres-enum-values-cannot-be-removed-onl.html</link>
        <guid isPermaLink="true">https://til.renuo.ch/til/2025/07/02/til-that-postgres-enum-values-cannot-be-removed-onl.html</guid>
        <pubDate>Wed, 02 Jul 2025 13:13:10 +0000</pubDate>
        <description>TIL that postgres enum values cannot be removed, only new ones can be added https://www.postgresql.org/docs/current/datatype-enum.html#DATATYPE-ENUM-IMPLEMENTATION-DETAILS</description>
        <content><p>TIL that postgres enum values cannot be removed, only new ones can be added
<a href="https://www.postgresql.org/docs/current/datatype-enum.html#DATATYPE-ENUM-IMPLEMENTATION-DETAILS">https://www.postgresql.org/docs/current/datatype-enum.html#DATATYPE-ENUM-IMPLEMENTATION-DETAILS</a></p>
</content>
      </item>
    
      
      <item>
        <title>Josua Schmid</title>
        <link>https://til.renuo.ch/til/2025/07/01/add-to-your-shell.html</link>
        <guid isPermaLink="true">https://til.renuo.ch/til/2025/07/01/add-to-your-shell.html</guid>
        <pubDate>Tue, 01 Jul 2025 14:40:28 +0000</pubDate>
        <description>Add to your shell: function mktouch() { mkdir -p -- &quot;$(dirname -- &quot;$1&quot;)&quot; &amp;amp;&amp;amp; touch -- &quot;$1&quot; } and then touch files with path (source: https://unix.stackexchange.com/a/688013/21833)</description>
        <content><p>Add to your shell:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>function mktouch() {
  mkdir -p -- "$(dirname -- "$1")" &amp;&amp; touch -- "$1"
}
</code></pre></div></div>
<p>and then touch files with path (source: <a href="https://unix.stackexchange.com/a/688013/21833">https://unix.stackexchange.com/a/688013/21833</a>)</p>
</content>
      </item>
    
      
      <item>
        <title>Daniel Bengl</title>
        <link>https://til.renuo.ch/til/2025/06/30/til-about-the-unaccenthttpswwwpostgresqlorgdocscurr.html</link>
        <guid isPermaLink="true">https://til.renuo.ch/til/2025/06/30/til-about-the-unaccenthttpswwwpostgresqlorgdocscurr.html</guid>
        <pubDate>Mon, 30 Jun 2025 09:51:00 +0000</pubDate>
        <description>TIL about the unaccent PostgreSQL extension. Upon enabling it, you can remove accents using the unaccent function. scope :by_last_name, -&amp;gt;(last_name) { where(&quot;unaccent(last_name) ILIKE unaccent(?)&quot;, &quot;%#{last_name}%&quot;) } scope :by_first_name, -&amp;gt;(first_name) { where(&quot;unaccent(first_name) ILIKE unaccent(?)&quot;, &quot;%#{first_name}%&quot;) }</description>
        <content><p>TIL about the <a href="https://www.postgresql.org/docs/current/unaccent.html">unaccent</a> PostgreSQL extension.
Upon enabling it, you can remove accents using the <code class="language-plaintext highlighter-rouge">unaccent</code> function.</p>

<div class="language-ruby highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">scope</span> <span class="ss">:by_last_name</span><span class="p">,</span> <span class="o">-&gt;</span><span class="p">(</span><span class="n">last_name</span><span class="p">)</span> <span class="p">{</span> <span class="n">where</span><span class="p">(</span><span class="s2">"unaccent(last_name) ILIKE unaccent(?)"</span><span class="p">,</span> <span class="s2">"%</span><span class="si">#{</span><span class="n">last_name</span><span class="si">}</span><span class="s2">%"</span><span class="p">)</span> <span class="p">}</span>
<span class="n">scope</span> <span class="ss">:by_first_name</span><span class="p">,</span> <span class="o">-&gt;</span><span class="p">(</span><span class="n">first_name</span><span class="p">)</span> <span class="p">{</span> <span class="n">where</span><span class="p">(</span><span class="s2">"unaccent(first_name) ILIKE unaccent(?)"</span><span class="p">,</span> <span class="s2">"%</span><span class="si">#{</span><span class="n">first_name</span><span class="si">}</span><span class="s2">%"</span><span class="p">)</span> <span class="p">}</span>
</code></pre></div></div>
</content>
      </item>
    
      
      <item>
        <title>Daniel Bengl</title>
        <link>https://til.renuo.ch/til/2025/06/28/til-that-you-can-perform-an-empty-match-in-rust.html</link>
        <guid isPermaLink="true">https://til.renuo.ch/til/2025/06/28/til-that-you-can-perform-an-empty-match-in-rust.html</guid>
        <pubDate>Sat, 28 Jun 2025 06:31:58 +0000</pubDate>
        <description>TIL that you can perform an empty match in Rust. This allows for pretty one-liners :) let sprite_type = match () { _ if tile.is_flagged &amp;amp;&amp;amp; !tile.is_revealed =&amp;gt; TileSprite::Flag, _ if !tile.is_revealed =&amp;gt; TileSprite::Uncovered, _ if tile.is_mine =&amp;gt; TileSprite::Bomb, _ if tile.adjacent_mines &amp;gt; 0 =&amp;gt; TileSprite::Number(tile.adjacent_mines), _ =&amp;gt; TileSprite::Empty, };</description>
        <content><p>TIL that you can perform an empty match in Rust.
This allows for pretty one-liners :)</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>let sprite_type = match () {
    _ if tile.is_flagged &amp;&amp; !tile.is_revealed =&gt; TileSprite::Flag,
    _ if !tile.is_revealed =&gt; TileSprite::Uncovered,
    _ if tile.is_mine =&gt; TileSprite::Bomb,
    _ if tile.adjacent_mines &gt; 0 =&gt; TileSprite::Number(tile.adjacent_mines),
    _ =&gt; TileSprite::Empty,
};
</code></pre></div></div>
</content>
      </item>
    
      
      <item>
        <title>Alessandro Rodi</title>
        <link>https://til.renuo.ch/til/2025/06/18/today-i-learned-about-distinct-on-clause-in-postgre.html</link>
        <guid isPermaLink="true">https://til.renuo.ch/til/2025/06/18/today-i-learned-about-distinct-on-clause-in-postgre.html</guid>
        <pubDate>Wed, 18 Jun 2025 07:49:04 +0000</pubDate>
        <description>Today I learned about DISTINCT ON clause in Postgres. Very useful!</description>
        <content><p>Today I learned about <code class="language-plaintext highlighter-rouge">DISTINCT ON</code> clause in Postgres. Very useful!</p>
</content>
      </item>
    
      
      <item>
        <title>Simon Isler</title>
        <link>https://til.renuo.ch/til/2025/06/18/til-about-httpsgithubcomgogrowdevsafepolymorphichtt.html</link>
        <guid isPermaLink="true">https://til.renuo.ch/til/2025/06/18/til-about-httpsgithubcomgogrowdevsafepolymorphichtt.html</guid>
        <pubDate>Wed, 18 Jun 2025 06:15:33 +0000</pubDate>
        <description>TIL about https://github.com/gogrow-dev/safe_polymorphic that allows to specify the polymorphic association types: belongs_to :owner, polymorphic: [Client, SubClient] without the gem: ALLOWED_OWNER_TYPES = %w(Client SubClient).freeze validates :owner_type, presence: true, inclusion: { in: ALLOWED_OWNER_TYPES }</description>
        <content><p>TIL about <a href="https://github.com/gogrow-dev/safe_polymorphic">https://github.com/gogrow-dev/safe_polymorphic</a> that allows to specify the polymorphic association types: <code class="language-plaintext highlighter-rouge">belongs_to :owner, polymorphic: [Client, SubClient]</code></p>

<p>without the gem:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>ALLOWED_OWNER_TYPES = %w(Client SubClient).freeze
validates :owner_type, presence: true, inclusion: { in: ALLOWED_OWNER_TYPES }
</code></pre></div></div>
</content>
      </item>
    
      
      <item>
        <title>sami.hindi</title>
        <link>https://til.renuo.ch/til/2025/06/16/til-about-presence-which-is-the-same-as-objectprese.html</link>
        <guid isPermaLink="true">https://til.renuo.ch/til/2025/06/16/til-about-presence-which-is-the-same-as-objectprese.html</guid>
        <pubDate>Mon, 16 Jun 2025 06:23:37 +0000</pubDate>
        <description>TIL about .presence, which is the same as Object.present ? Object : nil</description>
        <content><p>TIL about <code class="language-plaintext highlighter-rouge">.presence</code>, which is the same as <code class="language-plaintext highlighter-rouge">Object.present ? Object : nil</code></p>
</content>
      </item>
    
      
      <item>
        <title>Julian Duss</title>
        <link>https://til.renuo.ch/til/2025/06/16/til-that-params-a-a-is-not-the-same-as-params-a-a-a.html</link>
        <guid isPermaLink="true">https://til.renuo.ch/til/2025/06/16/til-that-params-a-a-is-not-the-same-as-params-a-a-a.html</guid>
        <pubDate>Mon, 16 Jun 2025 05:46:52 +0000</pubDate>
        <description>TIL that params = { &quot;a&quot; =&amp;gt; &quot;a&quot; } is NOT the same as params = { :a =&amp;gt; &quot;a&quot; } and Ruby doesn’t understand it, when you try to access the String Key with a Symbol of the same name…</description>
        <content><p>TIL that <code class="language-plaintext highlighter-rouge">params = { "a" =&gt; "a" }</code>  is NOT the same as <code class="language-plaintext highlighter-rouge">params = { :a =&gt; "a" }</code>  and Ruby doesn’t understand it, when you try to access the String Key with a Symbol of the same name…</p>
</content>
      </item>
    
      
      <item>
        <title>Daniel Bengl</title>
        <link>https://til.renuo.ch/til/2025/06/13/til-that-you-can-set-table-borders-directly-via-htm.html</link>
        <guid isPermaLink="true">https://til.renuo.ch/til/2025/06/13/til-that-you-can-set-table-borders-directly-via-htm.html</guid>
        <pubDate>Fri, 13 Jun 2025 20:45:08 +0000</pubDate>
        <description>TIL that you can set table borders directly via html attributes: https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/table#attributes Example: &amp;lt;table rules=&quot;rows&quot;&amp;gt; &amp;lt;thead&amp;gt; &amp;lt;tr&amp;gt; &amp;lt;th&amp;gt;Product&amp;lt;/th&amp;gt; &amp;lt;th&amp;gt;Price&amp;lt;/th&amp;gt; &amp;lt;th&amp;gt;Quantity&amp;lt;/th&amp;gt; &amp;lt;/tr&amp;gt; &amp;lt;/thead&amp;gt; &amp;lt;tbody&amp;gt; &amp;lt;tr&amp;gt; &amp;lt;td&amp;gt;Apples&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt;1.20&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt;10&amp;lt;/td&amp;gt; &amp;lt;/tr&amp;gt; &amp;lt;tr&amp;gt; &amp;lt;td&amp;gt;Bananas&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt;0.80&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt;5&amp;lt;/td&amp;gt; &amp;lt;/tr&amp;gt; &amp;lt;tr&amp;gt; &amp;lt;td&amp;gt;Oranges&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt;1.00&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt;8&amp;lt;/td&amp;gt; &amp;lt;/tr&amp;gt; &amp;lt;/tbody&amp;gt; &amp;lt;/table&amp;gt; So much easier to interpret :relaxed:.</description>
        <content><p>TIL that you can set table borders directly via html attributes:
<a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/table#attributes">https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/table#attributes</a></p>

<p><strong>Example:</strong></p>

<div class="language-html highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt">&lt;table</span> <span class="na">rules=</span><span class="s">"rows"</span><span class="nt">&gt;</span>
  <span class="nt">&lt;thead&gt;</span>
    <span class="nt">&lt;tr&gt;</span>
      <span class="nt">&lt;th&gt;</span>Product<span class="nt">&lt;/th&gt;</span>
      <span class="nt">&lt;th&gt;</span>Price<span class="nt">&lt;/th&gt;</span>
      <span class="nt">&lt;th&gt;</span>Quantity<span class="nt">&lt;/th&gt;</span>
    <span class="nt">&lt;/tr&gt;</span>
  <span class="nt">&lt;/thead&gt;</span>
  <span class="nt">&lt;tbody&gt;</span>
    <span class="nt">&lt;tr&gt;</span>
      <span class="nt">&lt;td&gt;</span>Apples<span class="nt">&lt;/td&gt;</span>
      <span class="nt">&lt;td&gt;</span>1.20<span class="nt">&lt;/td&gt;</span>
      <span class="nt">&lt;td&gt;</span>10<span class="nt">&lt;/td&gt;</span>
    <span class="nt">&lt;/tr&gt;</span>
    <span class="nt">&lt;tr&gt;</span>
      <span class="nt">&lt;td&gt;</span>Bananas<span class="nt">&lt;/td&gt;</span>
      <span class="nt">&lt;td&gt;</span>0.80<span class="nt">&lt;/td&gt;</span>
      <span class="nt">&lt;td&gt;</span>5<span class="nt">&lt;/td&gt;</span>
    <span class="nt">&lt;/tr&gt;</span>
    <span class="nt">&lt;tr&gt;</span>
      <span class="nt">&lt;td&gt;</span>Oranges<span class="nt">&lt;/td&gt;</span>
      <span class="nt">&lt;td&gt;</span>1.00<span class="nt">&lt;/td&gt;</span>
      <span class="nt">&lt;td&gt;</span>8<span class="nt">&lt;/td&gt;</span>
    <span class="nt">&lt;/tr&gt;</span>
  <span class="nt">&lt;/tbody&gt;</span>
<span class="nt">&lt;/table&gt;</span>
</code></pre></div></div>
<p>So much easier to interpret :relaxed:.</p>
</content>
      </item>
    
      
      <item>
        <title>Daniel Bengl</title>
        <link>https://til.renuo.ch/til/2025/06/13/til-about-the-deprecated-font-tag.html</link>
        <guid isPermaLink="true">https://til.renuo.ch/til/2025/06/13/til-about-the-deprecated-font-tag.html</guid>
        <pubDate>Fri, 13 Jun 2025 20:26:28 +0000</pubDate>
        <description>TIL about the deprecated &amp;lt;font&amp;gt; tag. &amp;lt;font color=&quot;blue&quot; face=&quot;Arial, sans-serif&quot;&amp;gt; &amp;lt;h1&amp;gt;HTML maagic!&amp;lt;/h1&amp;gt; &amp;lt;/font&amp;gt; It is cool when you don’t feel like writing ANY css. More interesting html properties: https://html-only.netlify.app/#WHY</description>
        <content><p>TIL about the deprecated <code class="language-plaintext highlighter-rouge">&lt;font&gt;</code> tag.</p>

<div class="language-html highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nt">&lt;font</span> <span class="na">color=</span><span class="s">"blue"</span> <span class="na">face=</span><span class="s">"Arial, sans-serif"</span><span class="nt">&gt;</span>
  <span class="nt">&lt;h1&gt;</span>HTML maagic!<span class="nt">&lt;/h1&gt;</span>
<span class="nt">&lt;/font&gt;</span>
</code></pre></div></div>
<p>It is cool when you don’t feel like writing ANY css.
More interesting html properties: <a href="https://html-only.netlify.app/#WHY">https://html-only.netlify.app/#WHY</a></p>
</content>
      </item>
    
      
      <item>
        <title>Alessandro Rodi</title>
        <link>https://til.renuo.ch/til/2025/06/10/til-that-when-i-use-a-rich-text-column-in-rails-i-d.html</link>
        <guid isPermaLink="true">https://til.renuo.ch/til/2025/06/10/til-that-when-i-use-a-rich-text-column-in-rails-i-d.html</guid>
        <pubDate>Tue, 10 Jun 2025 13:50:28 +0000</pubDate>
        <description>TIL that when I use a rich text column in Rails, I don’t need to actually have that column in the database :man-facepalming: It took me at least two hours of debugging and chatGPT helped me in 10 seconds. :clap:</description>
        <content><p>TIL that when I use a rich text column in Rails, I don’t need to actually have that column in the database :man-facepalming:
It took me at least two hours of debugging and chatGPT helped me in 10 seconds. :clap:</p>
</content>
      </item>
    
      
      <item>
        <title>Alessandro Rodi</title>
        <link>https://til.renuo.ch/til/2025/06/10/tally-method-in-ruby.html</link>
        <guid isPermaLink="true">https://til.renuo.ch/til/2025/06/10/tally-method-in-ruby.html</guid>
        <pubDate>Tue, 10 Jun 2025 13:01:43 +0000</pubDate>
        <description>tally method in ruby. %w[a b c b c a c b].tally # =&amp;gt; {&quot;a&quot;=&amp;gt;2, &quot;b&quot;=&amp;gt;3, &quot;c&quot;=&amp;gt;3} https://www.rubydoc.info/stdlib/core/Enumerable:tally</description>
        <content><p><code class="language-plaintext highlighter-rouge">tally</code> method in ruby.</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code> %w[a b c b c a c b].tally # =&gt; {"a"=&gt;2, "b"=&gt;3, "c"=&gt;3}
</code></pre></div></div>

<p><a href="https://www.rubydoc.info/stdlib/core/Enumerable:tally">https://www.rubydoc.info/stdlib/core/Enumerable:tally</a></p>
</content>
      </item>
    
      
      <item>
        <title>Daniel Bengl</title>
        <link>https://til.renuo.ch/til/2025/06/06/til-that-javafx-scene-builder-can-generate-you-a-jr.html</link>
        <guid isPermaLink="true">https://til.renuo.ch/til/2025/06/06/til-that-javafx-scene-builder-can-generate-you-a-jr.html</guid>
        <pubDate>Fri, 06 Jun 2025 17:58:12 +0000</pubDate>
        <description>TIL that JavaFX Scene Builder can generate you a JRuby controller skeleton from your fxml layout: class MainWindowController include JRubyFX::Controller # java_import &apos;com.gluonhq.charm.glisten.control.TextField&apos; fxml &apos;MainWindow.fxml&apos; # @labelTitle: Label # @textEntry: TextField # @textHistory: TextArea def addText(event) # event: ActionEvent end def clearTextEntry(event) # event: ActionEvent end end</description>
        <content><p>TIL that JavaFX Scene Builder can generate you a JRuby controller skeleton from your fxml layout:</p>

<div class="language-ruby highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">class</span> <span class="nc">MainWindowController</span>
    <span class="kp">include</span> <span class="no">JRubyFX</span><span class="o">::</span><span class="no">Controller</span>

    <span class="c1"># java_import 'com.gluonhq.charm.glisten.control.TextField'</span>

    <span class="n">fxml</span> <span class="s1">'MainWindow.fxml'</span>

    <span class="c1"># @labelTitle: 	Label</span>
    <span class="c1"># @textEntry: 	TextField</span>
    <span class="c1"># @textHistory: 	TextArea</span>

    <span class="k">def</span> <span class="nf">addText</span><span class="p">(</span><span class="n">event</span><span class="p">)</span> <span class="c1"># event: ActionEvent</span>

    <span class="k">end</span>

    <span class="k">def</span> <span class="nf">clearTextEntry</span><span class="p">(</span><span class="n">event</span><span class="p">)</span> <span class="c1"># event: ActionEvent</span>

    <span class="k">end</span>
<span class="k">end</span>
</code></pre></div></div>
</content>
      </item>
    
      
      <item>
        <title>Josua Schmid</title>
        <link>https://til.renuo.ch/til/2025/06/06/today-i-learned-two-things-at-the-same-time.html</link>
        <guid isPermaLink="true">https://til.renuo.ch/til/2025/06/06/today-i-learned-two-things-at-the-same-time.html</guid>
        <pubDate>Fri, 06 Jun 2025 17:24:17 +0000</pubDate>
        <description>Today I learned two things at the same time. FactoryBot is very, very, very slow. Even attributes_for is not match to a hash. Usage of Turbo makes tests like this one quite involved context &quot;when there are many onboarding forms&quot;, :performance do before do city_and_date = &quot;Winterthur, #{I18n.l(Date.today)}&quot;.freeze codes = 10_000.times.map { SecureRandom.alphanumeric(8) }.uniq attributes = codes.map.with_index do |code, index| { firstname: &quot;Alex #{index}.&quot;, lastname: &quot;Honnold&quot;, birthdate: &quot;17.08.1985&quot;, accept_privacy: true, city_and_date: city_and_date, code: code, status: &quot;draft&quot; } end OnboardingForm.insert_all(attributes) sign_in user end it &quot;loads in under 1 second&quot; do time = Benchmark.measure do VCR.use_cassette(&quot;dato/onboarding_form&quot;) do get admin_onboarding_forms_path end expect(response).to have_http_status(:ok) end expect(time.real).to be &amp;lt; 1 expect(response.body).to include(&quot;Max&quot;) end end</description>
        <content><p>Today I learned two things at the same time.</p>

<ul>
  <li>FactoryBot is very, very, very slow. Even <code class="language-plaintext highlighter-rouge">attributes_for</code> is not match to a hash.</li>
  <li>Usage of Turbo makes tests like this one quite involved</li>
</ul>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>context "when there are many onboarding forms", :performance do
  before do
    city_and_date = "Winterthur, #{I18n.l(Date.today)}".freeze
    codes = 10_000.times.map { SecureRandom.alphanumeric(8) }.uniq
    attributes = codes.map.with_index do |code, index|
      {
        firstname: "Alex #{index}.",
        lastname: "Honnold",
        birthdate: "17.08.1985",
        accept_privacy: true,
        city_and_date: city_and_date,
        code: code,
        status: "draft"
      }
    end
    OnboardingForm.insert_all(attributes)

    sign_in user
  end

  it "loads in under 1 second" do
    time = Benchmark.measure do
      VCR.use_cassette("dato/onboarding_form") do
        get admin_onboarding_forms_path
      end

      expect(response).to have_http_status(:ok)
    end

    expect(time.real).to be &lt; 1
    expect(response.body).to include("Max")
  end
end
</code></pre></div></div>
</content>
      </item>
    
      
      <item>
        <title>Daniel Bengl</title>
        <link>https://til.renuo.ch/til/2025/06/05/til-that-the-java-streams-reduce-method-takes-in-tw.html</link>
        <guid isPermaLink="true">https://til.renuo.ch/til/2025/06/05/til-that-the-java-streams-reduce-method-takes-in-tw.html</guid>
        <pubDate>Thu, 05 Jun 2025 08:48:14 +0000</pubDate>
        <description>TIL that the Java streams reduce method takes in two functions as arguments, allowing for parallel processing. Example code: List&amp;lt;String&amp;gt; words = Arrays.asList(&quot;hello&quot;, &quot; &quot;, &quot;world&quot;, &quot;!&quot;); String combinedString = words.parallelStream().reduce(&quot;&quot;, (currentString, nextWord) -&amp;gt; currentString + nextWord, (s1, s2) -&amp;gt; s1 + s2); System.out.println(&quot;Combined String: &quot; + combinedString);</description>
        <content><p>TIL that the Java streams <code class="language-plaintext highlighter-rouge">reduce</code> method takes in two functions as arguments, allowing for parallel processing.</p>

<p>Example code:</p>

<div class="language-java highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nc">List</span><span class="o">&lt;</span><span class="nc">String</span><span class="o">&gt;</span> <span class="n">words</span> <span class="o">=</span> <span class="nc">Arrays</span><span class="o">.</span><span class="na">asList</span><span class="o">(</span><span class="s">"hello"</span><span class="o">,</span> <span class="s">" "</span><span class="o">,</span> <span class="s">"world"</span><span class="o">,</span> <span class="s">"!"</span><span class="o">);</span>

<span class="nc">String</span> <span class="n">combinedString</span> <span class="o">=</span> <span class="n">words</span><span class="o">.</span><span class="na">parallelStream</span><span class="o">().</span><span class="na">reduce</span><span class="o">(</span><span class="s">""</span><span class="o">,</span>
                                                     <span class="o">(</span><span class="n">currentString</span><span class="o">,</span> <span class="n">nextWord</span><span class="o">)</span> <span class="o">-&gt;</span> <span class="n">currentString</span> <span class="o">+</span> <span class="n">nextWord</span><span class="o">,</span>
                                                     <span class="o">(</span><span class="n">s1</span><span class="o">,</span> <span class="n">s2</span><span class="o">)</span> <span class="o">-&gt;</span> <span class="n">s1</span> <span class="o">+</span> <span class="n">s2</span><span class="o">);</span>

<span class="nc">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">println</span><span class="o">(</span><span class="s">"Combined String: "</span> <span class="o">+</span> <span class="n">combinedString</span><span class="o">);</span>
</code></pre></div></div>
</content>
      </item>
    
      
      <item>
        <title>Alessandro Rodi</title>
        <link>https://til.renuo.ch/til/2025/06/03/theres-a-special-breed-of-pig-that-looks-like-a-she.html</link>
        <guid isPermaLink="true">https://til.renuo.ch/til/2025/06/03/theres-a-special-breed-of-pig-that-looks-like-a-she.html</guid>
        <pubDate>Tue, 03 Jun 2025 19:55:44 +0000</pubDate>
        <description>There’s a special breed of pig that looks like a sheep. https://en.wikipedia.org/wiki/Mangalica</description>
        <content><p>There’s a special breed of pig that looks like a sheep.
<a href="https://en.wikipedia.org/wiki/Mangalica">https://en.wikipedia.org/wiki/Mangalica</a></p>
</content>
      </item>
    
      
      <item>
        <title>Daniel Bengl</title>
        <link>https://til.renuo.ch/til/2025/05/21/til-about-interactive-git-staging-git-add-i-explodi.html</link>
        <guid isPermaLink="true">https://til.renuo.ch/til/2025/05/21/til-about-interactive-git-staging-git-add-i-explodi.html</guid>
        <pubDate>Wed, 21 May 2025 11:35:11 +0000</pubDate>
        <description>TIL about interactive git staging git add -i :exploding_head: ➜ shapehub git:(feature/23869-systematic-therapy) ✗ git add -i Found existing alias for &quot;git add&quot;. You should use: &quot;ga&quot; staged unstaged path 1: unchanged +0/-34 app/views/layouts/application.html.erb 2: unchanged +0/-50 app/views/layouts/croms.html.erb 3: unchanged +0/-30 app/views/layouts/croms/_header.html.erb 4: unchanged +0/-13 app/views/layouts/mailer.html.erb 5: unchanged +0/-1 app/views/layouts/mailer.text.erb *** Commands *** 1: status 2: update 3: revert 4: add untracked 5: patch 6: diff 7: quit 8: help What now&amp;gt; 2</description>
        <content><p>TIL about interactive git staging <code class="language-plaintext highlighter-rouge">git add -i</code> :exploding_head:</p>

<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="go">➜  shapehub git:(feature/23869-systematic-therapy) ✗ git add -i
Found existing alias for "git add". You should use: "ga"
           staged     unstaged path
  1:    unchanged       +0/-34 app/views/layouts/application.html.erb
  2:    unchanged       +0/-50 app/views/layouts/croms.html.erb
  3:    unchanged       +0/-30 app/views/layouts/croms/_header.html.erb
  4:    unchanged       +0/-13 app/views/layouts/mailer.html.erb
  5:    unchanged        +0/-1 app/views/layouts/mailer.text.erb

*** Commands ***
  1: status       2: update       3: revert       4: add untracked
  5: patch        6: diff         7: quit         8: help
</span><span class="gp">What now&gt;</span><span class="w"> </span>2
</code></pre></div></div>
</content>
      </item>
    
      
      <item>
        <title>Daniel Bengl</title>
        <link>https://til.renuo.ch/til/2025/05/19/til-about-custom-simpleform-inputs.html</link>
        <guid isPermaLink="true">https://til.renuo.ch/til/2025/05/19/til-about-custom-simpleform-inputs.html</guid>
        <pubDate>Mon, 19 May 2025 14:37:35 +0000</pubDate>
        <description>TIL about custom simpleform inputs: https://github.com/heartcombo/simple_form?tab=readme-ov-file#custom-inputs class TreeSelectInput &amp;lt; SimpleForm::Inputs::CollectionSelectInput def input(wrapper_options) super(wrapper_options.merge(data: { controller: &quot;tree-input&quot; })) end end</description>
        <content><p>TIL about custom simpleform inputs:
<a href="https://github.com/heartcombo/simple_form?tab=readme-ov-file#custom-inputs">https://github.com/heartcombo/simple_form?tab=readme-ov-file#custom-inputs</a></p>

<div class="language-ruby highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">class</span> <span class="nc">TreeSelectInput</span> <span class="o">&lt;</span> <span class="no">SimpleForm</span><span class="o">::</span><span class="no">Inputs</span><span class="o">::</span><span class="no">CollectionSelectInput</span>
  <span class="k">def</span> <span class="nf">input</span><span class="p">(</span><span class="n">wrapper_options</span><span class="p">)</span>
    <span class="k">super</span><span class="p">(</span><span class="n">wrapper_options</span><span class="p">.</span><span class="nf">merge</span><span class="p">(</span><span class="ss">data: </span><span class="p">{</span> <span class="ss">controller: </span><span class="s2">"tree-input"</span> <span class="p">}))</span>
  <span class="k">end</span>
<span class="k">end</span>
</code></pre></div></div>
</content>
      </item>
    
      
      <item>
        <title>Josua Schmid</title>
        <link>https://til.renuo.ch/til/2025/05/06/til-that-an-aiignore-file-is-a-thing.html</link>
        <guid isPermaLink="true">https://til.renuo.ch/til/2025/05/06/til-that-an-aiignore-file-is-a-thing.html</guid>
        <pubDate>Tue, 06 May 2025 18:54:41 +0000</pubDate>
        <description>TIL that an .aiignore file is a thing.</description>
        <content><p>TIL that an <code class="language-plaintext highlighter-rouge">.aiignore</code> file is a thing.</p>
</content>
      </item>
    
      
      <item>
        <title>Alessandro Rodi</title>
        <link>https://til.renuo.ch/til/2025/05/01/elasticsearch-is-also-based-on-lucene-it-means-ever.html</link>
        <guid isPermaLink="true">https://til.renuo.ch/til/2025/05/01/elasticsearch-is-also-based-on-lucene-it-means-ever.html</guid>
        <pubDate>Thu, 01 May 2025 12:36:02 +0000</pubDate>
        <description>Elasticsearch is also based on Lucene. It means everything I know about Solr still applies. :shrug:</description>
        <content><p>Elasticsearch is also based on Lucene. It means everything I know about Solr still applies. :shrug:</p>
</content>
      </item>
    
      
      <item>
        <title>Josua Schmid</title>
        <link>https://til.renuo.ch/til/2025/04/29/1745922591508039.html</link>
        <guid isPermaLink="true">https://til.renuo.ch/til/2025/04/29/1745922591508039.html</guid>
        <pubDate>Tue, 29 Apr 2025 10:29:51 +0000</pubDate>
        <description>click_email_link_matching(&apos;invivation&apos;) https://github.com/email-spec/email-spec</description>
        <content><div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>click_email_link_matching('invivation')
</code></pre></div></div>
<p><a href="https://github.com/email-spec/email-spec">https://github.com/email-spec/email-spec</a></p>
</content>
      </item>
    
      
      <item>
        <title>Josua Schmid</title>
        <link>https://til.renuo.ch/til/2025/04/08/1744115410787289.html</link>
        <guid isPermaLink="true">https://til.renuo.ch/til/2025/04/08/1744115410787289.html</guid>
        <pubDate>Tue, 08 Apr 2025 12:30:10 +0000</pubDate>
        <description>require &apos;sinatra&apos; get &apos;/&apos; do haml :index end __END__ @@ layout %html = yield @@ index %div.title Hello world.</description>
        <content><div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>require 'sinatra'

get '/' do
  haml :index
end

__END__

@@ layout
%html
  = yield

@@ index
%div.title Hello world.
</code></pre></div></div>
</content>
      </item>
    
      
      <item>
        <title>Daniel Bengl</title>
        <link>https://til.renuo.ch/til/2025/03/16/til-about-vector-retain-in-rust.html</link>
        <guid isPermaLink="true">https://til.renuo.ch/til/2025/03/16/til-about-vector-retain-in-rust.html</guid>
        <pubDate>Sun, 16 Mar 2025 18:05:21 +0000</pubDate>
        <description>TIL about Vector ‘retain’ in Rust https://doc.rust-lang.org/std/vec/struct.Vec.html#method.retain</description>
        <content><p>TIL about Vector ‘retain’ in Rust
<a href="https://doc.rust-lang.org/std/vec/struct.Vec.html#method.retain">https://doc.rust-lang.org/std/vec/struct.Vec.html#method.retain</a></p>
</content>
      </item>
    
  </channel>
</rss>
