<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Brandon Pugh&#39;s Blog — Everything</title>
    <link>https://www.brandonpugh.com/</link>
    <description>All content on Brandon Pugh&#39;s Blog</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language><atom:link href="https://www.brandonpugh.com/feed/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Alerts, Callouts, and Admonitions</title>
      <link>https://www.brandonpugh.com/garden/alerts-callouts-admonitions/</link>
      <pubDate>Sun, 31 May 2026 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/garden/alerts-callouts-admonitions/</guid>
      <description>&lt;blockquote class=&#34;alert alert-note&#34;&gt;
  &lt;p class=&#34;alert-heading&#34;&gt;
    &lt;span aria-hidden=&#34;true&#34;&gt;&lt;svg xmlns=&#34;http://www.w3.org/2000/svg&#34; viewBox=&#34;0 0 16 16&#34; width=&#34;16&#34; height=&#34;16&#34;&gt;&lt;path d=&#34;M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm8-6.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13ZM6.5 7.75A.75.75 0 0 1 7.25 7h1a.75.75 0 0 1 .75.75v2.75h.25a.75.75 0 0 1 0 1.5h-2a.75.75 0 0 1 0-1.5h.25v-2h-.25a.75.75 0 0 1-.75-.75ZM8 6a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z&#34;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/span&gt;
    &lt;span&gt;Note&lt;/span&gt;
  &lt;/p&gt;
  &lt;p&gt;Highlights information that users should take into account, even when skimming.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote class=&#34;alert alert-tip&#34;&gt;
  &lt;p class=&#34;alert-heading&#34;&gt;
    &lt;span aria-hidden=&#34;true&#34;&gt;&lt;svg xmlns=&#34;http://www.w3.org/2000/svg&#34; viewBox=&#34;0 0 16 16&#34; width=&#34;16&#34; height=&#34;16&#34;&gt;&lt;path d=&#34;M8 1.5c-2.363 0-4 1.69-4 3.75 0 .984.424 1.625.984 2.304l.214.253c.223.264.47.556.673.848.284.411.537.896.621 1.49a.75.75 0 0 1-1.484.211c-.04-.282-.163-.547-.37-.847a8.456 8.456 0 0 0-.542-.68c-.084-.1-.173-.205-.268-.32C3.201 7.75 2.5 6.766 2.5 5.25 2.5 2.31 4.863 0 8 0s5.5 2.31 5.5 5.25c0 1.516-.701 2.5-1.328 3.259-.095.115-.184.22-.268.319-.207.245-.383.453-.541.681-.208.3-.33.565-.37.847a.751.751 0 0 1-1.485-.212c.084-.593.337-1.078.621-1.489.203-.292.45-.584.673-.848.075-.088.147-.173.213-.253.561-.679.985-1.32.985-2.304 0-2.06-1.637-3.75-4-3.75ZM5.75 12h4.5a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1 0-1.5ZM6 15.25a.75.75 0 0 1 .75-.75h2.5a.75.75 0 0 1 0 1.5h-2.5a.75.75 0 0 1-.75-.75Z&#34;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/span&gt;
    &lt;span&gt;Tip&lt;/span&gt;
  &lt;/p&gt;
  &lt;p&gt;Optional information to help a user be more successful.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote class=&#34;alert alert-important&#34;&gt;
  &lt;p class=&#34;alert-heading&#34;&gt;
    &lt;span aria-hidden=&#34;true&#34;&gt;&lt;svg xmlns=&#34;http://www.w3.org/2000/svg&#34; viewBox=&#34;0 0 16 16&#34; width=&#34;16&#34; height=&#34;16&#34;&gt;&lt;path d=&#34;M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v9.5A1.75 1.75 0 0 1 14.25 13H8.06l-2.573 2.573A1.458 1.458 0 0 1 3 14.543V13H1.75A1.75 1.75 0 0 1 0 11.25Zm1.75-.25a.25.25 0 0 0-.25.25v9.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h6.5a.25.25 0 0 0 .25-.25v-9.5a.25.25 0 0 0-.25-.25Zm7 2.25v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 9a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z&#34;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/span&gt;
    &lt;span&gt;Important&lt;/span&gt;
  &lt;/p&gt;
  &lt;p&gt;Crucial information necessary for users to succeed.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote class=&#34;alert alert-warning&#34;&gt;
  &lt;p class=&#34;alert-heading&#34;&gt;
    &lt;span aria-hidden=&#34;true&#34;&gt;&lt;svg xmlns=&#34;http://www.w3.org/2000/svg&#34; viewBox=&#34;0 0 16 16&#34; width=&#34;16&#34; height=&#34;16&#34;&gt;&lt;path d=&#34;M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z&#34;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/span&gt;
    &lt;span&gt;Warning&lt;/span&gt;
  &lt;/p&gt;
  &lt;p&gt;Critical content demanding immediate user attention due to potential risks.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote class=&#34;alert alert-caution&#34;&gt;
  &lt;p class=&#34;alert-heading&#34;&gt;
    &lt;span aria-hidden=&#34;true&#34;&gt;&lt;svg xmlns=&#34;http://www.w3.org/2000/svg&#34; viewBox=&#34;0 0 16 16&#34; width=&#34;16&#34; height=&#34;16&#34;&gt;&lt;path d=&#34;M4.47.22A.749.749 0 0 1 5 0h6c.199 0 .389.079.53.22l4.25 4.25c.141.14.22.331.22.53v6a.749.749 0 0 1-.22.53l-4.25 4.25A.749.749 0 0 1 11 16H5a.749.749 0 0 1-.53-.22L.22 11.53A.749.749 0 0 1 0 11V5c0-.199.079-.389.22-.53Zm.84 1.28L1.5 5.31v5.38l3.81 3.81h5.38l3.81-3.81V5.31L10.69 1.5ZM8 4a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 4Zm0 8a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z&#34;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/span&gt;
    &lt;span&gt;Caution&lt;/span&gt;
  &lt;/p&gt;
  &lt;p&gt;Negative potential consequences of an action.&lt;/p&gt;
&lt;/blockquote&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/garden/alerts-callouts-admonitions/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>NPM 11.10.0 adds `min-release-age`</title>
      <link>https://www.brandonpugh.com/til/node/package-version-cooldown/</link>
      <pubDate>Thu, 21 May 2026 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/node/package-version-cooldown/</guid>
      <description>&lt;p&gt;You can now specify a minimum age for installing package versions in NPM.&lt;/p&gt;
&lt;p&gt;This is a concept known as &lt;a href=&#34;https://cooldowns.dev/&#34;&gt;dependency cooldowns&lt;/a&gt; that has gained popularity with the rise in supply chain attacks.&lt;/p&gt;
&lt;p&gt;You need to be running at least &lt;a href=&#34;https://github.com/npm/cli/releases/tag/v11.10.0&#34;&gt;v11.10.0 of npm&lt;/a&gt; but then you can add the following to your &lt;code&gt;.npmrc&lt;/code&gt; file:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-inf&#34; data-lang=&#34;inf&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;na&#34;&gt;min-release-age&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;7&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;or set it globally with:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;npm config &lt;span class=&#34;nb&#34;&gt;set&lt;/span&gt; min-release-age&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;7&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Now NPM won&amp;rsquo;t install any package version that was released less than 7 days ago.&lt;/p&gt;
&lt;p&gt;If you don&amp;rsquo;t specify a version, i.e. &lt;code&gt;npm install vite&lt;/code&gt;, then it will install the most recent version that satisfies the age requirement.&lt;/p&gt;
&lt;p&gt;If you specify a version that doesn&amp;rsquo;t meet the age requirement then it will error out.&lt;/p&gt;
&lt;p&gt;Note: if you&amp;rsquo;re running a version of NPM older than 11.10 then it will silently ignore the new config value.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/node/package-version-cooldown/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Insert the last argument of the previous terminal command</title>
      <link>https://www.brandonpugh.com/til/powershell/insert-last-argument/</link>
      <pubDate>Wed, 20 May 2026 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/powershell/insert-last-argument/</guid>
      <description>&lt;p&gt;Today I learned that you can use &lt;code&gt;!$&lt;/code&gt; in bash to use the last argument of the previous command.&lt;/p&gt;
&lt;p&gt;The simplest example is:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;mkdir /some/long/path
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;cd&lt;/span&gt; !$
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;You can do something similar in powershell by using a PSReadline binding:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-powershell&#34; data-lang=&#34;powershell&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;Set-PSReadLineKeyHandler&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;-Chord&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Alt+.&amp;#34;&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;-Function&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;YankLastArg&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/powershell/insert-last-argument/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Display git commit dates in local timezone</title>
      <link>https://www.brandonpugh.com/til/git/display-local-date/</link>
      <pubDate>Tue, 19 May 2026 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/git/display-local-date/</guid>
      <description>&lt;p&gt;Most Git commands accept a &lt;code&gt;--date=&lt;/code&gt; option with accepted values of &lt;code&gt;relative&lt;/code&gt;, &lt;code&gt;local&lt;/code&gt;, &lt;code&gt;default&lt;/code&gt;, &lt;code&gt;iso&lt;/code&gt;, or &lt;code&gt;rfc&lt;/code&gt; to control how dates are displayed.&lt;/p&gt;
&lt;p&gt;For example:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git show --date&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;local&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;And as usual, if you Git to always display dates this way then you can set it globally with:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git config --global log.date &lt;span class=&#34;nb&#34;&gt;local&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/git/display-local-date/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Throttle individual network requests</title>
      <link>https://www.brandonpugh.com/links/throttle-individual-network-requests-blog-chrome-for-developers/</link>
      <pubDate>Mon, 18 May 2026 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/links/throttle-individual-network-requests-blog-chrome-for-developers/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://developer.chrome.com/blog/throttle-individual-network-requests&#34;&gt;Throttle individual network requests  |  Blog  |  Chrome for Developers&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This will be nice little improvement.
You&amp;rsquo;ve always been able to throttle the network on a page but it did that for &lt;em&gt;all&lt;/em&gt; requests so it was pretty annoying if you only wanted to test out a single slow-loading requets but then the page would a long time to load if you needed to refresh it.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/throttle-individual-network-requests-blog-chrome-for-developers/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>List installed node versions with Volta</title>
      <link>https://www.brandonpugh.com/til/node/volta-list/</link>
      <pubDate>Tue, 12 May 2026 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/node/volta-list/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://volta.sh/&#34;&gt;Volta&lt;/a&gt; is my preferred node version manager these days but the commands are a bit different to what I&amp;rsquo;m used to.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;volta list&lt;/code&gt; - show the current tool versions in use&lt;/li&gt;
&lt;li&gt;&lt;code&gt;volta list node&lt;/code&gt; - show all the versions of node downloaded to the machine&lt;/li&gt;
&lt;li&gt;&lt;code&gt;volta install node@version&lt;/code&gt; - use the specified version of node. It will download and install it if hasn&amp;rsquo;t before otherwise it will just select it (there is no separate &lt;code&gt;use&lt;/code&gt; command).&lt;/li&gt;
&lt;/ul&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/node/volta-list/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Em Dash Appreciation Society</title>
      <link>https://www.brandonpugh.com/links/em-dash-appreciation-society/</link>
      <pubDate>Thu, 07 May 2026 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/links/em-dash-appreciation-society/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://em-dash-appreciation.org/&#34;&gt;Em Dash Appreciation Society&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;As someone who discovered the em dash fairly late in life, I appreciate this effort to keep it alive.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/em-dash-appreciation-society/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Enable markdown in Google Docs</title>
      <link>https://www.brandonpugh.com/til/google/docs-enable-markdown/</link>
      <pubDate>Fri, 01 May 2026 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/google/docs-enable-markdown/</guid>
      <description>&lt;p&gt;Today I learned that you can &lt;a href=&#34;https://support.google.com/docs/answer/12014036?hl=en&#34;&gt;enable markdown&lt;/a&gt; in Google Docs.&lt;/p&gt;
&lt;p&gt;This isn&amp;rsquo;t really &lt;em&gt;full&lt;/em&gt; markdown support but it does make interoperating with markdown easier.&lt;/p&gt;
&lt;p&gt;The best feature is it enables the &amp;ldquo;Paste from markdown&amp;rdquo; right-click option.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/google/docs-enable-markdown/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>LCARS Website HTML Template</title>
      <link>https://www.brandonpugh.com/links/lcars-website-html-template/</link>
      <pubDate>Thu, 30 Apr 2026 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/links/lcars-website-html-template/</guid>
      <description>&lt;p&gt;I can&amp;rsquo;t believe I only just discovered that the designer of the Star Trek UI style (known as LCARS) created a css framework for it:
&lt;a href=&#34;https://www.thelcars.com/&#34;&gt;LCARS Website HTML Template&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Now I just need something to build with it&amp;hellip;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/lcars-website-html-template/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Rod Prazeres Astrophotography in Project Hail Mary End Credits</title>
      <link>https://www.brandonpugh.com/links/rod-prazeres-astrophotography-in-project-hail-mary-end-credits-rod-prazeres-astrophotography/</link>
      <pubDate>Mon, 13 Apr 2026 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/links/rod-prazeres-astrophotography-in-project-hail-mary-end-credits-rod-prazeres-astrophotography/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://rpastro.square.site/s/stories/phm?utm_source=cassidoo&amp;amp;utm_medium=email&amp;amp;utm_campaign=u1f360-id-rather-regret-the-things-ive-done-than&#34;&gt;Rod Prazeres Astrophotography in Project Hail Mary End Credits&lt;/a&gt;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/rod-prazeres-astrophotography-in-project-hail-mary-end-credits-rod-prazeres-astrophotography/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Scientific Thinking Crash Course</title>
      <link>https://www.brandonpugh.com/links/scientific-thinking/</link>
      <pubDate>Wed, 08 Apr 2026 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/links/scientific-thinking/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://www.youtube.com/playlist?list=PL8dPuuaLjXtN6j3y85b7xbJDC8LTgdRJG&#34;&gt;Scientific Thinking - Crash Course&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This is a great mini youtube series on the scientific process that&amp;rsquo;s easily digestible and really should be required learning for society.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;In 7 episodes, Crash Course Scientific Thinking will teach learners the foundational principles underlying scientific thought, pulling back the curtain on processes like peer review, interrogating what makes sources reliable (or not), unpacking how consensus is reached, and revealing how scientific understanding changes over time.&lt;/p&gt;
&lt;/blockquote&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/scientific-thinking/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Programming the Mistel MD770 Keyboard</title>
      <link>https://www.brandonpugh.com/garden/mistel-barrocco-keyboard-programming/</link>
      <pubDate>Tue, 24 Mar 2026 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/garden/mistel-barrocco-keyboard-programming/</guid>
      <description>&lt;p&gt;Because I tend to accidentally enter macro programming mode and mess up my macro.&lt;/p&gt;
&lt;p&gt;To program a macro, for example &lt;code&gt;fn+L&lt;/code&gt; -&amp;gt; &lt;code&gt;Win+L&lt;/code&gt;:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Press &lt;code&gt;Fn + R_Ctrl&lt;/code&gt; to enter marco mode. (LED1 will turn solid white)
Ctrl&lt;/li&gt;
&lt;li&gt;Press &lt;code&gt;Fn + L&lt;/code&gt; (LED1 will blink white)&lt;/li&gt;
&lt;li&gt;Press &lt;code&gt;Win+L&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Press the &lt;code&gt;Pn&lt;/code&gt; key once to save the new setting. LED1 will turn solid white again.&lt;/li&gt;
&lt;li&gt;Press &lt;code&gt;Fn + R_Ctrl&lt;/code&gt; again to exit the macro mode. LED1 will turn off.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;a href=&#34;https://mistelkeyboard.com/products/d11cf7a73da49468e2a530b4cf18e76c&#34;&gt;BAROCCO MD770 | Mistel Keyboard&lt;/a&gt;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/garden/mistel-barrocco-keyboard-programming/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Rebuilding a 6v Power Wheels battery</title>
      <link>https://www.brandonpugh.com/til/electronics/rebuild-powerwheels-battery/</link>
      <pubDate>Sun, 15 Mar 2026 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/electronics/rebuild-powerwheels-battery/</guid>
      <description>&lt;p&gt;We bought the &amp;ldquo;Fisher-Price Thomas &amp;amp; Friends Ride-On Train&amp;rdquo; for our toddler, and after some time, the battery stopped charging.
It uses a Power Wheels 6V 2400 mAh NiMH battery (Model No. 1102822518 / Part No. 3900-8218).
Apparently, this battery was fairly unique (and &lt;a href=&#34;https://www.amazon.com/product-reviews/B09P9LWMZY/ref=acr_dp_hist_1?ie=UTF8&amp;amp;filterByStar=one_star&amp;amp;reviewerType=all_reviews#reviews-filter-bar&#34;&gt;problematic&lt;/a&gt;) to this toy and has since been &lt;a href=&#34;https://www.impactbattery.com/power-wheels-nimh-6-volt-2400-mah-battery-1102822518-for-thomas-hhp26.html&#34;&gt;discontinued&lt;/a&gt;.
&lt;img alt=&#34;alt text&#34; loading=&#34;lazy&#34; src=&#34;https://www.brandonpugh.com/til/electronics/rebuild-powerwheels-battery-product-image.webp&#34;&gt;&lt;/p&gt;
&lt;p&gt;I, of course, did not want to scrap an entire Power Wheels toy that worked just fine except for the battery.&lt;/p&gt;
&lt;p&gt;One thing I will say about it, though, is that it&amp;rsquo;s surprisingly repairable.
I was able to open it up just by removing four Phillips screws.&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;alt text&#34; loading=&#34;lazy&#34; src=&#34;https://www.brandonpugh.com/til/electronics/rebuild-powerwheels-battery-opened.webp&#34;&gt;&lt;/p&gt;
&lt;p&gt;From what I gathered, the circuit board is what makes this battery unique.
It allows charging the NiMH battery via micro-USB instead of the typical Power Wheels charger.&lt;/p&gt;
&lt;p&gt;All of the wires seemed fairly self-explanatory, except for two small additional wires coming from the battery pack.&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;alt text&#34; loading=&#34;lazy&#34; src=&#34;https://www.brandonpugh.com/til/electronics/rebuild-powerwheels-battery-circuit-board-wires.webp&#34;&gt;&lt;/p&gt;
&lt;p&gt;Well, it turns out these 6V battery packs are just five rechargeable AA batteries strapped together.
The wires were just going to a small thermistor to measure the temperature of the batteries as a way to gauge how much it&amp;rsquo;s charged.&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;alt text&#34; loading=&#34;lazy&#34; src=&#34;https://www.brandonpugh.com/til/electronics/rebuild-powerwheels-battery-stripped-battery-pack.webp&#34;&gt;&lt;/p&gt;
&lt;p&gt;After that, all I had to do was desolder the battery pack from the board, buy a replacement, solder it to the board, and tape the thermistor to the new pack.
Then I sealed it all back up and I was good to go!&lt;/p&gt;
&lt;p&gt;I did come across a &lt;a href=&#34;https://batterygiantaz.com/products/3900-8218-6v-black-thomas-the-train-battery-new-style-rebuild-service&#34;&gt;service&lt;/a&gt; that seems to do this for you, but it turned out to be fairly straightforward to do it myself.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/electronics/rebuild-powerwheels-battery/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>My Visual Studio Extensions</title>
      <link>https://www.brandonpugh.com/garden/visual-studio-extensions/</link>
      <pubDate>Sun, 01 Mar 2026 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/garden/visual-studio-extensions/</guid>
      <description>&lt;p&gt;My current list of favorite visual studio extensions.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://marketplace.visualstudio.com/items?itemName=JaredParMSFT.VsVim2022Preview&#34;&gt;VsVim 2022 - Visual Studio Marketplace&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://marketplace.visualstudio.com/items?itemName=MikeWard-AnnArbor.VSColorOutput64&#34;&gt;VSColorOutput64 - Visual Studio Marketplace&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://marketplace.visualstudio.com/items?itemName=MadsKristensen.CopyNice&#34;&gt;Copy Nice - Visual Studio Marketplace&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/garden/visual-studio-extensions/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Git aliases</title>
      <link>https://www.brandonpugh.com/garden/git-aliases/</link>
      <pubDate>Fri, 20 Feb 2026 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/garden/git-aliases/</guid>
      <description>&lt;h3 id=&#34;merge-development-md&#34;&gt;Merge Development (&lt;code&gt;md&lt;/code&gt;)&lt;/h3&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git config --global alias.md &lt;span class=&#34;s1&#34;&gt;&amp;#39;!git fetch &amp;amp;&amp;amp; git merge --no-ff origin/development&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;strong&gt;What it does:&lt;/strong&gt; Fetches the latest changes from the remote and merges the &lt;code&gt;origin/development&lt;/code&gt; branch into your current branch using a non-fast-forward merge (creates a merge commit even if a fast-forward is possible).&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&#34;delete-gone-branches-db&#34;&gt;Delete Gone Branches (&lt;code&gt;db&lt;/code&gt;)&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;PowerShell:&lt;/strong&gt;&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-powershell&#34; data-lang=&#34;powershell&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;git&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;config&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;-global&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;alias&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;py&#34;&gt;db&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;!for branch in `git branch -vv | grep &amp;#34;: gone]&amp;#34; | awk &amp;#34;{print \$1}&amp;#34;`; do git branch -D $branch; done&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;strong&gt;Bash/Git Bash:&lt;/strong&gt;&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git config --global alias.db &lt;span class=&#34;s1&#34;&gt;&amp;#39;!for branch in $(git branch -vv | grep &amp;#34;: gone]&amp;#34; | awk &amp;#34;{print \$1}&amp;#34;); do git branch -D $branch; done&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;strong&gt;What it does:&lt;/strong&gt; Finds and deletes all local branches that have been removed from the remote repository (marked as &amp;ldquo;gone&amp;rdquo; by Git).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;When to use:&lt;/strong&gt; After pull requests have been merged and deleted remotely, use this to clean up your local branch list and remove stale references.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; This alias uses bash syntax that works because Git for Windows includes a bash shell. If you prefer a pure PowerShell solution, you can use:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-powershell&#34; data-lang=&#34;powershell&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;git&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;config&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;-global&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;alias&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;py&#34;&gt;db&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;!pwsh -Command \&amp;#34;&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;git&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;branch&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;-vv&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;Select-String&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;: gone]&amp;#39;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;ForEach-Object&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;`$&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;_&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;py&#34;&gt;ToString&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;().&lt;/span&gt;&lt;span class=&#34;py&#34;&gt;Split&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()[&lt;/span&gt;&lt;span class=&#34;mf&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;ForEach-Object&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;git&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;branch&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;-D&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;`$&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;_&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;}\&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/garden/git-aliases/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>My git cheatsheet</title>
      <link>https://www.brandonpugh.com/garden/git-cheatsheet/</link>
      <pubDate>Fri, 20 Feb 2026 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/garden/git-cheatsheet/</guid>
      <description>&lt;h2 id=&#34;submodules&#34;&gt;Submodules&lt;/h2&gt;
&lt;p&gt;See &lt;a href=&#34;https://www.cyberdemon.org/2024/03/20/submodules.html&#34;&gt;Demystifying git submodules&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Command to run after first cloning a repo that uses submodules:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git submodule update --init --recursive
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;if submodule has been updated on remote, then run this after git pull:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git submodule update
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;keep-fork-updated&#34;&gt;Keep fork updated&lt;/h2&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git remote add upstream https://github.com/adityatelange/hugo-PaperMod.git
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git fetch upstream/master
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/garden/git-cheatsheet/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Thoughts on the Keychron Q11 QMK Mechanical Keyboard</title>
      <link>https://www.brandonpugh.com/garden/keychron/</link>
      <pubDate>Fri, 20 Feb 2026 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/garden/keychron/</guid>
      <description>&lt;p&gt;I recently decided to upgrade my keyboard and landed on the &lt;a href=&#34;https://www.keychron.com/products/keychron-q11-qmk-custom-mechanical-keyboard&#34;&gt;Keychron Q11 QMK&lt;/a&gt; with the Gateron G Pro Brown switches and so far I&amp;rsquo;m really liking it!&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;keychron promo image&#34; loading=&#34;lazy&#34; src=&#34;https://www.brandonpugh.com/garden/keychron.png&#34;&gt;&lt;/p&gt;
&lt;p&gt;I knew I wanted to stay with a split keyboard for ergonomics.&lt;/p&gt;
&lt;p&gt;What I like:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Configuration is web-based with the &lt;a href=&#34;https://www.usevia.app/&#34;&gt;Via app&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;The led effect is nice but not too overwhelming. I prefer the effects that react to typing so it&amp;rsquo;s not lit up unless actively typing.&lt;/li&gt;
&lt;li&gt;The nobs feel nice for volume control. I haven&amp;rsquo;t found a great use the second knob though.&lt;/li&gt;
&lt;li&gt;I like the open key design which makes cleaning it a lot easier.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;What could be better:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The space buttons are bit smaller that my last keyboard and so I find I tend to press near the edge so I&amp;rsquo;m having to adjust a bit&lt;/li&gt;
&lt;li&gt;A dedicated &amp;ldquo;end&amp;rdquo; button would be nice&lt;/li&gt;
&lt;/ul&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/garden/keychron/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Why I prefer web apps over native apps</title>
      <link>https://www.brandonpugh.com/garden/web-apps-over-native/</link>
      <pubDate>Fri, 20 Feb 2026 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/garden/web-apps-over-native/</guid>
      <description>&lt;p&gt;A lot has been said recently about why folks might not want to install a native app when the web version would suffice or in some ways be better.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://www.0xsid.com/blog/wont-download-your-app&#34;&gt;No, I Won&amp;rsquo;t Download Your App. The Web Version is A-OK. | Sid&amp;rsquo;s Blog&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://rogueengine.io/blog/your-app-should-have-been-a-website&#34;&gt;Your App Should Have Been A Website (And Probably Your Game Too) - Rogue Engine&lt;/a&gt;
&lt;a href=&#34;https://adactio.com/journal/21728&#34;&gt;Adactio—The web on mobile&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://pluralistic.net/2023/11/13/this-is-for-everyone/#revisiting&#34;&gt;The (open) web is good, actually&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;Apps interact with law in precisely the way that web-pages don&amp;rsquo;t. &amp;ldquo;An app is just a web-page wrapped in enough IP to make it a crime to defend yourself against corporate predation&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This is an interesting case of the counter argument:
&lt;a href=&#34;https://www.windowslatest.com/2026/04/29/microsoft-engineer-says-native-apps-are-back-and-it-could-finally-revive-windows-11s-fight-against-web-apps/&#34;&gt;Microsoft engineer says native apps are back, and it could finally revive Windows 11’s fight against web apps&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I think that&amp;rsquo;s a slightly different use case though.
This sounds to me like Microsoft building native &lt;em&gt;desktop&lt;/em&gt; apps and even parts of the Windows UI as web views and the performance hasn&amp;rsquo;t been great.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://thenextweb.com/news/i-dont-want-to-use-your-app&#34;&gt;Dear websites, please stop asking me to download your mobile app&lt;/a&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;I can open multiple tabs/windows&lt;/li&gt;
&lt;li&gt;Very few app support signing into multiple accounts. I can do this with multiple browser profiles or instances&lt;/li&gt;
&lt;li&gt;Bookmarklets or extensions&lt;/li&gt;
&lt;li&gt;Can bookmark anything or save the url whereever I want&lt;/li&gt;
&lt;li&gt;I can copy text from any part of the app&lt;/li&gt;
&lt;li&gt;Easy to save images and sometimes video&lt;/li&gt;
&lt;li&gt;A searchable history&lt;/li&gt;
&lt;/ul&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/garden/web-apps-over-native/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>30 Years of &lt;br&gt; Tags</title>
      <link>https://www.brandonpugh.com/links/30-years-of-lt-br-gt-tags/</link>
      <pubDate>Wed, 04 Feb 2026 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/links/30-years-of-lt-br-gt-tags/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://www.artmann.co/articles/30-years-of-br-tags&#34;&gt;30 Years of &amp;lt;br&amp;gt; Tags&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;A great look back over the last 30 years of building things on the web.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/30-years-of-lt-br-gt-tags/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Are people migrating away from GitHub?</title>
      <link>https://www.brandonpugh.com/links/are-people-migrating-away-from-github/</link>
      <pubDate>Wed, 04 Feb 2026 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/links/are-people-migrating-away-from-github/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://www.roboleary.net/blog/github-migration/&#34;&gt;Are people migrating away from GitHub?&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;I don’t know if you’d say GitHub is enshittified, but it is striding forward in a more corporate manner.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This post gives a nice concise summary of the recent complaints people have had about Github.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/are-people-migrating-away-from-github/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>datetime-local doesn&#39;t have full cross-browser support</title>
      <link>https://www.brandonpugh.com/til/html/datetime-local-support/</link>
      <pubDate>Sun, 04 Jan 2026 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/html/datetime-local-support/</guid>
      <description>&lt;p&gt;I recently discovered the &lt;code&gt;datetime-local&lt;/code&gt; input type doesn&amp;rsquo;t actually have full browser support.&lt;/p&gt;
&lt;p&gt;If you have a form value that needs both a date and time component, then you might be tempted to rely on the platform to simplify your implementation and use &lt;code&gt;datetime-local&lt;/code&gt; to avoid needing two separate inputs, the values of which you&amp;rsquo;ll need to combine at some point. Unfortunately I don&amp;rsquo;t think it&amp;rsquo;s supported enough to be usable in most applications.&lt;/p&gt;
&lt;p&gt;The MDN page for &lt;a href=&#34;https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input/datetime-local&#34;&gt;datetime-local&lt;/a&gt; is a bit misleading because at the top it says it&amp;rsquo;s &amp;ldquo;Baseline widely available&amp;rdquo; but if you check the browser &lt;a href=&#34;https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input/datetime-local#browser_compatibility&#34;&gt;compatibility chart&lt;/a&gt; down at the bottom then you&amp;rsquo;ll see asterisks next to Firefox and Safari on Desktop and clicking that reveals that they only display a datepicker and &lt;em&gt;not&lt;/em&gt; a timepicker.&lt;/p&gt;
&lt;p&gt;This means that users have to manually type in the time which &lt;em&gt;might&lt;/em&gt; be an acceptable tradeoff but if the user doesn&amp;rsquo;t add the time then Firefox will just return &lt;code&gt;null&lt;/code&gt; as its value.&lt;/p&gt;
&lt;p&gt;Firefox did recently address these issues in Firefox 144, but as of this writing it&amp;rsquo;s still behind an &lt;a href=&#34;https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Experimental_features#time_picker_for_datetime-local_input_field&#34;&gt;experimental flag&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;screenshot firefox new support&#34; loading=&#34;lazy&#34; src=&#34;https://www.brandonpugh.com/til/html/firefox-datetime-local-support.png&#34;&gt;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/html/datetime-local-support/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Splice wires with solder seal connectors</title>
      <link>https://www.brandonpugh.com/til/electronics/solder-seal-wires/</link>
      <pubDate>Fri, 12 Dec 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/electronics/solder-seal-wires/</guid>
      <description>&lt;p&gt;After setting the Christmas tree this, a section of the builtin lights weren&amp;rsquo;t turning on and found two of the wires had been chewed through.&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;broken wires&#34; loading=&#34;lazy&#34; src=&#34;https://www.brandonpugh.com/til/electronics/solder-seal-wires-before.webp&#34;&gt;&lt;/p&gt;
&lt;p&gt;I didn&amp;rsquo;t want to have to throw out the whole tree so I set about fixing it.
I wasn&amp;rsquo;t looking forward to it though as I thought I would have to solder the wires together and cover them with heat shrink tubing&amp;hellip; a process that was going to be &lt;em&gt;very&lt;/em&gt; annoying under a Christmas tree.
I debated just taping them together with some electrical tape but I didn&amp;rsquo;t want to deal with it maybe coming loose while taking it in and out of storage.&lt;/p&gt;
&lt;p&gt;Fortunately while googling for some tips, I came across these &lt;a href=&#34;https://www.amazon.com/dp/B073RMRCC3&#34;&gt;solder seal wire connectors&lt;/a&gt; which made the process a whole lot easier.&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;fixed wires with connectors&#34; loading=&#34;lazy&#34; src=&#34;https://www.brandonpugh.com/til/electronics/PXL_20251214_181618938.webp&#34;&gt;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/electronics/solder-seal-wires/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Our response to a recent security incident (Mixpanel)</title>
      <link>https://www.brandonpugh.com/links/our-response-to-a-recent-security-incident/</link>
      <pubDate>Mon, 01 Dec 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/links/our-response-to-a-recent-security-incident/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://mixpanel.com/blog/sms-security-incident/&#34;&gt;Our response to a recent security incident&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The noteworthy thing about this news to me is how it can serve as an example of how &lt;em&gt;not&lt;/em&gt; to disclose a security incident.
The post is incredibly vague and doesn&amp;rsquo;t make clear what actually happened like what systems were exposed or how or the scale of the &amp;ldquo;incident&amp;rdquo;.
The most specific they get is &amp;ldquo;detected a smishing campaign&amp;rdquo;, which feels like an intentional use of jargon that doesn&amp;rsquo;t add much value&amp;hellip; why not just say &amp;ldquo;phishing&amp;rdquo; as it&amp;rsquo;s not that important that it was via SMS instead email especially since they don&amp;rsquo;t even say who the campaign targeted (internal or end users?).
They do mention they &amp;ldquo;Performed global password resets for all Mixpanel employees&amp;rdquo; which sounds like an attacker used social engineering to compromise employee credentials and exfiltrate user data.
That&amp;rsquo;s kinda the definition of a data breach yet they only refer to it as a vague &amp;ldquo;security incident&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;I think the most telling aspect, though, is the fact that &lt;a href=&#34;https://openai.com/index/mixpanel-incident/&#34;&gt;OpenAI&amp;rsquo;s response&lt;/a&gt; to the same incident has &lt;em&gt;more&lt;/em&gt; details than Mixpanel&amp;rsquo;s and was released the day &lt;em&gt;before&lt;/em&gt;.
Makes it seem like Mixpanel only made a public announcement because OpenAI forced them to.&lt;/p&gt;
&lt;p&gt;Also from OpenAI&amp;rsquo;s response:
&amp;ldquo;After reviewing this incident, OpenAI has terminated its use of Mixpanel.&amp;rdquo;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/our-response-to-a-recent-security-incident/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Fix &#39;value&#39; does not exist on type &#39;HTMLElement&#39;</title>
      <link>https://www.brandonpugh.com/til/react/value-does-not-exist-html-element/</link>
      <pubDate>Sat, 29 Nov 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/react/value-does-not-exist-html-element/</guid>
      <description>&lt;p&gt;It&amp;rsquo;s common to see the error &lt;code&gt;Property &#39;value&#39; does not exist on type &#39;HTMLElement&#39;&lt;/code&gt; when working with react testing library.&lt;/p&gt;
&lt;p&gt;Common advice online is to cast result using the &lt;code&gt;as&lt;/code&gt; operator.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-ts&#34; data-lang=&#34;ts&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kr&#34;&gt;const&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;title&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;getByPlaceholderText&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;test&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;kr&#34;&gt;as&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;HTMLInputElement&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This is fine but feels incorrect and when using &lt;a href=&#34;https://typescript-eslint.io/rules/no-unnecessary-type-assertion/&#34;&gt;eslint-typescript&lt;/a&gt; will complain that the cast is unnecessary: &lt;code&gt;This assertion is unnecessary since it does not change the type of the expression&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Then, thanks to this &lt;a href=&#34;https://stackoverflow.com/a/70794857/1715138&#34;&gt;SO answer&lt;/a&gt;, I learned that the react testing library query methods can now take an optional type parameter:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-ts&#34; data-lang=&#34;ts&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;nx&#34;&gt;screen&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;getByLabelText&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;HTMLInputElement&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;test&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;).&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;value&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This feels much cleaner and makes both the linter and compiler happy.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/react/value-does-not-exist-html-element/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Sessions don&#39;t end when the browser closes</title>
      <link>https://www.brandonpugh.com/til/chrome/session-cookies/</link>
      <pubDate>Wed, 12 Nov 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/chrome/session-cookies/</guid>
      <description>&lt;p&gt;There seems to be a common misunderstanding about how session cookies usually work.&lt;/p&gt;
&lt;p&gt;Closing the browser doesn&amp;rsquo;t necessarily clear out session cookies because the user can have the option of &amp;ldquo;Continue where you left off&amp;rdquo; enabled for Chrome startup.
Folks usually enable this if they don&amp;rsquo;t want to lose their open tabs when Chrome closes, but Chrome also continues the session so session cookies could potentially persist indefinitely.&lt;/p&gt;
&lt;p&gt;So if a user is having issues related to a site&amp;rsquo;s cookies, the most reliable solution is having them delete the cookies for this site.
You can get to that fairly easily by clicking the settings icon on the left side of the address bar.&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;screenshot of the chrome site settings menu&#34; loading=&#34;lazy&#34; src=&#34;https://www.brandonpugh.com/til/chrome/chrome-site-settings-screenshot.png&#34;&gt;&lt;/p&gt;
&lt;p&gt;That takes them to the settings page with a button at the top to delete all the data for that specific site.&lt;/p&gt;
&lt;p&gt;You can also copy/paste this in the address bar to go directly there for a specific site (replace &lt;code&gt;stackoverflow.com&lt;/code&gt; with your actual site): &lt;code&gt;chrome://settings/content/siteDetails?site=https%3A%2F%2Fstackoverflow.com&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;This &lt;a href=&#34;https://stackoverflow.com/questions/10617954/chrome-doesnt-delete-session-cookies&#34;&gt;Stack Overflow question&lt;/a&gt; shows that this isn&amp;rsquo;t how a lot of people expect it to behave.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/chrome/session-cookies/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>How to Optimize Viewport for Mobile for Faster Interactions | DebugBear</title>
      <link>https://www.brandonpugh.com/links/how-to-optimize-viewport-for-mobile-for-faster-interactions-debugbear/</link>
      <pubDate>Tue, 28 Oct 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/links/how-to-optimize-viewport-for-mobile-for-faster-interactions-debugbear/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://www.debugbear.com/blog/optimize-viewport-for-mobile&#34;&gt;How to Optimize Viewport for Mobile for Faster Interactions | DebugBear&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;If the viewport isn&amp;rsquo;t configured properly (e.g., the meta tag has a fixed value), mobile browsers delay all responses by up to 300 milliseconds. As a result, users will have to wait after each tap, the UI will feel sluggish, and Interaction to Next Paint (INP) scores will increase dramatically.&lt;/p&gt;
&lt;/blockquote&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/how-to-optimize-viewport-for-mobile-for-faster-interactions-debugbear/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Import external stylesheet into a layer</title>
      <link>https://www.brandonpugh.com/til/css/import-stylesheet-layer/</link>
      <pubDate>Wed, 22 Oct 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/css/import-stylesheet-layer/</guid>
      <description>&lt;p&gt;I&amp;rsquo;m working on a legacy project that&amp;rsquo;s stuck on v3 of bootstrap and just loads the full minified css file.
We wanted to make it a bit easier to override some of the builtin styles and figured that the new &lt;a href=&#34;https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/At-rules/@layer&#34;&gt;@layer&lt;/a&gt; feature of CSS would be perfect.&lt;/p&gt;
&lt;p&gt;I didn&amp;rsquo;t want to change too much about the stylesheets were aren&amp;rsquo;t and thankfully it turns out you can import a stylesheet into a layer:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-html&#34; data-lang=&#34;html&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;link&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;href&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;https://ourcdn.com/content/css/bootstrap.min.css&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c&#34;&gt;&amp;lt;!-- becomes ↓↓↓ --&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;style&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;@&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;nt&#34;&gt;url&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;https://ourcdn.com/content/css/bootstrap.min.css&amp;#34;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;nt&#34;&gt;layer&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;bootstrap&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;style&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The main downside is the &lt;code&gt;@import&lt;/code&gt; rule doesn&amp;rsquo;t support &lt;a href=&#34;https://developer.mozilla.org/en-US/docs/Web/Security/Defenses/Subresource_Integrity&#34;&gt;Subresource Integrity&lt;/a&gt; so you&amp;rsquo;ll want to make sure it&amp;rsquo;s a trusted source.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/css/import-stylesheet-layer/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Over 100 VS Code Extensions Exposed Developers to Hidden Supply Chain Risks</title>
      <link>https://www.brandonpugh.com/links/over-100-vs-code-extensions-exposed-developers-to-hidden-supply-chain-risks/</link>
      <pubDate>Mon, 20 Oct 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/links/over-100-vs-code-extensions-exposed-developers-to-hidden-supply-chain-risks/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://thehackernews.com/2025/10/over-100-vs-code-extensions-exposed.html?m=1&#34;&gt;Over 100 VS Code Extensions Exposed Developers to Hidden Supply Chain Risks&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;VS Code users are advised to limit the number of installed extensions, scrutinize extensions prior to downloading them, and weigh the pros and cons of enabling auto-updates&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This is the approach I&amp;rsquo;ve been taking and being more selective with what I install in general.
This also applies to browser extensions.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/over-100-vs-code-extensions-exposed-developers-to-hidden-supply-chain-risks/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>The Elements of Eloquence: How to Turn the Perfect English Phrase</title>
      <link>https://www.brandonpugh.com/links/the-elements-of-eloquence-secrets-of-the-perfect-turn-of-phrase/</link>
      <pubDate>Mon, 20 Oct 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/links/the-elements-of-eloquence-secrets-of-the-perfect-turn-of-phrase/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://bookshop.org/p/books/the-elements-of-eloquence-secrets-of-the-perfect-turn-of-phrase-mark-forsyth/c1202fbce72c59f5?ean=9780425276181&amp;amp;next=t&#34;&gt;The Elements of Eloquence a book by Mark Forsyth - Bookshop.org US&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;ldquo;Sharp, witty and funny&amp;rdquo; is the best way to describe this book. Really entertaining while also going deep on lots of literary techniques.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://ia.net/topics/summer-reading-july-edition&#34;&gt;via&lt;/a&gt;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/the-elements-of-eloquence-secrets-of-the-perfect-turn-of-phrase/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Scroll-driven Animations</title>
      <link>https://www.brandonpugh.com/links/scroll-driven-animations/</link>
      <pubDate>Sat, 18 Oct 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/links/scroll-driven-animations/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://scroll-driven-animations.style/&#34;&gt;Scroll-driven Animations&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Some really cool demos on this site.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/scroll-driven-animations/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Lowercase head behaves differently in git worktrees</title>
      <link>https://www.brandonpugh.com/til/git/head-is-case-sensitive/</link>
      <pubDate>Sat, 11 Oct 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/git/head-is-case-sensitive/</guid>
      <description>&lt;p&gt;Today I discovered that referencing &lt;code&gt;HEAD&lt;/code&gt; in git commands should technically always be uppercase.&lt;/p&gt;
&lt;p&gt;On case-insensitive file systems you can use lowercase &lt;code&gt;head&lt;/code&gt; most of the time and it just works&amp;hellip; as long as you don&amp;rsquo;t use worktrees.&lt;/p&gt;
&lt;p&gt;If you use &lt;code&gt;head&lt;/code&gt; while in a worktree then it resolves to the head of the &lt;em&gt;main&lt;/em&gt; worktree and not the head of the worktree you&amp;rsquo;re currently in like you would expect.&lt;/p&gt;
&lt;p&gt;I learned this the hard way after getting some very confusing results from the git command I was running.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://stackoverflow.com/questions/48137927/git-head-lowercase-vs-head-uppercase/56346962#56346962&#34;&gt;This Stackoverflow answer&lt;/a&gt; explains exactly why it happens and gives the very sensible advice to &amp;ldquo;Avoid this bad habit: if you don&amp;rsquo;t like typing &lt;code&gt;HEAD&lt;/code&gt; in all uppercase, use &lt;code&gt;@&lt;/code&gt;&amp;rdquo;.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/git/head-is-case-sensitive/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>You can use C# records in .NET Framework 4.x</title>
      <link>https://www.brandonpugh.com/til/csharp/records-framework-4x/</link>
      <pubDate>Sat, 20 Sep 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/csharp/records-framework-4x/</guid>
      <description>&lt;p&gt;Today I learned that you can use C# records that were introduced in C# 9 even if you&amp;rsquo;re not on .NET Core yet.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://blog.ndepend.com/using-c9-record-and-init-property-in-your-net-framework-4-x-net-standard-and-net-core-projects/&#34;&gt;NDepend has a post&lt;/a&gt; on how to do this which is slightly more involved.&lt;/p&gt;
&lt;p&gt;But per this &lt;a href=&#34;https://stackoverflow.com/a/65663416/1715138&#34;&gt;Stack Overflow answer&lt;/a&gt;, all I did was add a file with the following:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-cs&#34; data-lang=&#34;cs&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;namespace&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;System.Runtime.CompilerServices&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt; &lt;span class=&#34;kd&#34;&gt;internal&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;class&lt;/span&gt; &lt;span class=&#34;nc&#34;&gt;IsExternalInit&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;and that worked.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;ve been using them in unit tests like &lt;a href=&#34;https://josef.codes/using-records-when-implementing-the-builder-pattern-in-c-sharp/&#34;&gt;this post&lt;/a&gt; describes.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/csharp/records-framework-4x/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>The SIFT method</title>
      <link>https://www.brandonpugh.com/links/the-sift-method/</link>
      <pubDate>Mon, 08 Sep 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/links/the-sift-method/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://simonwillison.net/2025/Sep/7/the-sift-method/#atom-blogmarks&#34;&gt;The SIFT method&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The SIFT method is &amp;ldquo;an evaluation strategy developed by digital literacy expert, Mike Caulfield, to help determine whether online content can be trusted for credible or reliable sources of information.&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I&amp;rsquo;m with Simon on this being a useful reference to point folks to and formalizes what I&amp;rsquo;ve roughly been doing informally for some time now.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/the-sift-method/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Git Notes: git&#39;s coolest, most unloved­ feature</title>
      <link>https://www.brandonpugh.com/links/git-notes-git-coolest-most-unloved-feature/</link>
      <pubDate>Thu, 04 Sep 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/links/git-notes-git-coolest-most-unloved-feature/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://tylercipriani.com/blog/2022/11/19/git-notes-gits-coolest-most-unloved-feature/&#34;&gt;Git Notes: git&amp;rsquo;s coolest, most unloved­ feature - Tyler Cipriani&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It would be pretty cool if this feature was given some love. Apparently &lt;a href=&#34;https://forgejo.org/2025-01-release-v10-0/#new-features&#34;&gt;Forgejo&lt;/a&gt; now has first-class support for it.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/git-notes-git-coolest-most-unloved-feature/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>The History And Future Of Regular Expressions In JavaScript</title>
      <link>https://www.brandonpugh.com/links/regexes-got-good-the-history-and-future-of-regular-expressions-in-javascript/</link>
      <pubDate>Thu, 04 Sep 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/links/regexes-got-good-the-history-and-future-of-regular-expressions-in-javascript/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://www.smashingmagazine.com/2024/08/history-future-regular-expressions-javascript/&#34;&gt;Regexes Got Good: The History And Future Of Regular Expressions In JavaScript — Smashing Magazine&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://www.stefanjudis.com/blog/web-weekly-167/&#34;&gt;via&lt;/a&gt;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/regexes-got-good-the-history-and-future-of-regular-expressions-in-javascript/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Github Profile Header Generator</title>
      <link>https://www.brandonpugh.com/links/github-profile-header-generator/</link>
      <pubDate>Mon, 01 Sep 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/links/github-profile-header-generator/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://leviarista.github.io/github-profile-header-generator/&#34;&gt;Github Profile Header Generator&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This looks like it could be handy.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/github-profile-header-generator/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Security Alert | NX Compromised to Steal Wallets and Credentials</title>
      <link>https://www.brandonpugh.com/links/security-alert-nx-compromised-to-steal-wallets-and-credentials/</link>
      <pubDate>Mon, 01 Sep 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/links/security-alert-nx-compromised-to-steal-wallets-and-credentials/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://semgrep.dev/blog/2025/security-alert-nx-compromised-to-steal-wallets-and-credentials/&#34;&gt;Security Alert | NX Compromised to Steal Wallets and Credentials | Semgrep&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Another day, another supply chain compromise&amp;hellip;&lt;/p&gt;
&lt;p&gt;What&amp;rsquo;s interesting about this incident, aside from how popular Nx is, is the use of AI.&lt;/p&gt;
&lt;p&gt;First, the code that allowed Nx to be compromised was generated by Claude Code and reviewed by an AI bot.
You can see &lt;a href=&#34;https://github.com/nrwl/nx/pull/32458/files#diff-0f55b87380c49811ff502d3f6b33e35e26dd5c22a69880c4415f6438a9f73672R26-R38&#34;&gt;the PR that introduced the vulnerability&lt;/a&gt; was meant
to enforce PR titles follow convention, but it just takes the arbitrary text from the PR on the &lt;em&gt;public internet&lt;/em&gt; and throws it into bash without any sanitization.
So there&amp;rsquo;s a good chance it wasn&amp;rsquo;t actually reviewed by a person.
Secondly, the malware that was later run on devs&amp;rsquo; machines, tries to use tools like Claude Code to help it find secrets.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://pivot-to-ai.com/2025/08/29/vibe-coded-build-system-nx-gets-hacked-steals-vibe-coders-crypto/&#34;&gt;A more cynical take&lt;/a&gt;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/security-alert-nx-compromised-to-steal-wallets-and-credentials/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>You can backup your git stashes</title>
      <link>https://www.brandonpugh.com/til/git/backup-stashes/</link>
      <pubDate>Fri, 29 Aug 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/git/backup-stashes/</guid>
      <description>&lt;p&gt;As of Git &lt;a href=&#34;https://github.blog/open-source/git/highlights-from-git-2-51/&#34;&gt;2.51&lt;/a&gt; there is now a process for backing up your git stashes.&lt;/p&gt;
&lt;p&gt;The gist of it is there is now &lt;code&gt;stash export&lt;/code&gt; command to export your stashes as a single reference and push them to a remote:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git stash &lt;span class=&#34;nb&#34;&gt;export&lt;/span&gt; --to-ref refs/stashes/my-stash
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git push origin refs/stashes/my-stash
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;and then on another machine or a different clone of the repo:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git fetch origin &lt;span class=&#34;s1&#34;&gt;&amp;#39;+refs/stashes/*:refs/stashes/*&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git stash import refs/stashes/my-stash
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Unfortunately this process isn&amp;rsquo;t that great for regular backups but can be useful if you need easily move lots stashes to another machine.
For one off stashes though, it might be easier to create a &lt;a href=&#34;https://www.brandonpugh.com/til/git/apply-patch/&#34;&gt;patch file&lt;/a&gt;.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/git/backup-stashes/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>If you&#39;re remote, ramble</title>
      <link>https://www.brandonpugh.com/links/if-you-re-remote-ramble/</link>
      <pubDate>Sat, 23 Aug 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/links/if-you-re-remote-ramble/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://stephango.com/ramblings&#34;&gt;If you&amp;rsquo;re remote, ramble&lt;/a&gt;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/if-you-re-remote-ramble/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>One simple trick to make your screenshots 80% smaller</title>
      <link>https://www.brandonpugh.com/links/one-simple-trick-to-make-your-screenshots-80-smaller/</link>
      <pubDate>Sat, 23 Aug 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/links/one-simple-trick-to-make-your-screenshots-80-smaller/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://about.gitlab.com/blog/simple-trick-for-smaller-screenshots/&#34;&gt;One simple trick to make your screenshots 80% smaller&lt;/a&gt;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/one-simple-trick-to-make-your-screenshots-80-smaller/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>How to Surf the Web in 2025, and Why You Should</title>
      <link>https://www.brandonpugh.com/links/how-to-surf-the-web-in-2025-and-why-you-should/</link>
      <pubDate>Mon, 18 Aug 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/links/how-to-surf-the-web-in-2025-and-why-you-should/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://www.raptitude.com/2025/06/how-to-surf-the-web-in-2025-and-why-you-should/&#34;&gt;How to Surf the Web in 2025, and Why You Should&lt;/a&gt;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/how-to-surf-the-web-in-2025-and-why-you-should/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Creating a scroll-spy with 2 lines of CSS</title>
      <link>https://www.brandonpugh.com/links/creating-a-scroll-spy-with-2-lines-of-css/</link>
      <pubDate>Sun, 17 Aug 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/links/creating-a-scroll-spy-with-2-lines-of-css/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://una.im/scroll-target-group/&#34;&gt;una.im | Creating a scroll-spy with 2 lines of CSS&lt;/a&gt;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/creating-a-scroll-spy-with-2-lines-of-css/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>The future of large files in Git is Git</title>
      <link>https://www.brandonpugh.com/links/the-future-of-large-files-in-git-is-git-tyler-cipriani/</link>
      <pubDate>Sat, 16 Aug 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/links/the-future-of-large-files-in-git-is-git-tyler-cipriani/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://tylercipriani.com/blog/2025/08/15/git-lfs/&#34;&gt;The future of large files in Git is Git - Tyler Cipriani&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;ve so far managed to avoid having to deal with Git LFS so I&amp;rsquo;m excited to see that the Git team is working on a better solution.&lt;/p&gt;
&lt;p&gt;In the mean time I&amp;rsquo;ll have to try the tip that Tyler gives with git partial clone:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git clone --filter&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;blobs:size=100k&amp;#39;&lt;/span&gt; &amp;lt;repo&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/the-future-of-large-files-in-git-is-git-tyler-cipriani/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Friends at Last: Tailwind &amp; CSS…whodathunkit?!</title>
      <link>https://www.brandonpugh.com/links/friends-at-last-tailwind-css-whodathunkit/</link>
      <pubDate>Tue, 12 Aug 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/links/friends-at-last-tailwind-css-whodathunkit/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://thathtml.blog/2025/08/tailwind-and-css-friends-at-last/&#34;&gt;Friends at Last: Tailwind &amp;amp; CSS…whodathunkit?!&lt;/a&gt;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/friends-at-last-tailwind-css-whodathunkit/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>ICS end dates are exclusive</title>
      <link>https://www.brandonpugh.com/til/google/ics-end-dates-exclusive/</link>
      <pubDate>Tue, 05 Aug 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/google/ics-end-dates-exclusive/</guid>
      <description>&lt;p&gt;Today I learned that per the spec, the &lt;code&gt;DTEND&lt;/code&gt; value in an ICS file is &lt;em&gt;exclusive&lt;/em&gt; for all-day events.&lt;/p&gt;
&lt;p&gt;It makes sense but it&amp;rsquo;s &lt;em&gt;not&lt;/em&gt; how most people think of date ranges.&lt;/p&gt;
&lt;p&gt;I ran into this while making a small node script that takes a json array of events and generates an ICS file.
This has been the most convenient way I&amp;rsquo;ve found to quickly bulk create events in Google Calendar.
The only issue is the multi-day events were coming up a day short.&lt;/p&gt;
&lt;p&gt;So for example if Spring Break is from March 16th - March 20th, then the end date would need to be March 21st:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-inf&#34; data-lang=&#34;inf&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;na&#34;&gt;DTSTART;VALUE&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;DATE:20260316&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;na&#34;&gt;DTEND;VALUE&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;DATE:20260321&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Pro tip: if you&amp;rsquo;re importing a lot of events into Google Calendar, create a brand new &amp;ldquo;test&amp;rdquo; calendar and import the &lt;code&gt;.ics&lt;/code&gt; file into that calendar first to test it out that way if something is messed up you can just delete the calendar and try again.
Otherwise you have to go through and manually find all the events that got added.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/google/ics-end-dates-exclusive/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Do not download the app, use the website</title>
      <link>https://www.brandonpugh.com/links/do-not-download-the-app-use-the-website/</link>
      <pubDate>Thu, 31 Jul 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/links/do-not-download-the-app-use-the-website/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://idiallo.com/blog/dont-download-apps?utm_source=cassidoo&amp;amp;utm_medium=email&amp;amp;utm_campaign=simplicity-is-the-glory-of-expression-walt-whitman&#34;&gt;Do not download the app, use the website&lt;/a&gt;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/do-not-download-the-app-use-the-website/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>In praise of the ellipsis</title>
      <link>https://www.brandonpugh.com/links/in-praise-of-the-ellipsis/</link>
      <pubDate>Mon, 28 Jul 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/links/in-praise-of-the-ellipsis/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://engelsbergideas.com/notebook/in-praise-of-the-ellipsis/&#34;&gt;In praise of the ellipsis&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The ellipsis is an irreplaceable method for showing disdain, avoiding the subject, offering a knowing delay, bringing a sense of speech to the page, or just being plain snarky. It allows you to pause and then move on without the need to tell anyone why…&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;a href=&#34;https://starbreaker.org/bookmarks/index.html&#34;&gt;via&lt;/a&gt;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/in-praise-of-the-ellipsis/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>The link router pattern</title>
      <link>https://www.brandonpugh.com/links/the-link-router-pattern/</link>
      <pubDate>Mon, 28 Jul 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/links/the-link-router-pattern/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://jamesg.blog/2025/07/19/link-router-pattern&#34;&gt;The link router pattern | James&amp;rsquo; Coffee Blog&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;James shares some cool examples of what he calls &amp;ldquo;link router&amp;rdquo; sites, including his own &lt;a href=&#34;https://subscribeopenly.net/&#34;&gt;Subscribe Openly&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I agree with James that it is frustrating that the onus is on the person sharing the link.
I like to use &lt;a href=&#34;https://pods.link&#34;&gt;pods.link&lt;/a&gt; and &lt;a href=&#34;https://song.link/&#34;&gt;songs.link&lt;/a&gt; because that&amp;rsquo;s the experience I would prefer to have but I don&amp;rsquo;t think I&amp;rsquo;ve ever gotten one of those links from someone.&lt;/p&gt;
&lt;p&gt;It does feel like it wouldn&amp;rsquo;t be &lt;em&gt;too&lt;/em&gt; much work to build a type service like what he describes&amp;hellip; will definitely have to have a think on it&amp;hellip;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/the-link-router-pattern/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>How I Use Kagi</title>
      <link>https://www.brandonpugh.com/links/how-i-use-kagi/</link>
      <pubDate>Fri, 25 Jul 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/links/how-i-use-kagi/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://flamedfury.com/posts/how-i-use-kagi/&#34;&gt;How I Use Kagi&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;ve also been a fan of Kagi so far&amp;hellip; this makes me want to do my own writeup&amp;hellip;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/how-i-use-kagi/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>A Friendly Introduction to SVG</title>
      <link>https://www.brandonpugh.com/links/a-friendly-introduction-to-svg/</link>
      <pubDate>Wed, 23 Jul 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/links/a-friendly-introduction-to-svg/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://www.joshwcomeau.com/svg/friendly-introduction-to-svg/&#34;&gt;A Friendly Introduction to SVG • Josh W. Comeau&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This is another great tutorial from Josh on the basics of SVG markup!&lt;/p&gt;
&lt;p&gt;If you want to go further, this is an awesome interactive site for understanding SVG paths:&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://www.nan.fyi/svg-paths&#34;&gt;Understanding SVG paths&lt;/a&gt;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/a-friendly-introduction-to-svg/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>An Undefeated Pull Request Template</title>
      <link>https://www.brandonpugh.com/links/an-undefeated-pull-request-template/</link>
      <pubDate>Wed, 23 Jul 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/links/an-undefeated-pull-request-template/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://ashleemboyer.com/blog/pull-request-template/&#34;&gt;An Undefeated Pull Request Template | Ashlee M Boyer&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This is probably the best and most thorough advice I&amp;rsquo;ve seen on how to write good pull request descriptions.&lt;/p&gt;
&lt;p&gt;So many great bits of advice and things I wanted to +1.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The first goal of a pull request description is to make code review as straightforward and frictionless as possible.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;Even if everyone knows the code, you’re saving them time by doing the thinking for them. The code is still fresh in your mind whereas they might need to take a few minutes to recall how the feature works.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;The goal is to preemptively answer common high-level questions that come up in code review.&lt;/p&gt;
&lt;/blockquote&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/an-undefeated-pull-request-template/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Apply a patch file</title>
      <link>https://www.brandonpugh.com/til/git/apply-patch/</link>
      <pubDate>Tue, 22 Jul 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/git/apply-patch/</guid>
      <description>&lt;p&gt;Today I learned how to create and apply a patch file with Git.&lt;/p&gt;
&lt;p&gt;If you want to quickly create patch a file from your current changes just run:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git diff &amp;gt; mypatch.patch
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;or if like me you just want specific changes then stage them and then run:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git diff --cached &amp;gt; mypatch.patch
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;then to apply the changes all you need is &lt;code&gt;git apply mychanges.patch&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Unfortunately if there are conflicts then git will just give you an error: &lt;code&gt;patch does not apply&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;I found if you add the following parameters it&amp;rsquo;ll be more likely to apply cleanly and if not then it&amp;rsquo;ll add conflict markers to the files and you can try to fix the conflicts and generate a new patch:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git apply --3way --ignore-space-change --ignore-whitespace mychanges.patch
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;I&amp;rsquo;ve been using this as a more convenient way to frequently re-apply changes I need locally compared to something like &lt;a href=&#34;https://www.brandonpugh.com/til/git/skip-worktree-ignore-modified-files/&#34;&gt;&lt;code&gt;--skip-worktree&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;ve also found it convenient for sending some quick changes to a teammate.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/git/apply-patch/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>RSS is (not) dead (yet)</title>
      <link>https://www.brandonpugh.com/links/rss-is-not-dead-yet/</link>
      <pubDate>Sun, 20 Jul 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/links/rss-is-not-dead-yet/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://audmcname.com/comics/rss-is-not-dead-yet/&#34;&gt;RSS is (not) dead (yet) (NED #3) – audra mcnamee&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;A nice little history of RSS in comic form.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/rss-is-not-dead-yet/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Tips for making regular expressions easier to use in JavaScript</title>
      <link>https://www.brandonpugh.com/links/tips-for-making-regular-expressions-easier-to-use-in-javascript/</link>
      <pubDate>Wed, 16 Jul 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/links/tips-for-making-regular-expressions-easier-to-use-in-javascript/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://2ality.com/2025/06/javascript-regexp-tips.html&#34;&gt;Tips for making regular expressions easier to use in JavaScript&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Some great tips in this article that I hadn&amp;rsquo;t seen before.
I probably wouldn&amp;rsquo;t pull in a dependency for it unless I was doing some pretty regex heavy work but good to be aware of.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/tips-for-making-regular-expressions-easier-to-use-in-javascript/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>New Date(&#39;wtf&#39;) – How well do you know JavaScript&#39;s Date class?</title>
      <link>https://www.brandonpugh.com/links/new-date-wtf/</link>
      <pubDate>Sun, 13 Jul 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/links/new-date-wtf/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://jsdate.wtf/&#34;&gt;new Date(&amp;ldquo;wtf&amp;rdquo;)&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;I scored 5/28 on &lt;a href=&#34;https://jsdate.wtf&#34;&gt;https://jsdate.wtf&lt;/a&gt; and all I got was this lousy text to share on social media.&lt;/p&gt;
&lt;/blockquote&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/new-date-wtf/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Pokémon Cards CSS Holographic Effect</title>
      <link>https://www.brandonpugh.com/links/pok-mon-cards-css-holographic-effect/</link>
      <pubDate>Sun, 13 Jul 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/links/pok-mon-cards-css-holographic-effect/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://poke-holo.simey.me/&#34;&gt;Pokémon Cards CSS Holographic Effect&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This shows some super impressive effects you can do with CSS!
&lt;a href=&#34;https://rknight.me/blog/weeknote-1955/&#34;&gt;via&lt;/a&gt;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/pok-mon-cards-css-holographic-effect/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Share git configuration in repo</title>
      <link>https://www.brandonpugh.com/til/git/share-git-config-repo/</link>
      <pubDate>Sat, 12 Jul 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/git/share-git-config-repo/</guid>
      <description>&lt;p&gt;Today I learned that you can share a git config file in a repository for easily sharing certain local config settings with your team.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git config --local include.path ../.gitconfig
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This adds the following to your local &lt;code&gt;config&lt;/code&gt;&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-properties&#34; data-lang=&#34;properties&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;err&#34;&gt;[include]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;na&#34;&gt;path&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s&#34;&gt;../.gitconfig&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;and will load any config values set in that file.&lt;/p&gt;
&lt;p&gt;This has a couple advantages in that we only have to run a single git
command and if we need to make future changes we only have to update the
config file instead of requiring devs to run additional commands to get
the update.&lt;/p&gt;
&lt;p&gt;These are a couple of common settings I use on a team:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-properties&#34; data-lang=&#34;properties&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;err&#34;&gt;[core]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;na&#34;&gt;hooksPath&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s&#34;&gt;./src/git-hooks/&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;err&#34;&gt;[blame]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;na&#34;&gt;ignoreRevsFile&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s&#34;&gt;.git-blame-ignore-revs&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/git/share-git-config-repo/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Quickly Fix A Misspelled Word</title>
      <link>https://www.brandonpugh.com/til/vim/quickly-fix-misspelled-word/</link>
      <pubDate>Sun, 06 Jul 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/vim/quickly-fix-misspelled-word/</guid>
      <description>&lt;p&gt;I just learned that you can have automatically fix a misspelled word with the top suggestion by typing:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-vim&#34; data-lang=&#34;vim&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;m&#34;&gt;1&lt;/span&gt;z&lt;span class=&#34;p&#34;&gt;=&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This is opposed to the regular &lt;code&gt;z=&lt;/code&gt; command for opening the regular list of spelling correction options.&lt;/p&gt;
&lt;p&gt;Like &lt;a href=&#34;https://github.com/jbranchaud/til/blob/master/vim/quickly-fix-a-misspelled-word.md&#34;&gt;Josh&lt;/a&gt; who I learned this from, I usually pick the first option so this is a bit more convenient.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/vim/quickly-fix-misspelled-word/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>REA&#39;s AI Policy - Room Escape Artist</title>
      <link>https://www.brandonpugh.com/links/rea-s-ai-policy/</link>
      <pubDate>Sun, 06 Jul 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/links/rea-s-ai-policy/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://roomescapeartist.com/2025/06/28/reas-ai-policy/&#34;&gt;REA&amp;rsquo;s AI Policy - Room Escape Artist&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m a fan of escape rooms and I recently discovered this great website dedicated to them.
Aside from their regular posts however, I appreciated this recent post detailing in what ways if at all they use AI.
It seems like a reasonable approach for an online publication but also speaks to the sad state of the AI slob-riddled internet these days that they have to make a post like this.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/rea-s-ai-policy/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Adding test description for data-driven tests in xUnit</title>
      <link>https://www.brandonpugh.com/links/adding-test-description-for-data-driven-tests-in-xunit/</link>
      <pubDate>Tue, 01 Jul 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/links/adding-test-description-for-data-driven-tests-in-xunit/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://steven-giesel.com/blogPost/80a53df4-a867-4202-916c-08e980f02505&#34;&gt;Adding test description for data-driven tests in xUnit&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This looks like a cool that I&amp;rsquo;ll likely have a use for soon.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/adding-test-description-for-data-driven-tests-in-xunit/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>How to Keep Up With New CSS Features</title>
      <link>https://www.brandonpugh.com/links/how-to-keep-up-with-new-css-features/</link>
      <pubDate>Tue, 01 Jul 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/links/how-to-keep-up-with-new-css-features/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://css-tricks.com/how-to-keep-up-with-new-css-features/&#34;&gt;How to Keep Up With New CSS Features&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This is nice list of resources to follow if you want to keep up to date with all the latest CSS features.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://www.stefanjudis.com/blog/web-weekly-161/&#34;&gt;via&lt;/a&gt;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/how-to-keep-up-with-new-css-features/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Sudo for Windows</title>
      <link>https://www.brandonpugh.com/til/windows/sudo-for-windows/</link>
      <pubDate>Wed, 25 Jun 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/windows/sudo-for-windows/</guid>
      <description>&lt;p&gt;I just learned that Windows now has a builtin &lt;code&gt;sudo&lt;/code&gt; command.
You need to enable it from the Windows developer settings and then you use it similar to &lt;code&gt;sudo&lt;/code&gt; on other operating systems.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;ve been using &lt;a href=&#34;https://gerardog.github.io/gsudo/docs/gsudo-vs-sudo&#34;&gt;gsudo&lt;/a&gt; for some time and I still prefer as it overall has a nicer experience and is more fully featured, but if you&amp;rsquo;re looking for one less thing to install then the builtin sudo is decent.&lt;/p&gt;
&lt;p&gt;One thing I ran into though is in the default &amp;ldquo;new window&amp;rdquo; mode, if you want to run a powershell script elevated then you need to run it as:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-powershell&#34; data-lang=&#34;powershell&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;sudo&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;pwsh&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;.\&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;build&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;py&#34;&gt;ps1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/windows/sudo-for-windows/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Working with stacked branches in git (Part 2)</title>
      <link>https://www.brandonpugh.com/links/working-with-stacked-branches-in-git-part-2/</link>
      <pubDate>Wed, 25 Jun 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/links/working-with-stacked-branches-in-git-part-2/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://andrewlock.net/working-with-stacked-branches-in-git-part-2/&#34;&gt;Working with stacked branches in git (Part 2)&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Andrew as always has a very handy and thorough post on some advanced git techniques.
I&amp;rsquo;m also a fan of stacked branches but it&amp;rsquo;s definitely tricky to get the flow right without some extra tooling help.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/working-with-stacked-branches-in-git-part-2/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>PocketCal Build Log</title>
      <link>https://www.brandonpugh.com/links/pocketcal-build-log/</link>
      <pubDate>Tue, 24 Jun 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/links/pocketcal-build-log/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://cassidoo.co/post/pocketcal-build-log/&#34;&gt;PocketCal Build Log&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Cassidy built a cool little web app for sharing dates called &lt;a href=&#34;https://pocketcal.com/&#34;&gt;pocket cal&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s open source and it store the data in the URL which is pretty nifty.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/pocketcal-build-log/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Why we are still using 88x31 buttons</title>
      <link>https://www.brandonpugh.com/links/why-we-are-still-using-88x31-buttons/</link>
      <pubDate>Tue, 24 Jun 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/links/why-we-are-still-using-88x31-buttons/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://ultrasciencelabs.com/lab-notes/why-we-are-still-using-88x31-buttons?utm_source=cassidoo&amp;amp;utm_medium=email&amp;amp;utm_campaign=imagination-is-more-important-than-knowledge&#34;&gt;Why we are still using 88x31 buttons - ultrasciencelabs&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;A fun bit of Internet history that was a bit before I started getting on the Web but I&amp;rsquo;ve been enjoying seeing their resurgence.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/why-we-are-still-using-88x31-buttons/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Announcing a new IDE for PostgreSQL in VS Code</title>
      <link>https://www.brandonpugh.com/links/announcing-a-new-ide-for-postgresql-in-vs-code/</link>
      <pubDate>Sun, 22 Jun 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/links/announcing-a-new-ide-for-postgresql-in-vs-code/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://techcommunity.microsoft.com/blog/adforpostgresql/announcing-a-new-ide-for-postgresql-in-vs-code-from-microsoft/4414648&#34;&gt;Announcing a new IDE for PostgreSQL in VS Code from Microsoft | Microsoft Community Hub&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This looks like it could be a decent replacement for azure data studio.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/announcing-a-new-ide-for-postgresql-in-vs-code/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Use skip-worktree to ignore modified files</title>
      <link>https://www.brandonpugh.com/til/git/skip-worktree-ignore-modified-files/</link>
      <pubDate>Fri, 20 Jun 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/git/skip-worktree-ignore-modified-files/</guid>
      <description>&lt;p&gt;Today I learned about the &lt;code&gt;--skip-worktree&lt;/code&gt; command in git which will treat a file like it hasn&amp;rsquo;t been modified.
This is useful if you have to modify a file locally but don&amp;rsquo;t ever want to commit it (config files are a common scenario).&lt;/p&gt;
&lt;p&gt;Like me, you may have seen &lt;code&gt;--assume-unchanged&lt;/code&gt; used in this way but that&amp;rsquo;s not what it&amp;rsquo;s meant for since it&amp;rsquo;s &amp;ldquo;designed for cases where it is expensive to check whether a group of files have been modified&amp;rdquo;.
As a result you&amp;rsquo;re likely to lose the changes you have made to those files.
&lt;a href=&#34;https://web.archive.org/web/20200604104042/http://fallengamer.livejournal.com/93321.html&#34;&gt;This post&lt;/a&gt; shows a good summary of the outcomes of common operations with each command.&lt;/p&gt;
&lt;p&gt;The advantage of &lt;code&gt;--skip-worktree&lt;/code&gt; is that git really tries to preserve the changes you&amp;rsquo;ve made to those files.
This works pretty well if the files aren&amp;rsquo;t changed very often but it can be pretty tedious if they change frequently even when those changes wouldn&amp;rsquo;t have caused merge conflicts as git will refuse to modify the files.&lt;/p&gt;
&lt;p&gt;Say for example you need to make a change to a config file for your environment. You would run:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git update-index --skip-worktree config/local.conf
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;If changes are rarely committed to this than you may not have to think about it again.&lt;/p&gt;
&lt;p&gt;However, if you need to switch to a branch with changes to this file then you&amp;rsquo;ll get an error like:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;error: Your local changes to the following files would be overwritten by checkout:
path/to/file&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;If you run &lt;code&gt;git stash&lt;/code&gt; now, that file won&amp;rsquo;t be affected.&lt;/p&gt;
&lt;p&gt;So now you need to run:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git update-index --no-skip-worktree config/local.conf
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# now you can run stash&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git stash
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git switch other-branch
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git stash pop
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# you&amp;#39;ll need to resolve conflicts if any otherwise skip the file again&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git update-index --skip-worktree config/local.conf
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# you can run this to see which files have skip-worktree set&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git ls-files -v &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; grep &lt;span class=&#34;s1&#34;&gt;&amp;#39;^S&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Depending on how frequently you have to deal with this, you&amp;rsquo;ll quickly end up making an alias or script for it.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/git/skip-worktree-ignore-modified-files/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Quickly react to recent message in Slack</title>
      <link>https://www.brandonpugh.com/til/writing/react-recent-slack-message/</link>
      <pubDate>Wed, 18 Jun 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/writing/react-recent-slack-message/</guid>
      <description>&lt;p&gt;Today I learned that you can react to the most recent message just by adding &lt;code&gt;+&lt;/code&gt;.
So you can type &lt;code&gt;+:thumbsup:&lt;/code&gt; as the message it add it as a reaction to the most recent message instead of an individual message.&lt;/p&gt;
&lt;p&gt;You can also type &lt;code&gt;⌘⇧\&lt;/code&gt; or &lt;code&gt;ctrl⇧\&lt;/code&gt; to open the emoji picker on the message.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/writing/react-recent-slack-message/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Vim for React Developers</title>
      <link>https://www.brandonpugh.com/links/vim-for-react-developers/</link>
      <pubDate>Wed, 18 Jun 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/links/vim-for-react-developers/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://vimforreactdevs.com/&#34;&gt;Vim for React Developers&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;For anyone who is vim-curious, I think this is a cool approach to learning practical uses for vim.
The &amp;ldquo;course&amp;rdquo; is just a react source file (&lt;a href=&#34;https://github.com/leerob/vim-for-react-devs/blob/main/public/course.tsx&#34;&gt;direct link&lt;/a&gt;) with the instructions as comments describing how to modify the various bits of code throughout the file.
Even though the file is a react component, examples are largely just as applicable to most programming languages (especially those with c-like syntax) as well as editing regular HTML.&lt;/p&gt;
&lt;p&gt;I would suggest though, if you&amp;rsquo;ve never used vim before that an easier setup to dip your toes in would be to install to the &lt;a href=&#34;https://marketplace.visualstudio.com/items?itemName=vscodevim.vim&#34;&gt;vim extension&lt;/a&gt; for vscode (or for &lt;a href=&#34;https://marketplace.visualstudio.com/items?itemName=JaredParMSFT.VsVim2022Preview&#34;&gt;Visual Studio&lt;/a&gt;).&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/vim-for-react-developers/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Move a line with :m</title>
      <link>https://www.brandonpugh.com/til/vim/move-line/</link>
      <pubDate>Tue, 17 Jun 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/vim/move-line/</guid>
      <description>&lt;p&gt;Today I learned that you can move the current line up or down with &lt;code&gt;:m&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;:m +1 - moves down 1 line&lt;/p&gt;
&lt;p&gt;:m -2 - move up 2 lines&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m used to using &lt;code&gt;dd&lt;/code&gt; followed by a movement and then &lt;code&gt;p&lt;/code&gt; but I may try this alternate method.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/vim/move-line/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>New, Simpler Solution File Format</title>
      <link>https://www.brandonpugh.com/links/new-simpler-solution-file-format/</link>
      <pubDate>Tue, 17 Jun 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/links/new-simpler-solution-file-format/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://devblogs.microsoft.com/visualstudio/new-simpler-solution-file-format/&#34;&gt;New, Simpler Solution File Format - Visual Studio Blog&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This looks like a nice improvement over the old proprietary format, along the same vein as the updated &lt;code&gt;.csproj&lt;/code&gt; format.
It&amp;rsquo;s xml based and looks much simpler to edit.
What&amp;rsquo;s nice though is it looks like you only need to make sure you&amp;rsquo;re using the latest versions of tooling to migrate over to it.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/new-simpler-solution-file-format/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Safari at WWDC &#39;25: The Ghost of Christmas Past</title>
      <link>https://www.brandonpugh.com/links/safari-at-wwdc-25-the-ghost-of-christmas-past/</link>
      <pubDate>Mon, 16 Jun 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/links/safari-at-wwdc-25-the-ghost-of-christmas-past/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://infrequently.org/2025/06/the-ghost-of-christmas-past/&#34;&gt;Safari at WWDC &amp;lsquo;25: The Ghost of Christmas Past&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;So to recap: Apple&amp;rsquo;s Developer Relations folks want you to be grateful to Cupertino for unlocking access to features that &lt;em&gt;Apple has been the singular obstacle to.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/safari-at-wwdc-25-the-ghost-of-christmas-past/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Install SQL Server from the command line</title>
      <link>https://www.brandonpugh.com/til/sql-server/install-from-cli/</link>
      <pubDate>Fri, 06 Jun 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/sql-server/install-from-cli/</guid>
      <description>&lt;p&gt;I recently had to setup a new windows dev machine with a local instance of SQL Server and it turns out you can run it completely from the command line although it&amp;rsquo;s not very obvious how.&lt;/p&gt;
&lt;p&gt;Once you &lt;a href=&#34;https://www.microsoft.com/en-us/sql-server/sql-server-downloads&#34;&gt;download the installer&lt;/a&gt; it will extract everything to a folder which contains the &lt;code&gt;SETUP.exe&lt;/code&gt; executable which you can run from the terminal and pass all the options you want instead of clicking through the UI.&lt;/p&gt;
&lt;p&gt;If you&amp;rsquo;re like me and just needed a fairly standard installation for local development, then this should do it:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-powershell&#34; data-lang=&#34;powershell&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;.\&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;SETUP&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;py&#34;&gt;EXE&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;/&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;IACCEPTSQLSERVERLICENSETERMS&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;/&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ACTION&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;install&amp;#34;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;/&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;FEATURES&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;SQLEngine&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;FullText&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;/&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;INSTANCENAME&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;MSSQLSERVER&amp;#34;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;/&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;SQLSYSADMINACCOUNTS&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$env:USERDOMAIN&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;\&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$env:USERNAME&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;/&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;SQLSVCACCOUNT&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;NT Service\MSSQLSERVER&amp;#34;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;/&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;AGTSVCACCOUNT&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;NT Service\SQLSERVERAGENT&amp;#34;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;/&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;SQLSVCINSTANTFILEINIT&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;True&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;/&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;INDICATEPROGRESS&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;/&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Q&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Management studio is no longer included with the main installer but you can use winget: &lt;code&gt;winget install -e --id Microsoft.SQLServerManagementStudio&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;If you need additional features then you need to &lt;a href=&#34;https://learn.microsoft.com/en-us/sql/database-engine/install-windows/install-sql-server-from-the-command-prompt?view=sql-server-ver17#Feature&#34;&gt;look up&lt;/a&gt; the options to set on the &lt;code&gt;/FEATURES&lt;/code&gt; param, like &lt;code&gt;RS&lt;/code&gt; for reporting services.&lt;/p&gt;
&lt;h2 id=&#34;details&#34;&gt;Details&lt;/h2&gt;
&lt;p&gt;This is what the above command does:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;/IACCEPTSQLSERVERLICENSETERMS&lt;/code&gt; - Required to accept the SQL Server license terms.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;/Q&lt;/code&gt; - Runs setup in &lt;strong&gt;quiet mode&lt;/strong&gt;. This is needed otherwise it will just open the regular install UI.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;/ACTION=&amp;quot;install&amp;quot;&lt;/code&gt; - Specify that we want to install vs uninstall or upgrade.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;/FEATURES=SQLEngine,FullText&lt;/code&gt; - Specify which SQL Server components to install:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;SQLEngine&lt;/strong&gt;: The core database engine&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;FullText&lt;/strong&gt;: Full-text search&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;/INSTANCENAME=&amp;quot;MSSQLSERVER&amp;quot;&lt;/code&gt; - &lt;code&gt;&amp;quot;MSSQLSERVER&amp;quot;&lt;/code&gt; is the &lt;strong&gt;default instance name&lt;/strong&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;/SQLSYSADMINACCOUNTS=&amp;quot;$env:USERDOMAIN\$env:USERNAME&amp;quot;&lt;/code&gt; - Use powershell environment variables to set the current user as the sql server admin&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;/SQLSVCACCOUNT=&amp;quot;NT Service\MSSQLSERVER&amp;quot;&lt;/code&gt; - Set the service account for the SQL Server Database Engine service. &lt;code&gt;&amp;quot;NT Service\MSSQLSERVER&amp;quot;&lt;/code&gt; is the common default when using the UI.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;/AGTSVCACCOUNT=&amp;quot;NT Service\SQLSERVERAGENT&amp;quot;&lt;/code&gt; - Sets the account for the &lt;strong&gt;SQL Server Agent service&lt;/strong&gt; (handles scheduled jobs and alerts)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;/SQLSVCINSTANTFILEINIT=True&lt;/code&gt; - Enables &lt;a href=&#34;https://learn.microsoft.com/en-us/sql/relational-databases/databases/database-instant-file-initialization&#34;&gt;&lt;strong&gt;Instant File Initialization&lt;/strong&gt;&lt;/a&gt;, which seems like a worthwhile performance optimization according to the docs.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;/INDICATEPROGRESS&lt;/code&gt; - Shows installation progress in the console window, useful for monitoring the installation status&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Also, you can apparently install from a &lt;a href=&#34;https://learn.microsoft.com/en-us/sql/database-engine/install-windows/install-sql-server-using-a-configuration-file?view=sql-server-ver17&amp;amp;source=recommendations&#34;&gt;configuration file&lt;/a&gt; that the installer can generate for you.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/sql-server/install-from-cli/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Use winget to install Git for Windows with Unix tools</title>
      <link>https://www.brandonpugh.com/til/windows/winget-git/</link>
      <pubDate>Thu, 05 Jun 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/windows/winget-git/</guid>
      <description>&lt;p&gt;For years I&amp;rsquo;ve been using Chocolately for quickly installing git on new Windows and it&amp;rsquo;s pretty handy.
Recently though I looked into doing the same with winget since it comes built into Windows now which makes it easier to just give to the command to a co-worker.&lt;/p&gt;
&lt;p&gt;One thing I always do though is enable the option to add the common linux tools to the path.&lt;/p&gt;
&lt;p&gt;With Chocolately you could just add the &lt;code&gt;/GitAndUnixToolsOnPath&lt;/code&gt; param like this:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;choco install git.install -y --params=&amp;quot;&#39;/GitAndUnixToolsOnPath&#39;&amp;quot;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;It turns out that is a convenience option added to the chocolately package so it took a bit of digging to figure out how do it with winget but I eventually arrived at the following:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;winget install --id Git.Git -e --source winget --custom &#39;/o:PathOption=CmdTools&#39;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;You need the &lt;code&gt;--custom&lt;/code&gt; param for the &lt;a href=&#34;https://learn.microsoft.com/en-us/windows/package-manager/winget/install&#34;&gt;install command&lt;/a&gt; that let&amp;rsquo;s you pass arguments to the git installer.&lt;/p&gt;
&lt;p&gt;Then I just had to reference the handy &lt;a href=&#34;https://gitforwindows.org/silent-or-unattended-installation.html&#34;&gt;docs for the installer&lt;/a&gt; for git for windows and find which &lt;a href=&#34;https://gitforwindows.org/mapping-between-git-installer-gui-settings-and-command-line-arguments.html&#34;&gt;arguments&lt;/a&gt; corresponded to the options I wanted. &lt;code&gt;PathOption=CmdTools&lt;/code&gt; in this case.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/windows/winget-git/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Auto add pull request reviewers</title>
      <link>https://www.brandonpugh.com/til/azure-devops/auto-add-reviewers/</link>
      <pubDate>Tue, 03 Jun 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/azure-devops/auto-add-reviewers/</guid>
      <description>&lt;p&gt;Today I learned that Azure DevOps lets you &lt;a href=&#34;https://learn.microsoft.com/en-us/azure/devops/repos/git/branch-policies?view=azure-devops&amp;amp;tabs=browser#automatically-include-code-reviewers&#34;&gt;automatically include reviewers&lt;/a&gt; for a pull request if modifies certain files.&lt;/p&gt;
&lt;p&gt;This is very similar to Github&amp;rsquo;s &lt;a href=&#34;https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners&#34;&gt;code owners&lt;/a&gt; file with the key difference being that you configure it through the repo setting in Azure DevOps instead of committing a file.&lt;/p&gt;
&lt;p&gt;I find this very useful for example if you&amp;rsquo;re a Front End Architect who wants to be aware of any changes to the UI or if you&amp;rsquo;re a DBA who wants to review any database migrations.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/azure-devops/auto-add-reviewers/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>React, visualized</title>
      <link>https://www.brandonpugh.com/links/react-visualized-react-gg/</link>
      <pubDate>Thu, 29 May 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/links/react-visualized-react-gg/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://react.gg/visualized&#34;&gt;React, visualized&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Some nice animated visualizations of react concepts.
Includes some features from react 19 like actions, transitions, and Server Components.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/react-visualized-react-gg/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>How I configure my Git identities</title>
      <link>https://www.brandonpugh.com/links/how-i-configure-my-git-identities/</link>
      <pubDate>Wed, 28 May 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/links/how-i-configure-my-git-identities/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://www.benji.dog/articles/git-config/&#34;&gt;How I configure my Git identities | benji&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This is pretty cool and I&amp;rsquo;m immediately implementing it!&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/how-i-configure-my-git-identities/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Passkeys for Normal People</title>
      <link>https://www.brandonpugh.com/links/passkeys-for-normal-people/</link>
      <pubDate>Tue, 27 May 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/links/passkeys-for-normal-people/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://www.troyhunt.com/passkeys-for-normal-people/&#34;&gt;Passkeys for Normal People&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This is a pretty good overview of the current state of passkeys with some nice examples of the various ways sites might implement them.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/passkeys-for-normal-people/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Pushing a whole stack of branches with a single Git command</title>
      <link>https://www.brandonpugh.com/links/pushing-a-whole-stack-of-branches-with-a-single-git-command/</link>
      <pubDate>Tue, 20 May 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/links/pushing-a-whole-stack-of-branches-with-a-single-git-command/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://andrewlock.net/pushing-a-whole-stack-of-branches-with-a-single-git-command/&#34;&gt;Pushing a whole stack of branches with a single Git command&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This has been my biggest pain point also with stacked branches and Andrew did the work of creating some git aliases to make this much easier. Thank you!&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/pushing-a-whole-stack-of-branches-with-a-single-git-command/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>The power of the spread and rest syntax in JavaScript</title>
      <link>https://www.brandonpugh.com/links/the-power-of-the-spread-and-rest-syntax-in-javascript-matt-smith/</link>
      <pubDate>Fri, 16 May 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/links/the-power-of-the-spread-and-rest-syntax-in-javascript-matt-smith/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://allthingssmitty.com/2025/05/05/the-power-of-spread-and-rest-patterns-in-javascript.md/&#34;&gt;The power of the spread and rest syntax in JavaScript&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;A quick reference for these two new-ish operators.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/the-power-of-the-spread-and-rest-syntax-in-javascript-matt-smith/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Finding the Joy in Alt Text</title>
      <link>https://www.brandonpugh.com/links/finding-the-joy-in-alt-text-bryn-newell/</link>
      <pubDate>Wed, 14 May 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/links/finding-the-joy-in-alt-text-bryn-newell/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://bryn.codes/writing/the-joy-in-alt-text/&#34;&gt;Finding the Joy in Alt Text | Bryn Newell&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I like Bryan&amp;rsquo;s approach to having some fun with image alt text and as a reminder that good alt text is more than just a basic description.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/finding-the-joy-in-alt-text-bryn-newell/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>tscircuit - Design Electronics with React Components</title>
      <link>https://www.brandonpugh.com/links/tscircuit-design-electronics-with-react-components/</link>
      <pubDate>Wed, 14 May 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/links/tscircuit-design-electronics-with-react-components/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://tscircuit.com/&#34;&gt;tscircuit - Design Electronics with React Components&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This does look like an interesting approach to designing circuit boards.
I&amp;rsquo;ve only recently begun getting into &lt;em&gt;very&lt;/em&gt; beginner electronics so maybe I&amp;rsquo;ll come back to this some day and see if this makes the process easier given my background in React (should I ever find myself needing to design my own circuit board).&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://react.statuscode.com/issues/429&#34;&gt;Via&lt;/a&gt;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/tscircuit-design-electronics-with-react-components/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Link directly to a VS code setting</title>
      <link>https://www.brandonpugh.com/til/vscode/link-to-setting/</link>
      <pubDate>Sat, 03 May 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/vscode/link-to-setting/</guid>
      <description>&lt;p&gt;Today I learned that you can link directly to specific VS Code settings using the &lt;code&gt;vscode:&lt;/code&gt; URL scheme.
They follow this format: &lt;code&gt;vscode://settings/editor.formatOnSave&lt;/code&gt;, where you put the setting ID at the end of the URL.&lt;/p&gt;
&lt;p&gt;So if you click &lt;a href=&#34;#ZgotmplZ&#34;&gt;this link&lt;/a&gt;, VS Code should open straight to that setting.&lt;/p&gt;
&lt;p&gt;This is probably most useful for folks who like to write about VS Code features (like me), but it&amp;rsquo;s also handy if you&amp;rsquo;re helping like a teammate you can just send them a link to a setting to make it easier for them.&lt;/p&gt;
&lt;p&gt;Also, in VS Code, you can click the gear icon next to a setting and select &amp;ldquo;Copy Setting URL&amp;rdquo; to get the link.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/vscode/link-to-setting/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Indieweb Movie Club - The Castle (1997)</title>
      <link>https://www.brandonpugh.com/blog/indieweb-movie-club-the-castle-1997/</link>
      <pubDate>Fri, 02 May 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/blog/indieweb-movie-club-the-castle-1997/</guid>
      <description>&lt;p&gt;I watched &lt;a href=&#34;https://en.wikipedia.org/wiki/The_Castle_%281997_Australian_film%29&#34;&gt;The Castle (1997)&lt;/a&gt; for the &lt;a href=&#34;https://zacharykai.net/notes/iwmapr25&#34;&gt;April&lt;/a&gt; movie club&amp;hellip; great choice &lt;a href=&#34;https://zacharykai.net/&#34;&gt;Zachary Kai&lt;/a&gt;!&lt;/p&gt;
&lt;p&gt;In short, I &lt;em&gt;really&lt;/em&gt; enjoyed this film. Go watch it.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;ll admit the trailer didn&amp;rsquo;t really sell me on it but after watching the first &lt;a href=&#34;https://www.youtube.com/watch?v=IS8SWOXImYg&#34;&gt;eight minutes on YouTube&lt;/a&gt;, I was in.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s about a working-class Australian family that fights to keep their beloved home from being torn down to expand an airport.
The humor is definitely my style with a fast stream of jokes, most of which came from the dialog but there were also some fun visual gags.&lt;/p&gt;
&lt;p&gt;What I especially liked though, was how endearing I found Darryl Kerrigan and his family.
I found myself really admiring how much his family loved and supported each other and how he didn&amp;rsquo;t need much to be content and how he could still marvel at things most of us take for granted&amp;hellip; like power lines.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m glad I discovered this Australian classic and learned a bit more about Australian culture (I now know what &lt;a href=&#34;https://www.youtube.com/watch?v=1IQC3aJCLSE&#34;&gt;Rissoles&lt;/a&gt; are). I haven&amp;rsquo;t seen many Australian comedies, but what I have seen I&amp;rsquo;ve enjoyed, like &lt;a href=&#34;https://www.imdb.com/title/tt18228732/&#34;&gt;Colin from Accounts&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m looking forward to discovering some more gems through the &lt;a href=&#34;https://indieweb.org/IndieWeb_Movie_Club&#34;&gt;Indieweb movie club&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;alternate-version&#34;&gt;Alternate version&lt;/h2&gt;
&lt;p&gt;I rented the movie from Amazon Prime, but having first watched a portion on youtube I noticed some differences in the dialog.&lt;/p&gt;
&lt;p&gt;After some searching, I learned that there is actually an alternate version that replaces certain Australianisms with more American sounding terms or expressions. They had the original cast re-record the lines so it&amp;rsquo;s not very noticeable if you don&amp;rsquo;t know any better. You can see the differences on &lt;a href=&#34;https://www.imdb.com/title/tt0118826/alternateversions/&#34;&gt;IMDB&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;What I found more off-putting was the tweaks to the soundtrack.
For instance, the scene where Steve is showing Darryl his helmet invention has no music in the original but in the American version &lt;a href=&#34;https://youtu.be/5wiF6b4rxno&#34;&gt;All Right Now&lt;/a&gt; is playing which I found rather jarring.
So be sure to watch the original if you can.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/blog/indieweb-movie-club-the-castle-1997/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>NoSurf – Stop wasting life on the net!</title>
      <link>https://www.brandonpugh.com/links/nosurf-stop-wasting-life-on-the-net/</link>
      <pubDate>Thu, 01 May 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/links/nosurf-stop-wasting-life-on-the-net/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://nosurf.net/&#34;&gt;NoSurf – Stop wasting life on the net!&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I just discovered the &amp;ldquo;NoSurf&amp;rdquo; community.
This is cool since it&amp;rsquo;s an idea I&amp;rsquo;ve been trying to follow for sometime now.&lt;/p&gt;
&lt;p&gt;They also have a nice &lt;a href=&#34;https://old.reddit.com/r/nosurf/comments/p73msh/digital_minimalism_reading_list/&#34;&gt;reading list&lt;/a&gt; on the subreddit.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/nosurf-stop-wasting-life-on-the-net/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Craft and Satisfaction</title>
      <link>https://www.brandonpugh.com/links/craft-and-satisfaction/</link>
      <pubDate>Wed, 30 Apr 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/links/craft-and-satisfaction/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://blog.jim-nielsen.com/2025/craft-and-satisfaction/&#34;&gt;Craft and Satisfaction&lt;/a&gt;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/craft-and-satisfaction/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Boxie - an always offline audio player for my 3 year old</title>
      <link>https://www.brandonpugh.com/links/boxie-an-always-offline-audio-player-for-my-3-year-old/</link>
      <pubDate>Tue, 29 Apr 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/links/boxie-an-always-offline-audio-player-for-my-3-year-old/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://mariozechner.at/posts/2025-04-20-boxie/&#34;&gt;Boxie - an always offline audio player for my 3 year old&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This is pretty impressive post from a Dad who built his own version of a Toniebox.
My son also has a Toniebox, and it is a cool little device but some things about it I find very annoying and I&amp;rsquo;ve frequently had the thought &amp;ldquo;I should be able to make a better one&amp;hellip;&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;Right now though I&amp;rsquo;m just trying to learn a bit of electronics just to be able to fix his toys when they stop working which feels like all the time.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/boxie-an-always-offline-audio-player-for-my-3-year-old/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Kermit font</title>
      <link>https://www.brandonpugh.com/links/kermit-font/</link>
      <pubDate>Tue, 29 Apr 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/links/kermit-font/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://kermit-font.com/&#34;&gt;Kermit font&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This is pretty impressive &amp;ldquo;typeface for kids&amp;rdquo; and a fascinating read about what went into designing it.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://frontendmasters.com/blog/a-typeface-for-kids/&#34;&gt;via&lt;/a&gt;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/kermit-font/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Fixing a bunny led night light</title>
      <link>https://www.brandonpugh.com/til/electronics/fix-bunny-led/</link>
      <pubDate>Fri, 25 Apr 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/electronics/fix-bunny-led/</guid>
      <description>&lt;p&gt;This effectively amounted to replacing a battery but I still learned some things along the way.&lt;/p&gt;
&lt;p&gt;It was thankfully easy to take the rubber case off which I expected to be glued or something but I just had to pull it off.&lt;/p&gt;
&lt;p&gt;This revealed the main board with the LEDs and the battery tucked underneath.&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;base of light with cover removed&#34; loading=&#34;lazy&#34; src=&#34;https://www.brandonpugh.com/til/electronics/fix-bunny-led-cover-removed.webp&#34;&gt;&lt;/p&gt;
&lt;p&gt;It turned out to be a 18650 lithium battery.&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;base disassembled showing the battery connected&#34; loading=&#34;lazy&#34; src=&#34;https://www.brandonpugh.com/til/electronics/fix-bunny-led-battery.webp&#34;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Adam Savage has since released a &lt;a href=&#34;https://www.youtube.com/watch?v=-Y23nfAOiXQ&#34;&gt;video about 18650 batteries&lt;/a&gt; which probably explains why it stopped working.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;You&amp;rsquo;ll get a lot of options when searching for 18650 batteries but the tricky part was finding one with the right connector.&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;jst connector of the battery&#34; loading=&#34;lazy&#34; src=&#34;https://www.brandonpugh.com/til/electronics/fix-bunny-led-jst-connector.webp&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://www.amazon.com/dp/B0GKGN81L9&#34;&gt;This replacement worked&lt;/a&gt;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/electronics/fix-bunny-led/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Collapsible markdown section</title>
      <link>https://www.brandonpugh.com/links/collapsible-markdown/</link>
      <pubDate>Sat, 19 Apr 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/links/collapsible-markdown/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://github.com/williln/til/blob/main/markdown/collapsible_markdown.md&#34;&gt;Collapsible markdown TIL from williln/til&lt;/a&gt;&lt;/p&gt;
&lt;details&gt;
  &lt;summary&gt;Click me&lt;/summary&gt;
&lt;h3 id=&#34;favorite-disney-movies&#34;&gt;Favorite Disney Movies&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;Wall-E&lt;/li&gt;
&lt;li&gt;Moana&lt;/li&gt;
&lt;/ol&gt;
&lt;/details&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/collapsible-markdown/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Just Put It On Your Blog</title>
      <link>https://www.brandonpugh.com/links/just-put-it-on-your-blog/</link>
      <pubDate>Wed, 16 Apr 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/links/just-put-it-on-your-blog/</guid>
      <description>&lt;p&gt;&lt;a class=&#34;u-bookmark-of h-cite&#34; href=&#34;https://shellsharks.com/just-put-it-on-your-blog&#34;&gt;Just Put It On Your Blog&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;If you’ve got something to say, something to share, something that others might be interested in—why not just put it on your blog?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;a href=&#34;https://news.indieweb.org/en&#34; class=&#34;u-syndication&#34;&gt;
  Also posted on IndieNews
&lt;/a&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/just-put-it-on-your-blog/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>LLMs can&#39;t stop making up software dependencies and sabotaging everything</title>
      <link>https://www.brandonpugh.com/links/llms-cant-stop-making-up-software-dependencies/</link>
      <pubDate>Mon, 14 Apr 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/links/llms-cant-stop-making-up-software-dependencies/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://www.theregister.com/AMP/2025/04/12/ai_code_suggestions_sabotage_supply_chain/&#34;&gt;LLMs can&amp;rsquo;t stop making up software dependencies and sabotaging everything&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;A fun new attack vector in the age of AI.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;ldquo;What a world we live in: AI hallucinated packages are validated and rubber-stamped by another AI that is too eager to be helpful.&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/llms-cant-stop-making-up-software-dependencies/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>JST connectors</title>
      <link>https://www.brandonpugh.com/til/electronics/jst-connector/</link>
      <pubDate>Sun, 13 Apr 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/electronics/jst-connector/</guid>
      <description>&lt;p&gt;Today I learned that the following white connector you commonly see in electronic devices, is called a &lt;a href=&#34;https://en.wikipedia.org/wiki/JST_connector&#34;&gt;&amp;ldquo;JST connector&amp;rdquo;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;jst connector&#34; loading=&#34;lazy&#34; src=&#34;https://www.brandonpugh.com/til/electronics/jst-connector-front-cropped-min.jpg&#34;&gt;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/electronics/jst-connector/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>My weirdest A/B test blew everyone&#39;s mind</title>
      <link>https://www.brandonpugh.com/links/weird-ab-test/</link>
      <pubDate>Fri, 11 Apr 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/links/weird-ab-test/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://www.marketingideas.com/p/my-weirdest-ab-test-blew-everyones&#34;&gt;My weirdest A/B test blew everyone&amp;rsquo;s mind&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Clickbaity title aside, it&amp;rsquo;s an interesting technique.&lt;/p&gt;
&lt;p&gt;They essentially put a blurred screenshot of the product/app behind the sign up form and it resulted in a significant jump in conversions.&lt;/p&gt;
&lt;p&gt;I can definitely see why it would work but it also feels a bit manipulative/deceptive. What do yall think?&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/weird-ab-test/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Semantic line breaks (one sentence per line)</title>
      <link>https://www.brandonpugh.com/til/markdown/semantic-line-breaks/</link>
      <pubDate>Tue, 08 Apr 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/markdown/semantic-line-breaks/</guid>
      <description>&lt;p&gt;I just discovered &lt;a href=&#34;https://sembr.org/&#34;&gt;Semantic Line Breaks&lt;/a&gt;.
I could never decide on exactly how to do line breaks in markdown so I love that someone came up with a convention that&amp;rsquo;s been thought through.&lt;/p&gt;
&lt;p&gt;This led me to discover this post by Derek Sivers: &lt;a href=&#34;https://sive.rs/1s&#34;&gt;Writing one sentence per line&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;What&amp;rsquo;s interesting is that while he&amp;rsquo;s recommending the same approach, he suggests that it will improve your writing itself.&lt;/p&gt;
&lt;p&gt;Nicer git diffs is just a side benefit. 🙂&lt;/p&gt;
&lt;p&gt;Definitely going to adopt this now and see how I like it.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/markdown/semantic-line-breaks/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>UI Algorithms: A Tiny Undo Stack</title>
      <link>https://www.brandonpugh.com/links/ui-algorithms-a-tiny-undo-stack/</link>
      <pubDate>Tue, 08 Apr 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/links/ui-algorithms-a-tiny-undo-stack/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://blog.julik.nl/2025/03/a-tiny-undo-stack?utm_source=cassidoo&amp;amp;utm_medium=email&amp;amp;utm_campaign=it-is-never-too-late-to-be-what-you-might-have&#34;&gt;UI Algorithms: A Tiny Undo Stack&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;A pretty clever little implementation of an undo/redo data structure in JavaScript.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/ui-algorithms-a-tiny-undo-stack/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Verifying tricky git rebases with git range-diff</title>
      <link>https://www.brandonpugh.com/links/verifying-tricky-git-rebases-with-git-range-diff/</link>
      <pubDate>Tue, 08 Apr 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/links/verifying-tricky-git-rebases-with-git-range-diff/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://andrewlock.net/verifiying-tricky-git-rebases-with-range-diffs/&#34;&gt;Verifying tricky git rebases with git range-diff&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Git&amp;rsquo;s range-diff command is pretty powerful but I feel like it&amp;rsquo;s not talked about enough and it could definitely use a nicer UI so I&amp;rsquo;m Andrew is helping to demystify it.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/verifying-tricky-git-rebases-with-git-range-diff/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Blogging vs. blog setups</title>
      <link>https://www.brandonpugh.com/links/blogging-vs-blog-setups-rakhim-org/</link>
      <pubDate>Sat, 05 Apr 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/links/blogging-vs-blog-setups-rakhim-org/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://rakhim.org/honestly-undefined/19/&#34;&gt;Blogging vs. blog setups&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I definitely feel targeted by this 😅&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://maya.land/responses/2020/11/28/blogging-vs.-blog-setup.html&#34;&gt;via Maya&lt;/a&gt;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/blogging-vs-blog-setups-rakhim-org/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Indieweb Movie Club - Whats Up Doc (1972)</title>
      <link>https://www.brandonpugh.com/blog/indieweb-movie-club-whats-up-doc-1972/</link>
      <pubDate>Fri, 04 Apr 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/blog/indieweb-movie-club-whats-up-doc-1972/</guid>
      <description>&lt;p&gt;As part of the &lt;a href=&#34;https://indieweb.org/IndieWeb_Movie_Club&#34;&gt;Indieweb movie club&lt;/a&gt; for &lt;a href=&#34;https://artlung.com/whatsupdoc-imc/&#34;&gt;March&lt;/a&gt;, I watched the 1972 film &lt;a href=&#34;https://www.imdb.com/title/tt0069495/&#34;&gt;What&amp;rsquo;s Up Doc?&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I hadn&amp;rsquo;t heard of this movie before but I ended up having a lot of fun with it.
If you don&amp;rsquo;t mind silly older commedies, then I definitely recommend giving this a watch.&lt;/p&gt;
&lt;p&gt;The film is billed as a &lt;a href=&#34;https://en.wikipedia.org/wiki/Screwball_comedy&#34;&gt;screwball comedy&lt;/a&gt; starring Barbara Streisand and Ryan O&amp;rsquo;Neal.
That&amp;rsquo;s really all you need to know going into it.
I was surprised to learn however, a &amp;ldquo;screwball comedy&amp;rdquo; is actually a very specific sub-genre of romantic commedies dating back to it&amp;rsquo;s peak during the 1940s.
After reading a bit more about it, I realized that this film is a fun homage to the genre and I recognized several of the common tropes such as a &amp;ldquo;one-sided courtship&amp;rdquo;, crazy coincidences, and a classic chase scene to name a few.&lt;/p&gt;
&lt;p&gt;Part of the appeal of watching older movies for me these days, is the glimpse into simpler times they can offer.
For instance, certain gags were almost certainly more impactful back then, such as the &lt;a href=&#34;https://tvtropes.org/pmwiki/pmwiki.php/Main/SheetOfGlass&#34;&gt;sheet of glass&lt;/a&gt; crossing the street, or the car chase down the &lt;a href=&#34;https://en.wikipedia.org/wiki/Lombard_Street_%28San_Francisco%29&#34;&gt;winding Lombard street&lt;/a&gt;. But I found it fascinating to seem them played straight for a change.&lt;/p&gt;
&lt;p&gt;Despite this I still found myself laughing quite a bit.
It was also fun to watch with my mom, a long-time fan of Streisand (a streis-head?), who regaled me with her memories of movies from this time period such as Ryan O&amp;rsquo;Neal&amp;rsquo;s prior film &amp;ldquo;Love Story&amp;rdquo; — which I otherwise wouldn&amp;rsquo;t have realized was being poked fun at with the ending line of this movie.&lt;/p&gt;
&lt;p&gt;So all in all, if you feel like you could use some light-hearted laughs, I recommend it.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/blog/indieweb-movie-club-whats-up-doc-1972/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Simplify sharing with built-in APIs and progressive enhancement</title>
      <link>https://www.brandonpugh.com/links/simplify-sharing-with-built-in-apis-and-progressive-enhancement/</link>
      <pubDate>Fri, 04 Apr 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/links/simplify-sharing-with-built-in-apis-and-progressive-enhancement/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://piccalil.li/blog/simplify-sharing-with-built-in-apis-and-progressive-enhancement/?ref=articles-rss-feed&#34;&gt;Simplify sharing with built-in APIs and progressive enhancement&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Andy Bell with a great example of creating a web component for a better article sharing experience.
I&amp;rsquo;m gonna try adding this to my site.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/simplify-sharing-with-built-in-apis-and-progressive-enhancement/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Et tu, Grammarly?</title>
      <link>https://www.brandonpugh.com/links/et-tu-grammarly/</link>
      <pubDate>Thu, 03 Apr 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/links/et-tu-grammarly/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://dbushell.com/2025/03/29/et-tu-grammarly/&#34;&gt;Et tu, Grammarly?&lt;/a&gt;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/et-tu-grammarly/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Another uncalled-for blog post about the ethics of using AI</title>
      <link>https://www.brandonpugh.com/links/another-uncalled-for-blog-post-about-the-ethics-of-using-ai/</link>
      <pubDate>Wed, 02 Apr 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/links/another-uncalled-for-blog-post-about-the-ethics-of-using-ai/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://clagnut.com/blog/2440&#34;&gt;Another uncalled-for blog post about the ethics of using AI&lt;/a&gt;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/another-uncalled-for-blog-post-about-the-ethics-of-using-ai/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Keynote: AI without the BS, for humans</title>
      <link>https://www.brandonpugh.com/links/keynote-ai-without-the-bs-for-humans/</link>
      <pubDate>Wed, 02 Apr 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/links/keynote-ai-without-the-bs-for-humans/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://www.youtube.com/watch?v=kYUicaho5k8&#34;&gt;Keynote: AI without the BS, for humans - Scott Hanselman - NDC London 2025&lt;/a&gt;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/keynote-ai-without-the-bs-for-humans/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Open Source, Open Mind: The Cost of Free Software</title>
      <link>https://www.brandonpugh.com/links/open-source-open-mind-the-cost-of-free-software/</link>
      <pubDate>Wed, 02 Apr 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/links/open-source-open-mind-the-cost-of-free-software/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://m.youtube.com/watch?v=0kQqONqMeLQ&#34;&gt;Open Source, Open Mind: The Cost of Free Software - Dylan Beattie - NDC London 2025&lt;/a&gt;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/open-source-open-mind-the-cost-of-free-software/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>The &#34;Inverted Pyramid&#34; in journalism</title>
      <link>https://www.brandonpugh.com/til/writing/inverted-pyramid/</link>
      <pubDate>Tue, 01 Apr 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/writing/inverted-pyramid/</guid>
      <description>&lt;p&gt;Continue with the writing, Today I learned about the &lt;a href=&#34;https://en.wikipedia.org/wiki/Inverted_pyramid_%28journalism%29&#34;&gt;inverted pyramid&lt;/a&gt; in journalism:&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;sketch of the inverted pyramid&#34; loading=&#34;lazy&#34; src=&#34;https://www.brandonpugh.com/til/writing/inverted-pyramid.png&#34;&gt;&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s a way to structure content so that it &amp;ldquo;begins with the details that readers care about most. As the article progresses, the focus shifts toward details that are relevant only to the most interested readers.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;I came across it in this great post about &lt;a href=&#34;https://refactoringenglish.com/chapters/commit-messages/&#34;&gt;How to Write Useful Commit Messages&lt;/a&gt; but is just as applicable to blog posts/reports/docs/emails.&lt;/p&gt;
&lt;p&gt;As a reader this is nice because you can get the info you care about faster and bail at any point.&lt;br&gt;
As an author you reduce the risk that you&amp;rsquo;ll lose people before you&amp;rsquo;ve made your main point.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://mtlynch.io/&#34;&gt;Michael Lynch&lt;/a&gt; has a lot of great &lt;a href=&#34;https://refactoringenglish.com/chapters/&#34;&gt;content on writing&lt;/a&gt; for developers and is working on turning it into a book: &lt;a href=&#34;https://refactoringenglish.com/&#34;&gt;Refactoring English&lt;/a&gt;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/writing/inverted-pyramid/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>On dashes</title>
      <link>https://www.brandonpugh.com/til/writing/dashes/</link>
      <pubDate>Mon, 31 Mar 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/writing/dashes/</guid>
      <description>&lt;p&gt;I&amp;rsquo;ve been working on improving my writing and since it&amp;rsquo;s an important skill in our industry I figured it&amp;rsquo;s also a category of learnings worth sharing.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;ve been experimenting with using em dashes (—) lately but I just learned that it&amp;rsquo;s common to &lt;em&gt;not&lt;/em&gt; put spaces around it.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Spacing around an em dash varies. Most newspapers insert a space before and after the dash, and many popular magazines do the same, but most books and journals omit spacing, closing whatever comes before and after the em dash right up next to it.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I personally think I&amp;rsquo;ll prefer adding spaces — at least in my own writing — since it looks more distinct from a hyphenated word.
I also saw it mentioned somewhere that some software incorrectly teats it as a hyphenated word when double clicking or press and holding for selection.
This also makes me realized I may have written some word-counting logic incorrectly in the past 😅&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://www.merriam-webster.com/grammar/em-dash-en-dash-how-to-use&#34;&gt;How to Use Em Dashes (—), En Dashes (–) , and Hyphens (-) | Merriam-Webster&lt;/a&gt;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/writing/dashes/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>How to Write Useful Commit Messages</title>
      <link>https://www.brandonpugh.com/links/how-to-write-useful-commit-messages/</link>
      <pubDate>Fri, 28 Mar 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/links/how-to-write-useful-commit-messages/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://refactoringenglish.com/chapters/commit-messages/&#34;&gt;How to Write Useful Commit Messages&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;ve long been a fan of writing more detailed commit messages and this is an excellent write-up on how to do that.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/how-to-write-useful-commit-messages/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Anyone can be scammed</title>
      <link>https://www.brandonpugh.com/blog/anyone-can-be-scammed/</link>
      <pubDate>Tue, 25 Mar 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/blog/anyone-can-be-scammed/</guid>
      <description>&lt;p&gt;Even Troy Hunt (a well-known security researcher and creator of &lt;a href=&#34;https://haveibeenpwned.com/&#34;&gt;Have I Been Pwned&lt;/a&gt;) fell for a phishing email.&lt;br&gt;
He wrote all about it on his blog:
&lt;a href=&#34;https://www.troyhunt.com/a-sneaky-phish-just-grabbed-my-mailchimp-mailing-list/&#34;&gt;A Sneaky Phish Just Grabbed my Mailchimp Mailing List&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I found it a valuable read, not only for the lessons learned, but it&amp;rsquo;s also a reminder that it could have happened to any of us.
The email looks fairly well crafted and I appreciated his analysis of the factors that led to him falling victim.
It&amp;rsquo;s important to remember that even the most security-minded people can make mistakes and that security is hard.&lt;/p&gt;
&lt;p&gt;Honestly the most frustrating part of the story is the fact that Mailchimp doesn&amp;rsquo;t delete unsubscribed emails and even worse they give you no way to opt out of that — so a list owner would have to regularly go in an delete them manually&amp;hellip; and why do they store your IP address?? 😡&lt;/p&gt;
&lt;p&gt;I also thought it was sneaky that they generated an api key on his account. So in addition to updating login credentials remember to check for any recently added api keys.&lt;/p&gt;
&lt;p&gt;I hadn&amp;rsquo;t thought of this vector before, but it&amp;rsquo;s now one more reason why I prefer subscribing via RSS.&lt;/p&gt;
&lt;p&gt;P.S. ButtonDown has a nice &lt;a href=&#34;https://docs.buttondown.com/subscriber-cleanup&#34;&gt;Subscriber cleanup&lt;/a&gt; feature.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/blog/anyone-can-be-scammed/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Run old versions of Angular</title>
      <link>https://www.brandonpugh.com/til/node/old-project-versions/</link>
      <pubDate>Thu, 20 Mar 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/node/old-project-versions/</guid>
      <description>&lt;p&gt;Today I learned how to get a very old Angular project running locally.
Even though it was Angular in this case, the steps are likely to be similar for most aging node based projects.&lt;/p&gt;
&lt;p&gt;First I had to go to the &lt;a href=&#34;https://angular.dev/reference/versions&#34;&gt;Version compatibility&lt;/a&gt; page for Angular and find the required version of node.
In my case it was Angular v7 so I needed Node v10.&lt;/p&gt;
&lt;p&gt;Next, you&amp;rsquo;ll want to use a version manager for node.&lt;br&gt;
nvm is the most well known but you have to run it in bash on Windows and I find &lt;a href=&#34;https://volta.sh/&#34;&gt;Volta&lt;/a&gt; much nicer to use.&lt;/p&gt;
&lt;p&gt;I ran &lt;code&gt;volta pin node@10&lt;/code&gt; in the project directory.
This will add a &lt;code&gt;volta&lt;/code&gt; config section to the package.json so that whenever you&amp;rsquo;re in that directory, you&amp;rsquo;ll automatically use the correct version of node and npm.&lt;/p&gt;
&lt;p&gt;Best of all though, it won&amp;rsquo;t affect the default version of node that get&amp;rsquo;s run everywhere else.&lt;/p&gt;
&lt;p&gt;Also make sure you run &lt;code&gt;npm install&lt;/code&gt; &lt;em&gt;after&lt;/em&gt; the above command so that it&amp;rsquo;s the correct version of &lt;code&gt;npm&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;If you already tried to run &lt;code&gt;npm i&lt;/code&gt; with a different version of node then you&amp;rsquo;ll probably need to blow away your &lt;code&gt;node_modules&lt;/code&gt; folder and try again (ask me how I know).&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/node/old-project-versions/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>You can style markdown links as code</title>
      <link>https://www.brandonpugh.com/til/markdown/style-links/</link>
      <pubDate>Tue, 18 Mar 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/markdown/style-links/</guid>
      <description>&lt;p&gt;I just figured out that you can style a link as inline code in markdown i.e. &lt;a href=&#34;https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/toSorted&#34;&gt;&lt;code&gt;toSorted()&lt;/code&gt;&lt;/a&gt;
It&amp;rsquo;s a bit non-intuitive since, unlike bold or italics, the backticks go &lt;em&gt;inside&lt;/em&gt; the square brackets instead of around the entire link.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-md&#34; data-lang=&#34;md&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;This gives a bold link: &lt;span class=&#34;ge&#34;&gt;**&lt;/span&gt;[&lt;span class=&#34;nt&#34;&gt;EFF&lt;/span&gt;](&lt;span class=&#34;na&#34;&gt;https://eff.org&lt;/span&gt;)**.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;This is for italics: &lt;span class=&#34;ge&#34;&gt;*[Markdown Guide](https://www.markdownguide.org)*&lt;/span&gt;.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;And this is for code: [&lt;span class=&#34;nt&#34;&gt;`toSorted()`&lt;/span&gt;](&lt;span class=&#34;na&#34;&gt;https://www.brandonpugh.com/til/javascript/tosorted/&lt;/span&gt;).
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;In my testing this seems supported in most places like github and azure devops. Unfortunately I couldn&amp;rsquo;t find a way get it styled like that in Teams.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/markdown/style-links/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Building Websites With LLMS</title>
      <link>https://www.brandonpugh.com/links/building-websites-with-llms/</link>
      <pubDate>Mon, 17 Mar 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/links/building-websites-with-llms/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://blog.jim-nielsen.com/2025/lots-of-little-html-pages/&#34;&gt;Building Websites With LLMS&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;ve &lt;a href=&#34;https://www.brandonpugh.com/til/css/view-transition/&#34;&gt;mentioned&lt;/a&gt; the new &lt;a href=&#34;https://developer.chrome.com/docs/web-platform/view-transitions&#34;&gt;view transitions API&lt;/a&gt; before, Jim Nielsen has a great post (with a fun bait-and-switch title) where he takes it to the next level and shows how you can use cross-document transitions to take a site with regular ole html pages and make it feel like a SPA or native app.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/building-websites-with-llms/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Pressing `%` will also jump to the matching HTML tag</title>
      <link>https://www.brandonpugh.com/til/vim/jump-matching-html-tag/</link>
      <pubDate>Sat, 15 Mar 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/vim/jump-matching-html-tag/</guid>
      <description>&lt;p&gt;I&amp;rsquo;ve used &lt;code&gt;%&lt;/code&gt; for some time now in vim, but I only just today learned that it not only jumps to a matching bracket or parenthesis, but also a matching &lt;strong&gt;HTML tag&lt;/strong&gt;!&lt;/p&gt;
&lt;p&gt;Unfortunately this doesn&amp;rsquo;t seem to work with vscode-vim but it does work with vscode-neovim.&lt;/p&gt;
&lt;p&gt;You could also accomplish this by assigning a hotkey to the &amp;ldquo;Go to matching pair&amp;rdquo; Emmet command.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/vim/jump-matching-html-tag/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Profiles in Visual Studio Code</title>
      <link>https://www.brandonpugh.com/til/vscode/profiles/</link>
      <pubDate>Fri, 14 Mar 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/vscode/profiles/</guid>
      <description>&lt;p&gt;I recently learned that VScode let&amp;rsquo;s you create different &lt;a href=&#34;https://code.visualstudio.com/docs/editor/profiles&#34;&gt;profiles&lt;/a&gt; that let you switch between different sets of settings, keyboard shortcuts, snippets, and most importantly, extensions.&lt;/p&gt;
&lt;p&gt;This is really if, like me, you have various extensions for different types of projects and don&amp;rsquo;t need them all running all the time. For example, I have extensions for C#, react, angular, or markdown projects (apparently I had 86 extensions installed 😱).&lt;/p&gt;
&lt;p&gt;The profile editor is actually pretty nice, letting you copy from an existing profiles for from some builtin templates.&lt;/p&gt;
&lt;p&gt;Unfortunately it doesn&amp;rsquo;t let you easily copy only certain extensions so the easiest way I found to get a list of all my extensions by running &lt;code&gt;code --list-extensions&lt;/code&gt; from the command line and then creating an &lt;code&gt;extensions.json&lt;/code&gt; file in a workspace.
When you open that folder, VScode will see those as &lt;a href=&#34;https://code.visualstudio.com/docs/editor/extension-marketplace#_workspace-recommended-extensions&#34;&gt;recommended extensions&lt;/a&gt; for that workspace and let you install them all with one click.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Before&lt;/em&gt; I learned of that command however I used &lt;a href=&#34;https://jqlang.org/&#34;&gt;&lt;code&gt;jq&lt;/code&gt;&lt;/a&gt; to get a list of extension IDs from the &lt;code&gt;extensions.json&lt;/code&gt; located in your user directory.
This json file has much more data it in it so &lt;code&gt;jq&lt;/code&gt; makes it much easier to extract the list:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;jq &lt;span class=&#34;s1&#34;&gt;&amp;#39;.[].identifier.id&amp;#39;&lt;/span&gt; file.json
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This approach still might be handy if I want to get a list of extensions only from a specific profile as those are stored in similar json files in &lt;code&gt;/profiles&lt;/code&gt;.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/vscode/profiles/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Create exclusive accordions with HTML `&lt;details&gt;` element</title>
      <link>https://www.brandonpugh.com/til/html/details-accordion/</link>
      <pubDate>Thu, 13 Mar 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/html/details-accordion/</guid>
      <description>&lt;p&gt;Today I learned that you can now create an &amp;ldquo;exclusive accordion&amp;rdquo;, meaning only one section of the accordion is open at a time, using just html with the &lt;code&gt;details&lt;/code&gt; element.&lt;/p&gt;
&lt;p&gt;All you need to do is add a matching &lt;code&gt;name&lt;/code&gt; attribute to each &lt;code&gt;&amp;lt;details&amp;gt;&lt;/code&gt; element you want to be considered part of the same &amp;ldquo;group&amp;rdquo;:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-html&#34; data-lang=&#34;html&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;details&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;name&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;faq&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;summary&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;Section 1&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;summary&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;p&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    Section 1 details
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;p&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;details&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;details&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;name&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;faq&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;summary&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;Section 2&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;summary&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;p&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    Section 2 details
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;p&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;details&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Note, the &lt;code&gt;&amp;lt;details&amp;gt;&lt;/code&gt; element has been widely supported since 2020 but support for the &lt;code&gt;name&lt;/code&gt; attribute was only added last year.&lt;/p&gt;
&lt;p&gt;Read more: &lt;a href=&#34;https://developer.mozilla.org/en-US/blog/html-details-exclusive-accordions/&#34;&gt;Exclusive accordions using the HTML details element | MDN Blog&lt;/a&gt;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/html/details-accordion/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>JavaScript Fatigue Strikes Back</title>
      <link>https://www.brandonpugh.com/links/javascript-fatigue-strikes-back/</link>
      <pubDate>Thu, 13 Mar 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/links/javascript-fatigue-strikes-back/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://allenpike.com/2025/javascript-fatigue-ssr&#34;&gt;JavaScript Fatigue Strikes Back&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I think is a nice &lt;em&gt;very&lt;/em&gt; high overview of the current state of the Javascript ecosystem.&lt;/p&gt;
&lt;p&gt;I also like this potential explanation for why there tends to be more churn than with backend frameworks:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The problem was that, unlike Ruby, PHP, or Python, most JavaScript needs to run in the browser. Historically, this put an evolutionary pressure on JavaScript frameworks to be small and bereft of legacy code, rather than expansive and featureful.&lt;/p&gt;
&lt;/blockquote&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/javascript-fatigue-strikes-back/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>My Life in Weeks by Gina Trapani</title>
      <link>https://www.brandonpugh.com/links/life-in-weeks/</link>
      <pubDate>Tue, 11 Mar 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/links/life-in-weeks/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://weeks.ginatrapani.org/&#34;&gt;My Life in Weeks&lt;/a&gt; by Gina Trapani.&lt;/p&gt;
&lt;p&gt;This is a pretty cool little project and I&amp;rsquo;ve long thought about doing something similar so it&amp;rsquo;s great that she put the source on Github.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/life-in-weeks/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Toggle a CSS class with vanilla javascript</title>
      <link>https://www.brandonpugh.com/til/javascript/classlist/</link>
      <pubDate>Tue, 11 Mar 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/javascript/classlist/</guid>
      <description>&lt;p&gt;Today I learned about the &lt;code&gt;classList.toggle()&lt;/code&gt; method in JavaScript, which makes it trivial to add or remove a class from an element dynamically:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-javascript&#34; data-lang=&#34;javascript&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kr&#34;&gt;const&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;button&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;document&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;querySelector&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;button&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;button&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;addEventListener&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;click&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;()&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;nx&#34;&gt;button&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;classList&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;toggle&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;active&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;});&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This is has been widely supported in browsers since 2015 with the addition of &lt;a href=&#34;https://developer.mozilla.org/en-US/docs/Web/API/Element/classList&#34;&gt;&lt;code&gt;classList&lt;/code&gt;&lt;/a&gt; and makes it a lot easier to manipulate the classes on an element instead of having to manipulate the &lt;code&gt;className&lt;/code&gt; string which is why people used to reach for jQuery for that.&lt;/p&gt;
&lt;p&gt;You can also pass a second argument (&lt;code&gt;true&lt;/code&gt; or &lt;code&gt;false&lt;/code&gt;) to explicitly control whether the class should be added or removed:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-javascript&#34; data-lang=&#34;javascript&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;element&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;classList&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;toggle&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;hidden&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;kc&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;  &lt;span class=&#34;c1&#34;&gt;// Always adds &amp;#34;hidden&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;element&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;classList&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;toggle&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;hidden&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;kc&#34;&gt;false&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt; &lt;span class=&#34;c1&#34;&gt;// Always removes &amp;#34;hidden&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/javascript/classlist/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>toSorted() array method</title>
      <link>https://www.brandonpugh.com/til/javascript/tosorted/</link>
      <pubDate>Thu, 06 Mar 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/javascript/tosorted/</guid>
      <description>&lt;p&gt;Today I learned that there is a newish javascript array method &lt;a href=&#34;https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/toSorted&#34;&gt;&lt;code&gt;toSorted()&lt;/code&gt;&lt;/a&gt; which is the &amp;ldquo;copying&amp;rdquo; or non-mutating version of &lt;code&gt;sort()&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;This means you can easily sort an array by getting back a new copy instead of mutating the original:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-js&#34; data-lang=&#34;js&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kr&#34;&gt;const&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;months&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;Mar&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Jan&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Feb&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Dec&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kr&#34;&gt;const&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;sortedMonths&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;months&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;toSorted&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;();&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;console&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;log&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;sortedMonths&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt; &lt;span class=&#34;c1&#34;&gt;// [&amp;#39;Dec&amp;#39;, &amp;#39;Feb&amp;#39;, &amp;#39;Jan&amp;#39;, &amp;#39;Mar&amp;#39;]
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;console&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;log&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;months&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt; &lt;span class=&#34;c1&#34;&gt;// [&amp;#39;Mar&amp;#39;, &amp;#39;Jan&amp;#39;, &amp;#39;Feb&amp;#39;, &amp;#39;Dec&amp;#39;]
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;It&amp;rsquo;s pretty cool to see javascript moving more towards immutability.
I mentioned the &lt;a href=&#34;https://www.brandonpugh.com/til/javascript/array-with/&#34;&gt;&lt;code&gt;with()&lt;/code&gt; method before&lt;/a&gt; and now there is also &lt;a href=&#34;https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/toReversed&#34;&gt;&lt;code&gt;toReversed()&lt;/code&gt;&lt;/a&gt; and &lt;a href=&#34;https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/toSpliced&#34;&gt;&lt;code&gt;toSpliced()&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;These were added in ES2023 and have been available in browsers since July 2023.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/javascript/tosorted/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Split lines in Vim</title>
      <link>https://www.brandonpugh.com/til/vim/split-lines/</link>
      <pubDate>Tue, 04 Mar 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/vim/split-lines/</guid>
      <description>&lt;p&gt;I&amp;rsquo;ve long wanted a command that was the opposite of &lt;code&gt;J&lt;/code&gt; (join lines), and I finally took the time to see if it&amp;rsquo;s possible.
Turns out there a few solutions.&lt;/p&gt;
&lt;p&gt;The simplest way if you want to split on a whitespace character is to just type &lt;code&gt;r&lt;/code&gt; &lt;code&gt;enter&lt;/code&gt;.
I can&amp;rsquo;t believe I never thought of that before.&lt;/p&gt;
&lt;p&gt;You can also install the &lt;a href=&#34;https://github.com/drzel/vim-split-line&#34;&gt;vim-split-line&lt;/a&gt; plugin, which adds the &lt;code&gt;:SplitLine&lt;/code&gt; command.
This command will split the current line at the cursor position.&lt;/p&gt;
&lt;p&gt;But, as they note in their README, you can also use the following command to split the line at the cursor position:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-vim&#34; data-lang=&#34;vim&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;nnoremap&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;S&lt;/span&gt; :&lt;span class=&#34;nx&#34;&gt;keeppatterns&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;substitute&lt;/span&gt;&lt;span class=&#34;sr&#34;&gt;/\s*\%#\s*/&lt;/span&gt;\&lt;span class=&#34;nx&#34;&gt;r&lt;/span&gt;/&lt;span class=&#34;nx&#34;&gt;e&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;bar&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;normal&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;!&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;==&amp;lt;&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;CR&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/vim/split-lines/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>b is an Alias for Parenthesis in Vim</title>
      <link>https://www.brandonpugh.com/til/vim/text-object-alias/</link>
      <pubDate>Mon, 03 Mar 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/vim/text-object-alias/</guid>
      <description>&lt;p&gt;I just discovered that &lt;code&gt;b&lt;/code&gt; and &lt;code&gt;B&lt;/code&gt; are aliases for the &lt;code&gt;()&lt;/code&gt; and &lt;code&gt;{}&lt;/code&gt; text objects respectively.&lt;/p&gt;
&lt;p&gt;This is a nice little builtin improvement since I frequently find myself selecting or changing withing parenthesis and &lt;code&gt;cib&lt;/code&gt; is nicer to type than &lt;code&gt;ci(&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;I only wished I&amp;rsquo;d discovered this years ago!&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/vim/text-object-alias/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Git Stash Without the Branch Name</title>
      <link>https://www.brandonpugh.com/blog/git-stash-without-the-branch-name/</link>
      <pubDate>Fri, 28 Feb 2025 14:52:50 -0600</pubDate>
      <guid>https://www.brandonpugh.com/blog/git-stash-without-the-branch-name/</guid>
      <description>&lt;p&gt;I found a way to stash changes in git without including the branch name in the stash message.
This might be a very niche use case but it&amp;rsquo;s been a minor annoyance for me for some time.
If you just want the alias, then add the following to your &lt;code&gt;.gitconfig&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;alias&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;nv&#34;&gt;sm&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;!f() { git stash || exit 1; rev=&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;git rev-parse stash@&lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;0&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt; &amp;amp;&amp;amp; git stash drop stash@{0} || exit 1; git stash store -m \&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$1&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;\&amp;#34; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$rev&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;; }; f&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;You can also use this technique for renaming stashes.&lt;/p&gt;
&lt;h2 id=&#34;why&#34;&gt;Why?&lt;/h2&gt;
&lt;p&gt;When I stash changes in git, it&amp;rsquo;s usually work that is independent of the branch I&amp;rsquo;m working on.
If I have work in progress that does belong on a particular branch, then I&amp;rsquo;ll create a WIP (&amp;ldquo;work in progress&amp;rdquo;) commit on that branch instead.&lt;/p&gt;
&lt;p&gt;This means that git&amp;rsquo;s default behavior of including the branch name in the stash message just adds noise for me.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;❯  git stash list
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;stash@&lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;0&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;: On feature/get-user-groups: Potential refactor of auth flow
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;stash@&lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;1&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;: On 123-fix-login-bug: disable-dupe-check
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;On top of that, most GUI clients show stashes in a sidebar so the important part of the message tends to be cut off.&lt;/p&gt;
&lt;p&gt;Unfortunately there isn&amp;rsquo;t a built-in way to change this behavior but we can get around it with a git alias (formatted for clarity):&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nv&#34;&gt;sm&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;!f() {
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s2&#34;&gt;    git stash || exit 1;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s2&#34;&gt;    rev=&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;git rev-parse stash@&lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;0&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt; &amp;amp;&amp;amp; git stash drop stash@{0} || exit 1;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s2&#34;&gt;    git stash store -m \&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$1&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;\&amp;#34; &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$rev&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s2&#34;&gt;}; f&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This will stash the changes, drop the stash, and then use the &lt;code&gt;stash store&lt;/code&gt; command to create a new stash from the commit of the dropped stash.
The store command won&amp;rsquo;t include the branch name in the message, so running &lt;code&gt;git sm &amp;quot;Potential refactor of auth flow&amp;quot;&lt;/code&gt; will give you:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;❯  git stash list
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;stash@&lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;0&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;: Potential refactor of auth flow
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/blog/git-stash-without-the-branch-name/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Dotnet StringSyntaxAttribute</title>
      <link>https://www.brandonpugh.com/til/csharp/string-syntax-attribute/</link>
      <pubDate>Fri, 21 Feb 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/csharp/string-syntax-attribute/</guid>
      <description>&lt;p&gt;Today I learned about the &lt;code&gt;StringSyntaxAttribute&lt;/code&gt; added in .NET 7.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s a handy attribute you can add to string properties to specify exactly what format the string should be in.&lt;/p&gt;
&lt;p&gt;This gives you extra IDE assistance like syntax highlighting and intellisense 🔥.&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;screenshot of rider showing regex intellisense&#34; loading=&#34;lazy&#34; src=&#34;https://linkdotnetblog.azureedge.net/blog/20230101_StringSyntax/Preview.webp&#34;&gt;&lt;/p&gt;
&lt;p&gt;And you can also use a comment like &lt;code&gt;/*lang=xxx*/&lt;/code&gt; for regular variables.&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;screenshot of comment annotation&#34; loading=&#34;lazy&#34; src=&#34;https://www.alwaysdeveloping.net/dailydrop/2022/03/28-stringsyntaxattribute/3.non-attribute.png&#34;&gt;&lt;/p&gt;
&lt;p&gt;Read &lt;a href=&#34;https://steven-giesel.com/blogPost/d2b2fc18-ca4c-4879-b87f-a1d36f435805&#34;&gt;Steve&amp;rsquo;s post&lt;/a&gt; for more detail.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/csharp/string-syntax-attribute/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>When Imperfect Systems are Good, Actually: Bluesky’s Lossy Timelines</title>
      <link>https://www.brandonpugh.com/links/when-imperfect-systems-are-good-actually-blueskys-lossy-timelines/</link>
      <pubDate>Thu, 20 Feb 2025 15:38:35 -0600</pubDate>
      <guid>https://www.brandonpugh.com/links/when-imperfect-systems-are-good-actually-blueskys-lossy-timelines/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://jazco.dev/2025/02/19/imperfection/&#34;&gt;When Imperfect Systems are Good, Actually: Bluesky’s Lossy Timelines&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Some interesting implementation details on how Bluesky handles updating timelines with low latency even for users following hundred of thousands of others by essentially dropping some updates.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;By specifying the limits of reasonable user behavior and embracing imperfection for users who go beyond it, we can continue to provide service that meets the expectations of users without sacrificing scalability of the system.&lt;/p&gt;
&lt;/blockquote&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/when-imperfect-systems-are-good-actually-blueskys-lossy-timelines/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Use the &lt;picture&gt; element for light/dark images in markdown</title>
      <link>https://www.brandonpugh.com/til/html/light-dark-images/</link>
      <pubDate>Wed, 19 Feb 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/html/light-dark-images/</guid>
      <description>&lt;p&gt;Thanks to &lt;a href=&#34;https://jamesg.blog/2025/02/17/images-light-dark-css&#34;&gt;James&amp;rsquo; post&lt;/a&gt;, today I learned that you can use the &lt;code&gt;&amp;lt;picture&amp;gt;&lt;/code&gt; to display different images based on whether or not the set a preference for light or dark mode.&lt;/p&gt;
&lt;p&gt;The key is using the &lt;code&gt;prefers-color-scheme&lt;/code&gt; CSS media query&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-html&#34; data-lang=&#34;html&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;picture&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;source&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;na&#34;&gt;media&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;(prefers-color-scheme: dark)&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;na&#34;&gt;srcset&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s&#34;&gt;      https://user-images.githubusercontent.com/25423296/163456776-7f95b81a-f1ed-45f7-b7ab-8fa810d529fa.png
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s&#34;&gt;    &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;/&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;img&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;na&#34;&gt;alt&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;Shows an illustrated sun in light color mode and a moon with stars in dark color mode.&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;na&#34;&gt;src&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;https://user-images.githubusercontent.com/25423296/163456779-a8556205-d0a5-45e2-ac17-42d089e3c3f8.png&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;/&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;picture&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Since HTML is valid in markdown, you can easily use this technique in a number of places including Github—which apparently has allowed the use of the &lt;code&gt;picture&lt;/code&gt; element &lt;a href=&#34;https://github.blog/changelog/2022-05-19-specify-theme-context-for-images-in-markdown-beta/&#34;&gt;since 2022.&lt;/a&gt;
This is much better than the custom syntax they had before.&lt;/p&gt;
&lt;p&gt;This also aligns with the sentiment Dave expressed that &lt;a href=&#34;https://daverupert.com/2023/05/markdown-images-anti-pattern/&#34;&gt;Markdown images are an anti-pattern&lt;/a&gt;.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/html/light-dark-images/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Component Party</title>
      <link>https://www.brandonpugh.com/links/component-party/</link>
      <pubDate>Mon, 17 Feb 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/links/component-party/</guid>
      <description>&lt;p&gt;I just came across this cool site that let&amp;rsquo;s you compare a &lt;em&gt;bunch&lt;/em&gt; of javascript UI frameworks with just code snippets for doing various tasks.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://component-party.dev/#reactivity.computed-state&#34;&gt;Component Party&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This is also a convenient way to compare the changes in the &amp;ldquo;Angular Renaissance&amp;rdquo; with the previous versions of Angular.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/component-party/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Sunsetting Create React App</title>
      <link>https://www.brandonpugh.com/links/create-react-app-deprecated/</link>
      <pubDate>Sun, 16 Feb 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/links/create-react-app-deprecated/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://react.dev/blog/2025/02/14/sunsetting-create-react-app&#34;&gt;Sunsetting Create React App – React&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m glad they finally &amp;ldquo;officially&amp;rdquo; deprecated it since it hasn&amp;rsquo;t been the greatest choice for a while now&amp;hellip;&lt;/p&gt;
&lt;p&gt;Like the docs now recommend, &lt;a href=&#34;https://vite.dev/guide/&#34;&gt;Vite&lt;/a&gt; is a much better choice.&lt;/p&gt;
&lt;p&gt;You can run &lt;code&gt;npm create vite@latest&lt;/code&gt; to get a starting point very similar to CRA but much faster and with less bloat.&lt;/p&gt;
&lt;p&gt;The only thing I wish it included was tests setup but this post does a good job showing how to do that: &lt;a href=&#34;https://reactpractice.dev/articles/simple-react-and-vite-setup-with-unit-testing/&#34;&gt;Simple React and Vite setup with unit testing&lt;/a&gt;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/create-react-app-deprecated/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Repetition and Attribution</title>
      <link>https://www.brandonpugh.com/links/repetition-and-attribution/</link>
      <pubDate>Thu, 13 Feb 2025 22:55:15 -0600</pubDate>
      <guid>https://www.brandonpugh.com/links/repetition-and-attribution/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://blog.kizu.dev/repetition-and-attribution/&#34;&gt;Repetition and Attribution&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Roma brings up some good points about how we shouldn&amp;rsquo;t worry about whether or not someone has already written about something—there&amp;rsquo;s always value in publishing our own take and linking to others work.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/repetition-and-attribution/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>JavaScript Temporal is coming</title>
      <link>https://www.brandonpugh.com/links/javascript-temporal-is-coming/</link>
      <pubDate>Mon, 10 Feb 2025 16:48:42 -0600</pubDate>
      <guid>https://www.brandonpugh.com/links/javascript-temporal-is-coming/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://developer.mozilla.org/en-US/blog/javascript-temporal-is-coming/&#34;&gt;JavaScript Temporal is coming | MDN Blog&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This will be really nice once it&amp;rsquo;s widely supported.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-js&#34; data-lang=&#34;js&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kr&#34;&gt;const&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;durations&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;nx&#34;&gt;Temporal&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;Duration&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;from&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;({&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;hours&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;}),&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;nx&#34;&gt;Temporal&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;Duration&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;from&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;({&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;hours&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;2&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;}),&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;nx&#34;&gt;Temporal&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;Duration&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;from&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;({&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;hours&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;minutes&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;30&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;}),&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;nx&#34;&gt;Temporal&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;Duration&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;from&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;({&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;hours&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;minutes&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;45&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;}),&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;durations&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;sort&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;Temporal&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;Duration&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;compare&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;console&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;log&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;durations&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;map&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;((&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;d&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;d&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;toString&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()));&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;// [ &amp;#39;PT1H&amp;#39;, &amp;#39;PT1H30M&amp;#39;, &amp;#39;PT1H45M&amp;#39;, &amp;#39;PT2H&amp;#39; ]
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/javascript-temporal-is-coming/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Learn Go with Tests</title>
      <link>https://www.brandonpugh.com/links/learn-go-with-tests-learn-go-with-tests/</link>
      <pubDate>Mon, 10 Feb 2025 10:44:20 -0600</pubDate>
      <guid>https://www.brandonpugh.com/links/learn-go-with-tests-learn-go-with-tests/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://quii.gitbook.io/learn-go-with-tests&#34;&gt;Learn Go with Tests&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;A pretty cool resource for learning Go.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/learn-go-with-tests-learn-go-with-tests/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>D2: Declarative Diagramming</title>
      <link>https://www.brandonpugh.com/links/d2_-declarative-diagramming/</link>
      <pubDate>Sun, 09 Feb 2025 01:05:06 -0600</pubDate>
      <guid>https://www.brandonpugh.com/links/d2_-declarative-diagramming/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://d2lang.com/&#34;&gt;https://d2lang.com/&lt;/a&gt;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/d2_-declarative-diagramming/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Entangled Interfaces: A Quantum Leap in UI Engineering with React</title>
      <link>https://www.brandonpugh.com/links/entangled-interfaces/</link>
      <pubDate>Sat, 08 Feb 2025 13:36:32 -0600</pubDate>
      <guid>https://www.brandonpugh.com/links/entangled-interfaces/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://benhowdle.im/entangled-interfaces.html&#34;&gt;Entangled Interfaces: A Quantum Leap in UI Engineering with React&lt;/a&gt;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/entangled-interfaces/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Notes on the Code Editors with AI Landscape</title>
      <link>https://www.brandonpugh.com/links/notes-on-the-code-editors-with-ai-landscape/</link>
      <pubDate>Wed, 05 Feb 2025 17:01:22 -0600</pubDate>
      <guid>https://www.brandonpugh.com/links/notes-on-the-code-editors-with-ai-landscape/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://frontendmasters.com/blog/notes-on-the-code-editors-with-ai-landscape/&#34;&gt;Notes on the Code Editors with AI Landscape&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Chris Coyier gives a nice overview of the current options for editors with AI built-in.&lt;/p&gt;
&lt;p&gt;He also brings up this interesting point:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Makes you wonder what Microsoft thinks about all this. Microsoft has done the heavy lifting here with VS Code and has their own business models centered around AI. Open source is open source and all, but it’s wild to see so many companies making money exactly in the same space with a thin veneer over the thing Microsoft has the most invested in.&lt;/p&gt;
&lt;/blockquote&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/notes-on-the-code-editors-with-ai-landscape/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Use jq to get a list of deeply nested values from JSON</title>
      <link>https://www.brandonpugh.com/til/javascript/jq-get-list-nested-json/</link>
      <pubDate>Wed, 05 Feb 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/javascript/jq-get-list-nested-json/</guid>
      <description>&lt;p&gt;I needed the list of extensions from the &lt;code&gt;extensions.json&lt;/code&gt; that looks like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-json&#34; data-lang=&#34;json&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;nt&#34;&gt;&amp;#34;identifier&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt; &lt;span class=&#34;nt&#34;&gt;&amp;#34;id&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;asvetliakov.vscode-neovim&amp;#34;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;},&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;nt&#34;&gt;&amp;#34;version&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;1.18.22&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;err&#34;&gt;...&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;},&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;err&#34;&gt;...&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;I hadn&amp;rsquo;t used &lt;code&gt;jq&lt;/code&gt; before but knew this was exactly what it was made for.&lt;/p&gt;
&lt;p&gt;In this case all I needed was this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;jq &lt;span class=&#34;s1&#34;&gt;&amp;#39;.[].identifier.id&amp;#39;&lt;/span&gt; extensions.json
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Also they have a pretty cool &lt;a href=&#34;https://play.jqlang.org/&#34;&gt;Playground&lt;/a&gt; for experimenting or running one-off queries.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/javascript/jq-get-list-nested-json/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Github supports alerts in markdown</title>
      <link>https://www.brandonpugh.com/til/github/markdown-alerts/</link>
      <pubDate>Fri, 31 Jan 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/github/markdown-alerts/</guid>
      <description>&lt;p&gt;Today I learned that Github &lt;a href=&#34;https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#alerts&#34;&gt;supports alerts&lt;/a&gt; in markdown using the blockquote syntax:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-md&#34; data-lang=&#34;md&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;&amp;gt; &lt;/span&gt;&lt;span class=&#34;ge&#34;&gt;[!NOTE]
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;&amp;gt; &lt;/span&gt;&lt;span class=&#34;ge&#34;&gt;Useful information that users should know, even when skimming content.
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This is an extension to the standard markdown syntax that I&amp;rsquo;ve seen supported more and more in various markdown tools like Obsidian and vscode (they&amp;rsquo;re also referred to as callouts or admonitions).&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/github/markdown-alerts/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>npmpackage.info</title>
      <link>https://www.brandonpugh.com/til/node/npm-package-info/</link>
      <pubDate>Thu, 30 Jan 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/node/npm-package-info/</guid>
      <description>&lt;p&gt;I recently discovered this handy site that aggregates all usual info I tend to look at when deciding whether or not I want to pull in an NPM package as a dependency.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://npmpackage.info/package/react-datepicker?t=overview&#34;&gt;npmpackage.info&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Some things I tend to look at:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;When was the last version published?&lt;/li&gt;
&lt;li&gt;How many sub-dependencies does it have?
&lt;ul&gt;
&lt;li&gt;With the rise in supply chain attacks, newer packages try to minimize these with some advertising zero dependencies&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;How much will it add to bundle size?
&lt;ul&gt;
&lt;li&gt;I usually check &lt;a href=&#34;https://bundlephobia.com/&#34;&gt;Bundlephobia&lt;/a&gt; and this displays the stats from there along with everything else&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;How widely used is it?&lt;/li&gt;
&lt;/ul&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/node/npm-package-info/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>uv package manager</title>
      <link>https://www.brandonpugh.com/til/python/uv-package-manager/</link>
      <pubDate>Mon, 27 Jan 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/python/uv-package-manager/</guid>
      <description>&lt;p&gt;I recently came across this post, &lt;a href=&#34;https://valatka.dev/2025/01/12/on-killer-uv-feature.html&#34;&gt;Uv has a killer feature you should know about&lt;/a&gt;, which led me to discover the &lt;a href=&#34;https://github.com/astral-sh/uv&#34;&gt;uv&lt;/a&gt; package and project manager for Python.
This seems to be the new preferred tool for managing python versions/dependencies as it&amp;rsquo;s faster and can replace pyenv, pip, virtualenv, and others.&lt;/p&gt;
&lt;p&gt;It just saved me some headache as I tend to mostly use python for various tools and I tried to install a package the other day with &lt;code&gt;pip install&lt;/code&gt; but it failed with some inscrutable error.
Then I realized the package wouldn&amp;rsquo;t work with python 3.13 which I&amp;rsquo;d been using — and python 3.12 was causing a sub dependency to throw warnings — but 3.11 turned out to be the lucky version which &lt;code&gt;uv&lt;/code&gt; made it easy to setup with:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;uv python install 3.11
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;uv add tool &amp;lt;package&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Their &lt;a href=&#34;https://docs.astral.sh/uv/#getting-started&#34;&gt;docs&lt;/a&gt; were really helpful and installing it was pretty easy even on windows.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/python/uv-package-manager/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Learn Yjs by Jamsocket</title>
      <link>https://www.brandonpugh.com/links/learn-yjs-by-jamsocket/</link>
      <pubDate>Fri, 17 Jan 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/links/learn-yjs-by-jamsocket/</guid>
      <description>&lt;p&gt;Yjs is a CRDT (Conflict-free replicated data type) library for building collaborative and local-first apps. I&amp;rsquo;ve come across CDRTs in the past as being pretty powerful pattern but aren&amp;rsquo;t the most intuitive so this could be a handy tutorial. I haven&amp;rsquo;t had a chance to play with it but this looks like a great way to learn about building collaborative, syncing webapps from the ground up.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://learn.yjs.dev/&#34;&gt;https://learn.yjs.dev/&lt;/a&gt;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/learn-yjs-by-jamsocket/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Run your GitHub Actions locally</title>
      <link>https://www.brandonpugh.com/links/nektos-act-run-your-github-actions-locally/</link>
      <pubDate>Fri, 17 Jan 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/links/nektos-act-run-your-github-actions-locally/</guid>
      <description>&lt;p&gt;I came across this project as a handy way to run github actions locally&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://github.com/nektos/act&#34;&gt;https://github.com/nektos/act&lt;/a&gt;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/nektos-act-run-your-github-actions-locally/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>The making of Bring Back Plus/Minus - Visual Studio Blog</title>
      <link>https://www.brandonpugh.com/links/the-making-of-bring-back-plus-minus-visual-studio-blog/</link>
      <pubDate>Thu, 16 Jan 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/links/the-making-of-bring-back-plus-minus-visual-studio-blog/</guid>
      <description>&lt;p&gt;I thought this was an interesting post about how this Visual Studio extension came to be. Not only because it shows some details about how you would go about making something like this but also because all it does is restore a small UI change the VS team made that I hadn&amp;rsquo;t even really noticed but apparently upset a lot of people&amp;hellip;&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://devblogs.microsoft.com/visualstudio/the-making-of-bring-back-plus-minus/&#34;&gt;https://devblogs.microsoft.com/visualstudio/the-making-of-bring-back-plus-minus/&lt;/a&gt;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/the-making-of-bring-back-plus-minus-visual-studio-blog/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Netlify Free Plan</title>
      <link>https://www.brandonpugh.com/links/netlify-free-plan/</link>
      <pubDate>Fri, 10 Jan 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/links/netlify-free-plan/</guid>
      <description>&lt;p&gt;It&amp;rsquo;s nice that Netlify listened to a common complaint and you now have the option to not worry about an unexpected bill.&lt;/p&gt;
&lt;p&gt;For me at least I had to go in and manually downgrade — and I had to give a reason why.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://frontendmasters.com/blog/netlify-free-plan/&#34;&gt;https://frontendmasters.com/blog/netlify-free-plan/&lt;/a&gt;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/netlify-free-plan/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Things we learned about LLMs in 2024</title>
      <link>https://www.brandonpugh.com/links/things-we-learned-about-llms-in-2024/</link>
      <pubDate>Fri, 10 Jan 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/links/things-we-learned-about-llms-in-2024/</guid>
      <description>&lt;p&gt;A nice overview of the advancements in LLMs over the last year. Also, Simon Wilson (co-creator of Django) is a pretty level-headed yet prolific voice to follow about AI.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://simonwillison.net/2024/Dec/31/llms-in-2024/&#34;&gt;https://simonwillison.net/2024/Dec/31/llms-in-2024/&lt;/a&gt;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/things-we-learned-about-llms-in-2024/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Mistakes engineers make in large established codebases</title>
      <link>https://www.brandonpugh.com/links/mistakes-engineers-make-in-large-established-codebases-sean-goedecke/</link>
      <pubDate>Thu, 09 Jan 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/links/mistakes-engineers-make-in-large-established-codebases-sean-goedecke/</guid>
      <description>&lt;p&gt;What I&amp;rsquo;ve learned from ten years working on projects like this&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://www.seangoedecke.com/large-established-codebases/&#34;&gt;https://www.seangoedecke.com/large-established-codebases/&lt;/a&gt;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/mistakes-engineers-make-in-large-established-codebases-sean-goedecke/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>A single input in a form can submit</title>
      <link>https://www.brandonpugh.com/til/html/single-text-field-submit/</link>
      <pubDate>Tue, 07 Jan 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/html/single-text-field-submit/</guid>
      <description>&lt;p&gt;Today I learned that if you have a single text field in a form then browsers will automatically submit it when you press &lt;code&gt;enter&lt;/code&gt;.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-html&#34; data-lang=&#34;html&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;form&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;label&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    Search
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;input&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;type&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;text&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;label&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;form&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This is kinda handy since normally you need to add a submit button to be able to submit a form — but, you should be aware that if you add another field then you &lt;em&gt;do&lt;/em&gt; need to add a submit button for the form to work.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://www.htmhell.dev/adventcalendar/2024/10/&#34;&gt;This post&lt;/a&gt; goes into more detail.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/html/single-text-field-submit/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Visualizing Algorithms</title>
      <link>https://www.brandonpugh.com/links/visualizing-algorithms/</link>
      <pubDate>Tue, 07 Jan 2025 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/links/visualizing-algorithms/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://bost.ocks.org/mike/algorithms/&#34;&gt;Visualizing algorithms&lt;/a&gt;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/visualizing-algorithms/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Type check and cast</title>
      <link>https://www.brandonpugh.com/til/csharp/type-check-and-cast/</link>
      <pubDate>Fri, 13 Dec 2024 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/csharp/type-check-and-cast/</guid>
      <description>&lt;p&gt;Today I learned that you can use pattern matching in C# to check for a type and cast to it in the same expression.
See &lt;a href=&#34;https://learn.microsoft.com/en-us/dotnet/csharp/fundamentals/functional/pattern-matching&#34;&gt;the docs&lt;/a&gt; for more details.&lt;/p&gt;
&lt;p&gt;Microsoft even has a &lt;a href=&#34;https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0020-ide0038&#34;&gt;lint rule&lt;/a&gt; for it.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-csharp&#34; data-lang=&#34;csharp&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;x&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;is&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Fruit&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;  &lt;span class=&#34;c1&#34;&gt;// Noncompliant&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;kt&#34;&gt;var&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;f&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Fruit&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;x&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt; &lt;span class=&#34;c1&#34;&gt;// or x as Fruit&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;c1&#34;&gt;// ...&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-csharp&#34; data-lang=&#34;csharp&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;x&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;is&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Fruit&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;fruit&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;c1&#34;&gt;// ...&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/csharp/type-check-and-cast/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>setSelectionRange in Safari will focus the input</title>
      <link>https://www.brandonpugh.com/til/html/setselectionrange/</link>
      <pubDate>Sun, 08 Dec 2024 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/html/setselectionrange/</guid>
      <description>&lt;p&gt;Apparently in Safari, &lt;a href=&#34;https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/setSelectionRange&#34;&gt;&lt;code&gt;setSelectionRange()&lt;/code&gt;&lt;/a&gt; will focus the element even when not focused despite MDN stating that &amp;ldquo;The element must be focused for the call to have any effect&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;According to this &lt;a href=&#34;https://bugs.webkit.org/show_bug.cgi?id=224425&#34;&gt;bug&lt;/a&gt;, this is considered intended behavior even though it&amp;rsquo;s inconsistent with MDN and the other browsers.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s worth noting though, during my testing, I noticed that Chrome/Firefox &lt;em&gt;will&lt;/em&gt; update the selection and cursor position you just won&amp;rsquo;t see it unless you programmatically call &lt;code&gt;.focus()&lt;/code&gt; on the element.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/html/setselectionrange/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Stash changes in the index</title>
      <link>https://www.brandonpugh.com/til/git/stash-index/</link>
      <pubDate>Wed, 27 Nov 2024 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/git/stash-index/</guid>
      <description>&lt;p&gt;I just recently discovered that Git 2.35 added the &lt;code&gt;--staged&lt;/code&gt; option to the &lt;code&gt;git stash&lt;/code&gt; command.
This makes it easy to quickly stash only the changes that you&amp;rsquo;ve staged.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/git/stash-index/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Vim sets auto marks</title>
      <link>https://www.brandonpugh.com/til/vim/auto-marks/</link>
      <pubDate>Sun, 24 Nov 2024 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/vim/auto-marks/</guid>
      <description>&lt;p&gt;Today I learned that Vim has some special marks which it sets automatically:&lt;/p&gt;
&lt;table&gt;
  &lt;thead&gt;
      &lt;tr&gt;
          &lt;th&gt;Command&lt;/th&gt;
          &lt;th&gt;Description&lt;/th&gt;
      &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;code&gt;`.&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;jump to position where last change occurred in current buffer&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;code&gt;`&amp;quot;&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;jump to position where last exited current buffer&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;code&gt;`0&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;jump to position in last file edited (when exited Vim)&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;code&gt;`1&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;like &lt;code&gt;`0&lt;/code&gt; but the previous file (also &lt;code&gt;`2&lt;/code&gt; etc)&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;code&gt;&#39;&#39;&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;jump back (to line in current buffer where jumped from)&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;code&gt;``&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;jump back (to position in current buffer where jumped from)&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;code&gt;&#39;[&lt;/code&gt; or &lt;code&gt;&#39;]&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;jump to beginning/end of previously changed or yanked text&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;code&gt;&#39;&amp;lt;&lt;/code&gt; or &lt;code&gt;&#39;&amp;gt;&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;jump to beginning/end of last visual selection&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;The funny thing is VsVim displays these in the gutter by default and I never knew what the symbols meant.
Vscode-vim has an option to display marks in the gutter but only the regular marks and not these.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/vim/auto-marks/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Selectively restoring changes from another branch or commit</title>
      <link>https://www.brandonpugh.com/til/git/patch-uses/</link>
      <pubDate>Thu, 21 Nov 2024 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/git/patch-uses/</guid>
      <description>&lt;p&gt;Today I learned that you can use the &lt;code&gt;--patch&lt;/code&gt; parameter with several git commands.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;--patch&lt;/code&gt; parameter is probably most known for interactively staging changes from the cli, but I&amp;rsquo;ve never really used it because I find &lt;a href=&#34;https://www.brandonpugh.com/til/visual-studio/line-staging/&#34;&gt;GUI clients&lt;/a&gt; are much more convenient for this.&lt;/p&gt;
&lt;p&gt;But apparently you can also use it with restore/checkout to grab specific changes from another branch.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git restore --source&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;branch-name --patch
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This is something I haven&amp;rsquo;t seen easily done in any git client.&lt;/p&gt;
&lt;p&gt;See &lt;a href=&#34;https://tekin.co.uk/2024/08/the-many-uses-for-git-patch&#34;&gt;Tekin&amp;rsquo;s post it&lt;/a&gt; for more details and other uses.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/git/patch-uses/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Personal git ignore per repository</title>
      <link>https://www.brandonpugh.com/til/git/personal-git-ignore/</link>
      <pubDate>Tue, 19 Nov 2024 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/git/personal-git-ignore/</guid>
      <description>&lt;p&gt;Today I learned that git has a &lt;code&gt;$GIT_DIR/info/exclude&lt;/code&gt; file can contain additional patterns of files to ignore but isn&amp;rsquo;t committed to the repository.&lt;/p&gt;
&lt;p&gt;For me this is handy for some tooling configuration files that I use personally but don&amp;rsquo;t want to clutter the main &lt;code&gt;.gitignore&lt;/code&gt; of the repo.&lt;/p&gt;
&lt;p&gt;If there are some files that you want to &lt;em&gt;always&lt;/em&gt; ignore, then you can specify a &lt;strong&gt;global&lt;/strong&gt; ignore file in your git config with &lt;code&gt;core.excludesFile&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://git-scm.com/docs/gitignore&#34;&gt;The official docs&lt;/a&gt; have a nice breakdown of when to use which method.&lt;/p&gt;
&lt;h2 id=&#34;dont-you-want-to-be-using-the-same-tools-as-the-rest-of-your-team&#34;&gt;Don&amp;rsquo;t you want to be using the same tools as the rest of your team?&lt;/h2&gt;
&lt;p&gt;Great point!
For me it&amp;rsquo;s usually specific editor config files that I have set in my global git ignore file since I&amp;rsquo;d never want them committed.
For example I use vim for certain things so I have these files ignored in &lt;code&gt;~/.gitignore_global&lt;/code&gt;:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# Swap files
[._]*.s[a-v][a-z]
[._]*.sw[a-p]

# Session
Session.vim

# Temporary
*~
# Auto-generated tag files
tags
# Persistent undo
[._]*.un~

.vscode
.zed
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;I have &lt;code&gt;.vscode&lt;/code&gt; in there as well since I occasionally find myself on teams where no one else uses it&amp;hellip; and &lt;a href=&#34;https://zed.dev/&#34;&gt;Zed&lt;/a&gt; is really new but I&amp;rsquo;ve just been playing around with it.&lt;/p&gt;
&lt;p&gt;For repo specific ignores in &lt;code&gt;$GIT_DIR/info/exclude&lt;/code&gt;, it tends to be tools for managing environments like &lt;a href=&#34;https://volta.sh/&#34;&gt;Volta&lt;/a&gt; for node or &lt;a href=&#34;https://asdf-vm.com/&#34;&gt;asdf&lt;/a&gt; and &lt;a href=&#34;https://mise.jdx.dev/&#34;&gt;mise&lt;/a&gt; for other runtimes.&lt;/p&gt;
&lt;p&gt;Also sometimes I find it useful to run some linting tools for myself when the rest of team hasn&amp;rsquo;t bought into it yet.&lt;/p&gt;
&lt;p&gt;For example, it took over a year with recent team to convince them add eslint to the project but in the mean time it was at least catching things for me in the editor with my own code or while reviewing PRs.&lt;/p&gt;
&lt;p&gt;Likewise, I always have &lt;a href=&#34;https://cspell.org/&#34;&gt;cSpell&lt;/a&gt; running with Vscode to spell check my code so I have the &lt;code&gt;project-words.txt&lt;/code&gt; file ignored.
I don&amp;rsquo;t have these ignored globally since in some repos they do end up getting committed.&lt;/p&gt;
&lt;p&gt;But I totally agree, you want to be cognizant of potential conflicts with the rest of the team depending on the tool.
Configuration for tools like code formatters should definitely be shared with the team. And trying to use something like &lt;code&gt;yarn&lt;/code&gt; when the team is using &lt;code&gt;npm&lt;/code&gt;, is asking for trouble.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/git/personal-git-ignore/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Raw string literals in C# 11</title>
      <link>https://www.brandonpugh.com/til/csharp/raw-string-literals/</link>
      <pubDate>Mon, 18 Nov 2024 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/csharp/raw-string-literals/</guid>
      <description>&lt;p&gt;Today I learned about &lt;a href=&#34;https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/raw-string&#34;&gt;raw string literals&lt;/a&gt; introduced in C# 11.&lt;/p&gt;
&lt;p&gt;The big improvement to me is that you don&amp;rsquo;t need to escape double quotes.&lt;/p&gt;
&lt;p&gt;So no more of this noise if you need a json string:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-csharp&#34; data-lang=&#34;csharp&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;kt&#34;&gt;string&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;json&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s&#34;&gt;@&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s&#34;&gt;{
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s&#34;&gt;  &amp;#34;&amp;#34;number&amp;#34;&amp;#34;: 42,
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s&#34;&gt;  &amp;#34;&amp;#34;text&amp;#34;&amp;#34;: &amp;#34;&amp;#34;Hello, world&amp;#34;&amp;#34;,
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s&#34;&gt;  &amp;#34;&amp;#34;nested&amp;#34;&amp;#34;: { &amp;#34;&amp;#34;flag&amp;#34;&amp;#34;: true }
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s&#34;&gt;}&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;You can now write:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-csharp&#34; data-lang=&#34;csharp&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;kt&#34;&gt;string&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;json&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s&#34;&gt;&amp;#34;&amp;#34;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;          &lt;span class=&#34;s&#34;&gt;&amp;#34;number&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;42&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;          &lt;span class=&#34;s&#34;&gt;&amp;#34;text&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;s&#34;&gt;&amp;#34;Hello, world&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;          &lt;span class=&#34;s&#34;&gt;&amp;#34;nested&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt; &lt;span class=&#34;s&#34;&gt;&amp;#34;flag&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;kc&#34;&gt;true&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;s&#34;&gt;&amp;#34;&amp;#34;&amp;#34;;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The other nice feature is that an extraneous indentation will stripped out based on the location of the closing &lt;code&gt;&amp;quot;&amp;quot;&amp;quot;&lt;/code&gt;. 🔥&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://www.stevefenton.co.uk/blog/2022/02/raw-string-literals-in-c/&#34;&gt;This post&lt;/a&gt; goes into it deeper.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/csharp/raw-string-literals/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>SRI integrity hash algorithms</title>
      <link>https://www.brandonpugh.com/til/html/sri-hash-algorithm/</link>
      <pubDate>Tue, 12 Nov 2024 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/html/sri-hash-algorithm/</guid>
      <description>&lt;p&gt;Today I learned that you can actually specify different hash algorithms for &lt;a href=&#34;https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity&#34;&gt;Subresource Integrity&lt;/a&gt; (SRI) hashes.&lt;/p&gt;
&lt;p&gt;If you aren&amp;rsquo;t familiar with SRI, &lt;a href=&#34;https://frontendmasters.com/blog/script-integrity/&#34;&gt;this post&lt;/a&gt; does a good job explaining why it&amp;rsquo;s useful and how it would have mitigated the recent &lt;a href=&#34;https://www.securityweek.com/polyfill-supply-chain-attack-hits-over-100k-websites/&#34;&gt;pollyfill.io incident&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I needed to add the hashes to some scripts from a third party CDN that didn&amp;rsquo;t provide them and I came across this handy &lt;a href=&#34;https://www.srihash.org/&#34;&gt;generator&lt;/a&gt; which let&amp;rsquo;s you choose which algorithm to use and defaults to SHA-384 and &lt;a href=&#34;https://report-uri.com/home/sri_hash&#34;&gt;report-uri&lt;/a&gt; has a generator that just includes &lt;em&gt;all 3 different hashes&lt;/em&gt; in the &lt;code&gt;integrity&lt;/code&gt; value.&lt;/p&gt;
&lt;p&gt;So which one to use?&lt;/p&gt;
&lt;p&gt;Apparently you can specify different hashes but there isn&amp;rsquo;t much value in doing so at the moment since all modern browsers support all of the available algorithms so you should just pick &lt;strong&gt;&lt;code&gt;SHA512&lt;/code&gt;&lt;/strong&gt;.
In the future however, newer algorithms might be implemented which you could add while maintaining backwards compatibility.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/html/sri-hash-algorithm/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Option&#43;Click React components in your browser to instantly open the source in VS Code</title>
      <link>https://www.brandonpugh.com/links/click-to-component-option-click-react-components-in-your-browser-to-instantly-open-the-source/</link>
      <pubDate>Sat, 09 Nov 2024 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/links/click-to-component-option-click-react-components-in-your-browser-to-instantly-open-the-source/</guid>
      <description>&lt;p&gt;Option+Click React components in your browser to instantly open the source in VS Code. This looks like it could be handy. I&amp;rsquo;ll have to give it a try.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://github.com/ericclemmons/click-to-component&#34;&gt;https://github.com/ericclemmons/click-to-component&lt;/a&gt;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/links/click-to-component-option-click-react-components-in-your-browser-to-instantly-open-the-source/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Use `URLSearchParams()` to build a query string</title>
      <link>https://www.brandonpugh.com/til/javascript/urlsearchparams-query-string/</link>
      <pubDate>Thu, 07 Nov 2024 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/javascript/urlsearchparams-query-string/</guid>
      <description>&lt;p&gt;Today I learned that javascript has a handy built-in function called &lt;code&gt;URLSearchParams()&lt;/code&gt; that you can use to build a url query string from an object.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-js&#34; data-lang=&#34;js&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kr&#34;&gt;const&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;petfinderData&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;nx&#34;&gt;key&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;12345&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;nx&#34;&gt;shelterID&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;abc00&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;nx&#34;&gt;count&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;20&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;nx&#34;&gt;animals&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;dogs&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;cats&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;],&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kr&#34;&gt;const&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;query&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;new&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;URLSearchParams&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;petfinderData&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;// returns &amp;#34;key=12345&amp;amp;shelterID=abc00&amp;amp;count=20&amp;amp;animals=dogs%2Ccats&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kr&#34;&gt;const&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;queryString&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;query&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;toString&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;();&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Read more: &lt;a href=&#34;https://gomakethings.com/how-to-build-a-query-string-from-an-object-of-data-with-vanilla-js/&#34;&gt;https://gomakethings.com/how-to-build-a-query-string-from-an-object-of-data-with-vanilla-js/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You&amp;rsquo;ll want to be careful with complex object list arrays since it serializes to a form like &lt;code&gt;animals=dogs,cats&lt;/code&gt;, which not be the format the server expects.&lt;/p&gt;
&lt;p&gt;Asp.net model-binding for instance, by default expects a format like &lt;code&gt;animals=dogs&amp;amp;animals=cats&lt;/code&gt; (and some other &lt;a href=&#34;https://learn.microsoft.com/en-us/aspnet/core/mvc/models/model-binding?view=aspnetcore-8.0#collections&#34;&gt;variations&lt;/a&gt;).&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/javascript/urlsearchparams-query-string/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Edit commit message with git reword</title>
      <link>https://www.brandonpugh.com/til/git/edit-commit-message-with-reword/</link>
      <pubDate>Sat, 02 Nov 2024 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/git/edit-commit-message-with-reword/</guid>
      <description>&lt;p&gt;I discovered that a &lt;a href=&#34;https://git-scm.com/docs/git-commit?ref=blog.gitbutler.com#Documentation/git-commit.txt---fixupamendrewordltcommitgt&#34;&gt;&lt;code&gt;reword&lt;/code&gt;&lt;/a&gt; option was added to &lt;code&gt;--fixup&lt;/code&gt; back in &lt;a href=&#34;https://devclass.com/2021/06/07/got-typos-git-2-32-lands-finally-offers-way-to-reword-commits/&#34;&gt;git 2.32&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The basic command looks like &lt;code&gt;git commit --fixup=reword:&amp;lt;commit&amp;gt;&lt;/code&gt; and you can use it like you would the other &lt;a href=&#34;https://thoughtbot.com/blog/autosquashing-git-commits&#34;&gt;autosquash&lt;/a&gt; commands.&lt;/p&gt;
&lt;p&gt;I recommend creating an alias for it though.
Thanks to &lt;a href=&#34;https://jordanelver.co.uk/blog/2020/06/04/fixing-commits-with-git-commit-fixup-and-git-rebase-autosquash/&#34;&gt;this post&lt;/a&gt;, I&amp;rsquo;ve had a &lt;code&gt;fixup&lt;/code&gt; alias that uses &lt;a href=&#34;https://github.com/junegunn/fzf&#34;&gt;&lt;code&gt;fzf&lt;/code&gt;&lt;/a&gt; to select form recent commits so I created a similar one for reword:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;alias&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;nv&#34;&gt;reword&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;!git log -n 50 --pretty=format:&amp;#39;%h %s&amp;#39; --no-merges | fzf | cut -c -7 | xargs -o -I{} git commit --fixup=reword:{}&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Note, if you&amp;rsquo;re on Windows, you can install &lt;code&gt;fzf&lt;/code&gt; via &lt;a href=&#34;https://chocolatey.org/packages/fzf&#34;&gt;Chocolatey&lt;/a&gt;.
And you might also be interested in &lt;a href=&#34;https://github.com/kelleyma49/PSFzf&#34;&gt;PSFzf&lt;/a&gt; which a Powershell module that wraps &lt;code&gt;fzf&lt;/code&gt;.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/git/edit-commit-message-with-reword/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>View ModelState errors while debugging</title>
      <link>https://www.brandonpugh.com/til/aspnet/view-modelstate-errors/</link>
      <pubDate>Mon, 28 Oct 2024 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/aspnet/view-modelstate-errors/</guid>
      <description>&lt;p&gt;Today I learned how you can view the Modelstate errors while debugging a controller in Asp.Net:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-csharp&#34; data-lang=&#34;csharp&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;ModelState&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Where&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;x&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;x&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Value&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Errors&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Count&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;).&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Select&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;x&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;x&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Key&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;).&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;ToList&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Just paste that in the watch window.&lt;/p&gt;
&lt;p&gt;If you&amp;rsquo;ve tried debugging to find what field is causing the Modelstate to be invalid, you&amp;rsquo;ll know how tedious it is to dig through but thanks to &lt;a href=&#34;https://windowshell.wordpress.com/2016/06/11/realtime-mvc-modelstate-errors-during-debugging/&#34;&gt;this post&lt;/a&gt; for this handy tip!&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/aspnet/view-modelstate-errors/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>View transitions API</title>
      <link>https://www.brandonpugh.com/til/css/view-transition/</link>
      <pubDate>Tue, 22 Oct 2024 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/css/view-transition/</guid>
      <description>&lt;p&gt;Today I learned about the new &lt;a href=&#34;https://developer.chrome.com/docs/web-platform/view-transitions&#34;&gt;view transitions API&lt;/a&gt; and I was pretty impressed with how much of the heavy lifting the browser will now do for you to animate between states.&lt;/p&gt;
&lt;p&gt;Adam Argyle has a &lt;a href=&#34;https://www.youtube.com/watch?v=is1C2RDV4LI&#34;&gt;fun talk&lt;/a&gt; where he shows what you can do with this new API.&lt;/p&gt;
&lt;p&gt;I only had to add a couple of lines of javascript to animate reordering a list of items that would have required a more complicated technique like &lt;a href=&#34;https://aerotwist.com/blog/flip-your-animations/&#34;&gt;FLIP (first last invert play)&lt;/a&gt; in the past.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/css/view-transition/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Don&#39;t put an error boundary in the root of a react component</title>
      <link>https://www.brandonpugh.com/til/react/error-boundary-root/</link>
      <pubDate>Tue, 15 Oct 2024 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/react/error-boundary-root/</guid>
      <description>&lt;p&gt;You probably don&amp;rsquo;t want to put a React error boundary at the root of a component (meaning, wrapping the component&amp;rsquo;s own render output).&lt;/p&gt;
&lt;p&gt;This is because error boundaries only catch errors in their child component tree.
They won&amp;rsquo;t catch errors that occur within the error boundary component itself, including errors in its own render method or lifecycle methods.&lt;/p&gt;
&lt;p&gt;To use an error boundary effectively, you need to wrap the component you want to protect with the error boundary from the parent.&lt;/p&gt;
&lt;p&gt;For example, you might think to put the error boundary inside a list item that gets rendered in a list:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-jsx&#34; data-lang=&#34;jsx&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kd&#34;&gt;function&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;ChatMessage&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;({&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;message&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;})&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;c1&#34;&gt;// If parsing JSON fails, the error boundary inside won&amp;#39;t catch it
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;kr&#34;&gt;const&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;parsedData&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;JSON&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;parse&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;message&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;content&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;k&#34;&gt;return&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;ErrorBoundary&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;fallback&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;p&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;Failed&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;to&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;display&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;message&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;p&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;}&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;div&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;className&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;message&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;span&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;className&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;author&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;{&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;parsedData&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;author&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;}&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;span&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;p&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;className&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;content&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;{&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;parsedData&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;text&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;}&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;p&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;div&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;ErrorBoundary&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kd&#34;&gt;function&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;ChatList&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;({&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;messages&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;})&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;k&#34;&gt;return&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;div&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;className&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;chat-container&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;messages&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;map&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;message&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;ChatMessage&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;key&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;message&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;id&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;message&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;message&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;/&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;p&#34;&gt;))}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;div&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The correct approach would be putting the error boundary in the parent component:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-jsx&#34; data-lang=&#34;jsx&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kd&#34;&gt;function&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;ChatMessage&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;({&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;message&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;})&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;kr&#34;&gt;const&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;parsedData&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;JSON&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;parse&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;message&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;content&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;k&#34;&gt;return&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;div&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;className&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;message&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;span&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;className&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;author&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;{&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;parsedData&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;author&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;}&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;span&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;p&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;className&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;content&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;{&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;parsedData&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;text&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;}&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;p&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;div&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kd&#34;&gt;function&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;ChatList&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;({&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;messages&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;})&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;// Correct approach with error boundary wrapping from parent
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;k&#34;&gt;return&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;div&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;className&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;chat-container&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;messages&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;map&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;message&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;ErrorBoundary&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;key&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;message&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;id&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;fallback&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;p&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;Failed&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;to&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;display&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;message&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;p&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;}&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;          &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;ChatMessage&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;message&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;message&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;/&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;ErrorBoundary&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;p&#34;&gt;))}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;div&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/react/error-boundary-root/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Console.trace()</title>
      <link>https://www.brandonpugh.com/til/javascript/console-trace/</link>
      <pubDate>Thu, 10 Oct 2024 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/javascript/console-trace/</guid>
      <description>&lt;p&gt;Today I learned about &lt;code&gt;console.trace()&lt;/code&gt; when I needed to find out where a global function was being overridden:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-js&#34; data-lang=&#34;js&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;Object&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;defineProperty&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;window&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;setErrorMessage&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;nx&#34;&gt;set&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;value&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;nx&#34;&gt;console&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;trace&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;Global variable set:&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;value&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;});&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This little snippet outputs a stack trace anywhere code was trying to define this global function and let me right to the culprit.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://developer.mozilla.org/en-US/docs/Web/API/console/trace_static&#34;&gt;See more about .trace()&lt;/a&gt;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/javascript/console-trace/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>History API state</title>
      <link>https://www.brandonpugh.com/til/html/history-state/</link>
      <pubDate>Mon, 07 Oct 2024 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/html/history-state/</guid>
      <description>&lt;p&gt;Today I learned that you can actually store state in the browser history via the &lt;a href=&#34;https://developer.mozilla.org/en-US/docs/Web/API/History&#34;&gt;history API&lt;/a&gt; (note this is not the query string).&lt;/p&gt;
&lt;p&gt;I came across in &lt;a href=&#34;https://darekkay.com/blog/preserve-form-values/&#34;&gt;this post&lt;/a&gt; that uses it as a clever method for temporarily storing form data.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/html/history-state/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>New hotkey for commenting code</title>
      <link>https://www.brandonpugh.com/til/visual-studio/toggle-commented-code-hotkey/</link>
      <pubDate>Thu, 03 Oct 2024 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/visual-studio/toggle-commented-code-hotkey/</guid>
      <description>&lt;p&gt;Today I learned that in a recent version of visual studio they added the keyboard shortcut &lt;code&gt;ctrl+/&lt;/code&gt; to toggle code comments so it works just like in vscode instead of the default of two different cumbersome hotkeys to comment/uncomment.&lt;/p&gt;
&lt;p&gt;This also led me to discover that Visual Studio comes with a builtin &lt;a href=&#34;https://stackoverflow.com/a/62414810/1715138&#34;&gt;keyboard mapping scheme for VSCode&lt;/a&gt; hotkeys which has more modern defaults.
For instance, it changes &lt;code&gt;ctrl+p&lt;/code&gt; to open the fuzzy file finder instead of the print dialog&amp;hellip; I don&amp;rsquo;t know that I&amp;rsquo;ve ever wanted to print a source code file&amp;hellip;&lt;br&gt;
except one time long ago when I wanted to convince a higher-up the need to refactor a sql query so I taped together the 10+ page printout 😅.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/visual-studio/toggle-commented-code-hotkey/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Chain-of-Thought Prompting</title>
      <link>https://www.brandonpugh.com/til/ai/train-of-thought/</link>
      <pubDate>Fri, 20 Sep 2024 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/ai/train-of-thought/</guid>
      <description>&lt;p&gt;Today I learned about &lt;a href=&#34;https://www.promptingguide.ai/techniques/cot&#34;&gt;Chain-of-Thought Prompting&lt;/a&gt; which is a technique to get potentially better results from an LLM where you craft your prompt with an example of the chain of thought or steps in reasoning to solve a complex problem.&lt;/p&gt;
&lt;p&gt;This gives a good explanation:
&lt;a href=&#34;https://www.promptingguide.ai/techniques/cot&#34;&gt;https://www.promptingguide.ai/techniques/cot&lt;/a&gt;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/ai/train-of-thought/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>HTTP files</title>
      <link>https://www.brandonpugh.com/til/vscode/http-files/</link>
      <pubDate>Fri, 13 Sep 2024 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/vscode/http-files/</guid>
      <description>&lt;p&gt;Today I learned about &lt;code&gt;.http&lt;/code&gt; files that you can use to make/test requests to any api endpoint from within most IDEs/editors.&lt;/p&gt;
&lt;p&gt;This started with the &lt;a href=&#34;https://marketplace.visualstudio.com/items?itemName=humao.rest-client&#34;&gt;Rest client&lt;/a&gt; vscode extension and then &lt;a href=&#34;https://learn.microsoft.com/en-us/aspnet/core/test/http-files?view=aspnetcore-8.0&#34;&gt;Visual Studio 2022&lt;/a&gt; added support somewhat recently.&lt;/p&gt;
&lt;p&gt;It kinda acts like an alternative to something like Postman but without leaving your editor, but for me the nice thing is it can act like a runnable form of documentation for your api that you can commit alongside your code.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/vscode/http-files/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Tips for creating merge commits</title>
      <link>https://www.brandonpugh.com/blog/tips-for-creating-merge-commits/</link>
      <pubDate>Sat, 31 Aug 2024 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/blog/tips-for-creating-merge-commits/</guid>
      <description>&lt;p&gt;I&amp;rsquo;ve reviewed quite a few pull requests in recent years and I&amp;rsquo;ve noticed some less-than-ideal practices when it comes to creating merge commits so I thought I&amp;rsquo;d list some things you can do to make life a little easier for someone reviewing your code.&lt;/p&gt;
&lt;h2 id=&#34;make-the-commit-message-as-useful-as-possible&#34;&gt;Make the commit message as useful as possible&lt;/h2&gt;
&lt;p&gt;A lot has been written about &lt;a href=&#34;https://cbea.ms/git-commit/&#34;&gt;how to write good commit messages&lt;/a&gt;, but I rarely see the advice applied to merge commits.
They may not be the most exciting type of commit, but they&amp;rsquo;re still very important.&lt;/p&gt;
&lt;h3 id=&#34;when-merging-prs&#34;&gt;When merging PRs&lt;/h3&gt;
&lt;p&gt;Merge commits that merge a pull request are more straight forward because, these days, they&amp;rsquo;re generally created by the git hosting service so you know they only contain all the changes from that feature branch.&lt;/p&gt;
&lt;p&gt;But you can still make sure they convey the most useful info.
I like the default from Azure DevOps:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-txt&#34; data-lang=&#34;txt&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Merged PR 123: &amp;lt;PR title&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&amp;lt;PR Description&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;You can get a similar default in GitHub by configuring the default &lt;a href=&#34;https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/configuring-commit-merging-for-pull-requests&#34;&gt;merge commit settings&lt;/a&gt; in the repository settings.
If you&amp;rsquo;re already writing a &lt;a href=&#34;https://www.pullrequest.com/blog/writing-a-great-pull-request-description/&#34;&gt;valuable PR description&lt;/a&gt;, why not immortalize it in the repo itself?&lt;/p&gt;
&lt;p&gt;Note: This is even more important for squash merges.&lt;/p&gt;
&lt;h3 id=&#34;for-other-merge-commits&#34;&gt;For other merge commits&lt;/h3&gt;
&lt;p&gt;Now, keep in mind that the need for other merge commits can be mitigated by keeping feature branches small and short-lived, but that&amp;rsquo;s not the reality for a lot of teams.&lt;/p&gt;
&lt;!-- While the need for other merge commits can be mitigated by keeping feature branches small and short-lived, this isn&#39;t always the reality for many teams. --&gt;
&lt;p&gt;For the most part I recommend sticking with the default message that git generates when you run &lt;code&gt;git commit&lt;/code&gt; to complete a merge:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-md&#34; data-lang=&#34;md&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Merge branch &amp;#39;main&amp;#39; into feature-branch
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;gh&#34;&gt;# Please enter a commit message to explain why this merge is necessary,
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;gh&#34;&gt;# especially if it merges an updated upstream into a topic branch.
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;If you notice though, it includes a comment that recommends explaining why the merge was necessary.
This could be something like &amp;ldquo;Merging in updated auth flow&amp;rdquo; or &amp;ldquo;Merging in changes to &lt;code&gt;sharedService&lt;/code&gt; to avoid conflicts&amp;rdquo;.
This also implies that you should have a reason for the merge — which I agree with because otherwise you&amp;rsquo;re adding unnecessary noise to the git log.&lt;/p&gt;
&lt;p&gt;At the very least make it clear that it&amp;rsquo;s a merge commit.
Don&amp;rsquo;t just put something like &lt;code&gt;update database migrations&lt;/code&gt; — if you did have to do that as a result of the merge then mention it in the body of the message (though as I&amp;rsquo;ll explain shortly, it should go in a followup commit).
Otherwise, depending on how you&amp;rsquo;re viewing the git log, it might not be obvious that it&amp;rsquo;s a merge commit.&lt;/p&gt;
&lt;h3 id=&#34;list-conflicts-in-the-commit-message&#34;&gt;List conflicts in the commit message&lt;/h3&gt;
&lt;p&gt;While I personally prefer to rebase branches, one advantage of merging is that it&amp;rsquo;s easier to see how any conflicts were handled.
If there were conflicts during the merge, then git will list the files in the commit message, but they&amp;rsquo;re commented out by default:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-md&#34; data-lang=&#34;md&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Merge branch &amp;#39;main&amp;#39; into feature-branch
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;gh&#34;&gt;# Conflicts:
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;gh&#34;&gt;#	package.json
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;gh&#34;&gt;#	package-lock.json
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;gh&#34;&gt;#
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;gh&#34;&gt;# It looks like you may be committing a merge.
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;gh&#34;&gt;# If this is not correct, please run
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;gh&#34;&gt;#	git update-ref -d MERGE_HEAD
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;gh&#34;&gt;# and try again.
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;You can remove the &lt;code&gt;#&lt;/code&gt; from the lines to uncomment them and include them in the commit message.&lt;/p&gt;
&lt;p&gt;As a reviewer, I appreciate this because it&amp;rsquo;s easy to make mistakes when resolving conflicts so if I see files listed then I can scrutinize them more closely.&lt;/p&gt;
&lt;p&gt;You can make it even more convenient by using a &lt;a href=&#34;https://git-scm.com/docs/githooks#_prepare_commit_msg&#34;&gt;&lt;code&gt;prepare-commit-msg&lt;/code&gt;&lt;/a&gt; hook to uncomment them automatically:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nv&#34;&gt;COMMIT_MSG_FILE&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nv&#34;&gt;COMMIT_SOURCE&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$2&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$COMMIT_SOURCE&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;merge&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;]&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;then&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    sed -i.bak &lt;span class=&#34;s1&#34;&gt;&amp;#39;/^# Conflicts:/,/^#$/ s/..//&amp;#39;&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$COMMIT_MSG_FILE&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;fi&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h4 id=&#34;bonus-use-git-show---remerge-diff-to-see-how-they-were-resolved&#34;&gt;Bonus: use &lt;code&gt;git show --remerge-diff&lt;/code&gt; to see how they were resolved&lt;/h4&gt;
&lt;p&gt;&lt;a href=&#34;https://github.blog/2022-04-18-highlights-from-git-2-36/#review-merge-conflict-resolution-with-remerge-diff&#34;&gt;In Git 2.36&lt;/a&gt;, the &lt;code&gt;--remerge-diff&lt;/code&gt; option was added to &lt;code&gt;git show&lt;/code&gt;.
This makes it easier to see how conflicts were resolved in a merge commit.&lt;/p&gt;
&lt;h2 id=&#34;avoid-evil-merges&#34;&gt;Avoid &amp;ldquo;evil&amp;rdquo; merges&lt;/h2&gt;
&lt;p&gt;An &amp;ldquo;evil&amp;rdquo; merge as defined by the &lt;a href=&#34;https://git-scm.com/docs/gitglossary.html#Documentation/gitglossary.txt-aiddefevilmergeaevilmerge&#34;&gt;git docs&lt;/a&gt; is:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;a merge that introduces changes that do not appear in any parent.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;or as Linus himself &lt;a href=&#34;https://www.mail-archive.com/git@vger.kernel.org/msg73938.html&#34;&gt;puts it&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;an &amp;ldquo;evil merge&amp;rdquo; is something that makes changes that came from neither side and aren&amp;rsquo;t actually resolving a conflict&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;A merge commit is likely pulling in a large amount of unrelated changes, so it can be hard to notice if you add in your own changes.
I prefer to do the bare minimum to resolve any textual conflicts.&lt;/p&gt;
&lt;p&gt;If there are semantic issues that need to be resolved (i.e. a database view was renamed so my code fails at runtime), then I&amp;rsquo;ll fix them in a separate commit.
This not only makes it easier to review but also makes commands like &lt;code&gt;git blame&lt;/code&gt; more useful.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/blog/tips-for-creating-merge-commits/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>ASP.NET max upload file size</title>
      <link>https://www.brandonpugh.com/til/aspnet/max-upload-file-size/</link>
      <pubDate>Fri, 30 Aug 2024 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/aspnet/max-upload-file-size/</guid>
      <description>&lt;p&gt;Today I learned there are &lt;em&gt;two&lt;/em&gt; configuration values that determine how large of a file can be uploaded.
&lt;code&gt;maxRequestLength&lt;/code&gt; is specified in &lt;strong&gt;Kilobytes&lt;/strong&gt; and it&amp;rsquo;s used by the ASP.NET framework.
If the file is larger than this value then the application will throw &amp;ldquo;content length exceed&amp;rdquo; exception so it just comes back as a 500 which isn&amp;rsquo;t that helpful.
The default is about 4mb.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;maxAllowedContentLength&lt;/code&gt; is used by IIS and is specified in &lt;strong&gt;bytes&lt;/strong&gt; not kilobytes and if the file is larger then it will return 413 error status which we can handle appropriately.
The default is about 28mb.&lt;/p&gt;
&lt;p&gt;Both of these values need to set to larger than the file size we want to allow but in our case we needed the &lt;code&gt;maxAllowedContentLength&lt;/code&gt; to be the smaller value so that an upload that&amp;rsquo;s too large will always get rejected by IIS first so we can display a useful error message to the user.&lt;/p&gt;
&lt;p&gt;The issue we ran into was if the file was more than 4mb but less than 28mb, it was reject by aspnet and throwing a 500 which in production comes back as a 302 redirect to the error page which we weren&amp;rsquo;t handling so it would look like the upload was just hanging.&lt;/p&gt;
&lt;p&gt;If the file was larger than 28mb then it would get rejected by IIS and return a 413 which we &lt;em&gt;were&lt;/em&gt; handling so we would display the correct &amp;ldquo;File is too large&amp;rdquo; error message.&lt;/p&gt;
&lt;p&gt;There are even more ways to limit upload size you read about in Kahlid&amp;rsquo;s post: &lt;a href=&#34;https://khalidabuhakmeh.com/increase-file-upload-limit-for-aspdotnet&#34;&gt;increase file upload limit&lt;/a&gt;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/aspnet/max-upload-file-size/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>UUID v7</title>
      <link>https://www.brandonpugh.com/til/javascript/uuid-v7/</link>
      <pubDate>Wed, 21 Aug 2024 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/javascript/uuid-v7/</guid>
      <description>&lt;p&gt;Today I learned that there are 8 versions of UUID!&lt;/p&gt;
&lt;p&gt;I was vaguely aware that there were some older versions that aren&amp;rsquo;t recommended but just this past May the RFC was approved that added versions 6, 7, and 8.&lt;/p&gt;
&lt;p&gt;Basically, v4 is a good default if you just need a good unguessable random ID. For javascript, this is now built into browsers via &lt;a href=&#34;https://developer.mozilla.org/en-US/docs/Web/API/Crypto/randomUUID&#34;&gt;&lt;code&gt;crypto.randomUUID()&lt;/code&gt;&lt;/a&gt; — or in dotnet with &lt;code&gt;Guid.NewGuid()&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;But &lt;a href=&#34;https://uuid7.com/&#34;&gt;v7&lt;/a&gt; is an exciting new option because it&amp;rsquo;s time-based so the UUIDs are sortable based on when it was created and you can even &lt;a href=&#34;https://park.is/blog_posts/20240803_extracting_timestamp_from_uuid_v7/&#34;&gt;extract the timestamp&lt;/a&gt; if you want.
This also apparently makes it &lt;a href=&#34;https://itnext.io/why-uuid7-is-better-than-uuid4-as-clustered-index-edb02bf70056&#34;&gt;better as a database key&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The &lt;a href=&#34;https://github.com/uuidjs/uuid&#34;&gt;uuid&lt;/a&gt; npm package just added support for v7 if you need it in javascript.
For C#, v7 support is &lt;a href=&#34;https://steven-giesel.com/blogPost/ea42a518-4d8b-4e08-8f73-e542bdd3b983&#34;&gt;coming in dotnet 9&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;This is a nice &lt;a href=&#34;https://www.ntietz.com/blog/til-uses-for-the-different-uuid-versions/&#34;&gt;overview of the different versions&lt;/a&gt; if you want to read more.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/javascript/uuid-v7/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Quickly change the end of a line</title>
      <link>https://www.brandonpugh.com/til/vscode/line-ending-regex/</link>
      <pubDate>Tue, 20 Aug 2024 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/vscode/line-ending-regex/</guid>
      <description>&lt;p&gt;This is a simple thing but I just discovered that with a simple regex and find/replace in most editors, you can quickly add text to the end of every line.&lt;/p&gt;
&lt;p&gt;For instance, if you want to add a &lt;code&gt;,&lt;/code&gt; to every line, all you need is &lt;code&gt;$&lt;/code&gt;:&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;screenshot of vscode find/replace UI&#34; loading=&#34;lazy&#34; src=&#34;line-ending-regex.png&#34;&gt;&lt;/p&gt;
&lt;p&gt;Or if you want to replace whatever the last character then you can use &lt;code&gt;.$&lt;/code&gt; instead.&lt;/p&gt;
&lt;p&gt;Of course, I use &lt;a href=&#34;https://github.com/vscode-neovim/vscode-neovim&#34;&gt;vscode-neovim&lt;/a&gt; so I just type &lt;code&gt;:%s/$/,/&lt;/code&gt; 😁&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/vscode/line-ending-regex/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Abort controller</title>
      <link>https://www.brandonpugh.com/til/javascript/abort-fetch/</link>
      <pubDate>Wed, 24 Jul 2024 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/javascript/abort-fetch/</guid>
      <description>&lt;p&gt;Today I learned that you can cancel fetch requests using the &lt;a href=&#34;https://developer.mozilla.org/en-US/docs/Web/API/AbortController&#34;&gt;AbortController&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;This used to be a major shortcomming of fetch but apparently it&amp;rsquo;s been part of the web platform since 2019.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://kettanaito.com/blog/dont-sleep-on-abort-controller&#34;&gt;This post&lt;/a&gt; also explains some additional use cases for the &lt;code&gt;AbortController&lt;/code&gt;.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/javascript/abort-fetch/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Drag and drop upload</title>
      <link>https://www.brandonpugh.com/til/html/drag-drop-upload/</link>
      <pubDate>Wed, 24 Jul 2024 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/html/drag-drop-upload/</guid>
      <description>&lt;p&gt;Today I learned that creating a nice drag-and-drop file component using vanilla javascript and the built web APIs is actually fairly easy.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://www.smashingmagazine.com/2018/01/drag-drop-file-uploader-vanilla-js/&#34;&gt;Smashing Magazine&lt;/a&gt; has an easy-to-follow example.&lt;/p&gt;
&lt;p&gt;The gist of it is that the browser gives you &lt;code&gt;&#39;dragenter&#39;, &#39;dragover&#39;, &#39;dragleave&#39;&lt;/code&gt; events that you can use to style your &amp;ldquo;dropzone&amp;rdquo; however you want and the &lt;code&gt;drop&lt;/code&gt; event allows you to handle the files themselves:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-js&#34; data-lang=&#34;js&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;dropArea&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;addEventListener&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;drop&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;handleDrop&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;kc&#34;&gt;false&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kd&#34;&gt;function&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;handleDrop&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;e&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;kd&#34;&gt;let&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;dt&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;e&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;dataTransfer&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;kd&#34;&gt;let&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;files&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;dt&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;files&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;c1&#34;&gt;// implement with your preferred upload method
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;nx&#34;&gt;uploadFiles&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;files&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The &lt;code&gt;dragevent&lt;/code&gt; and &lt;code&gt;dataTransfer&lt;/code&gt; interface have been supported in modern browsers for some time so they are pretty safe to use.&lt;/p&gt;
&lt;p&gt;Alternatively, if you don&amp;rsquo;t care about styling a fancy drop area, the standard HTML &lt;code&gt;&amp;lt;input type=&amp;quot;file&amp;quot;&amp;gt;&lt;/code&gt; element supports dragging a file onto it.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/html/drag-drop-upload/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Input modes</title>
      <link>https://www.brandonpugh.com/til/html/input-modes/</link>
      <pubDate>Wed, 17 Jul 2024 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/html/input-modes/</guid>
      <description>&lt;p&gt;Today I learned that iOS changed the way it handles the &lt;code&gt;inputmode=&amp;quot;numeric&amp;quot;&lt;/code&gt; attribute on HTML input elements.&lt;/p&gt;
&lt;p&gt;It used to display the full number keyboard as shown here:&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;screenshot of IOS numeric keyboard from version 12.2 which is just the regular keyboard but starting on the number and symbols view&#34; loading=&#34;lazy&#34; src=&#34;https://www.brandonpugh.com/til/html/ios-original-keyboard.png&#34;&gt;&lt;/p&gt;
&lt;p&gt;I couldn&amp;rsquo;t find it documented anywhere but, after testing various versions on BrowserStack, I found that starting with iOS 14 the &lt;code&gt;numeric&lt;/code&gt; keyboard is the same as &lt;code&gt;decimal&lt;/code&gt; but without the decimal key:&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;screenshot of IOS keyboard showing only the 10 large number keys&#34; loading=&#34;lazy&#34; src=&#34;https://www.brandonpugh.com/til/html/ios-numeric-keyboard.png&#34;&gt;&lt;/p&gt;
&lt;p&gt;This is overall an improvement in usability I think except if you need to allow the user to enter negative numbers. So something to be aware of since I couldn&amp;rsquo;t find any way to type the &lt;code&gt;-&lt;/code&gt; with that attribute set.&lt;/p&gt;
&lt;p&gt;Unfortunately, all the sites I found that discuss inputmodes, show the old version like &lt;a href=&#34;https://css-tricks.com/better-form-inputs-for-better-mobile-user-experiences/&#34;&gt;this post&lt;/a&gt; but it&amp;rsquo;s still a good resource and I recommend setting an inputmode where it makes to make it easier to type certain values on mobile devices.&lt;/p&gt;
&lt;p&gt;Also, I like how Android handles it better:&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;screenshot of android numeric keyboards which in addition to the large number keys also has comma, dot, dash, and space keys&#34; loading=&#34;lazy&#34; src=&#34;https://www.brandonpugh.com/til/html/android-numeric-keyboard.png&#34;&gt;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/html/input-modes/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>:has selector</title>
      <link>https://www.brandonpugh.com/til/css/has-selector/</link>
      <pubDate>Fri, 12 Jul 2024 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/css/has-selector/</guid>
      <description>&lt;p&gt;Today I learned about the new &lt;code&gt;:has()&lt;/code&gt; selector in CSS.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s also referred to as the &amp;ldquo;parent&amp;rdquo; selector and that&amp;rsquo;s probably the most straightforward use case but &lt;a href=&#34;https://bejamas.io/blog/learn-css-has-selector-by-examples-top-use-cases/&#34;&gt;this post&lt;/a&gt; shows several cool use cases.&lt;/p&gt;
&lt;p&gt;I used it today when I needed to apply a style to a shared root element but only on a specific page, but all of the styles are bundled into a single CSS file that&amp;rsquo;s loaded on every page:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-css&#34; data-lang=&#34;css&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;#&lt;/span&gt;&lt;span class=&#34;nn&#34;&gt;app-root&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;nd&#34;&gt;has&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nc&#34;&gt;signin-root&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;k&#34;&gt;height&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;100&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;%&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/css/has-selector/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Use media queries in javascript with the `matchMedia()` method</title>
      <link>https://www.brandonpugh.com/til/javascript/match-media/</link>
      <pubDate>Wed, 10 Jul 2024 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/javascript/match-media/</guid>
      <description>&lt;p&gt;Today I learned that the &lt;code&gt;matchMedia()&lt;/code&gt; javascript method lets you match against media queries and respond accordingly with javascript.&lt;/p&gt;
&lt;p&gt;That could look something like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-js&#34; data-lang=&#34;js&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kr&#34;&gt;const&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;mediaQuery&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;window&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;matchMedia&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;(min-width: 768px)&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;// Check if the media query is true
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;mediaQuery&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;matches&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;c1&#34;&gt;// Then trigger an alert
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;nx&#34;&gt;alert&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;Media Query Matched!&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;You can also add an event listener to the &lt;code&gt;mediaQuery&lt;/code&gt; which you&amp;rsquo;ll want to do to respond to the user changing the size of the window — see &lt;a href=&#34;https://css-tricks.com/working-with-javascript-media-queries/&#34;&gt;this post&lt;/a&gt; for details on how to do that.&lt;/p&gt;
&lt;p&gt;Ideally, I try to keep media queries in CSS but this can come in handy for example if you want to change the way a tooltip behaves on smaller screens.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/javascript/match-media/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Numeric separators</title>
      <link>https://www.brandonpugh.com/til/javascript/numeric-separators/</link>
      <pubDate>Tue, 02 Jul 2024 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/javascript/numeric-separators/</guid>
      <description>&lt;p&gt;Today I learned about &lt;a href=&#34;https://v8.dev/features/numeric-separators&#34;&gt;numeric separators&lt;/a&gt; in javascript.
They are a small bit of syntactic sugar to make large numeric literals easier to read by letting you insert underscores anywhere in the number.&lt;/p&gt;
&lt;p&gt;For example, if you need to specify 10mb in byes, instead of &lt;code&gt;10485760&lt;/code&gt;, you can write it as:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-js&#34; data-lang=&#34;js&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kr&#34;&gt;const&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;maxUploadSize&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;10_485_760&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;They were added in ECMAScript 2021 and in C# 7.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/javascript/numeric-separators/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Clear site data</title>
      <link>https://www.brandonpugh.com/til/devtools/clear-site-data/</link>
      <pubDate>Thu, 27 Jun 2024 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/devtools/clear-site-data/</guid>
      <description>&lt;p&gt;protip: if you need to clear out some saved data (like cookies) for a particular site, Chrome dev tools has a handy &amp;ldquo;Clear site data&amp;rdquo; function.&lt;/p&gt;
&lt;p&gt;You can get to it from the &amp;ldquo;Application&amp;rdquo; tab:&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;alt text&#34; loading=&#34;lazy&#34; src=&#34;image-1.png&#34;&gt;&lt;/p&gt;
&lt;p&gt;or from the command palette which you can invoke with &lt;code&gt;ctrl+shift+p&lt;/code&gt;:&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;alt text&#34; loading=&#34;lazy&#34; src=&#34;image-2.png&#34;&gt;&lt;/p&gt;
&lt;p&gt;To me this is much more convenient than trying to go through the normal user settings for clearing&lt;/p&gt;
&lt;p&gt;There is also chrome://settings/content/siteDetails?site=https%3A%2F%2Flocalhost&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/devtools/clear-site-data/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>bash vs sh in git hooks on windows</title>
      <link>https://www.brandonpugh.com/til/git/bash-hooks/</link>
      <pubDate>Wed, 19 Jun 2024 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/git/bash-hooks/</guid>
      <description>&lt;p&gt;Today I learned that &lt;code&gt;sh&lt;/code&gt; is not the same thing as &lt;code&gt;bash&lt;/code&gt;.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/git/bash-hooks/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Chrome devtools ignores form resubmission</title>
      <link>https://www.brandonpugh.com/til/devtools/ignore-form-resubmission/</link>
      <pubDate>Wed, 12 Jun 2024 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/devtools/ignore-form-resubmission/</guid>
      <description>&lt;p&gt;Today I learned that if you have the chrome devtools open, then Chrome will suppress the confirm form resubmission dialog:&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;screenshot of chrome resubmission dialog&#34; loading=&#34;lazy&#34; src=&#34;ignore-form-resubmission.png&#34;&gt;&lt;/p&gt;
&lt;p&gt;This threw me off for a minute because I couldn&amp;rsquo;t figure out how the page was maintaining the state when I would refresh after a post.&lt;/p&gt;
&lt;p&gt;I couldn&amp;rsquo;t find it documented anywhere but it&amp;rsquo;s a nice convenience during development though it could be confusing if you&amp;rsquo;re unaware of it.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/devtools/ignore-form-resubmission/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Cherry pick a range of commits</title>
      <link>https://www.brandonpugh.com/til/git/cherry-pick-range/</link>
      <pubDate>Tue, 04 Jun 2024 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/git/cherry-pick-range/</guid>
      <description>&lt;p&gt;I just recently learned that you can actually cherry pick a range of commits instead of just a single commit:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git cherry-pick c1..c3
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The above is using the two-dot &lt;a href=&#34;https://darekkay.com/blog/git-commit-ranges/&#34;&gt;range notation&lt;/a&gt; (&lt;code&gt;..&lt;/code&gt;).&lt;/p&gt;
&lt;p&gt;I was a bit surprised by this because I thought that this was the purpose of &lt;code&gt;rebase --onto&lt;/code&gt; — to take a series of commits and apply them one at a time on top of some other commit.&lt;/p&gt;
&lt;p&gt;Turns out that they both essentially do the same thing (for each commit they call &lt;code&gt;merge-base&lt;/code&gt; under the hood and apply a &lt;a href=&#34;https://jvns.ca/blog/2023/11/10/how-cherry-pick-and-revert-work/&#34;&gt;3-way merge&lt;/a&gt; though you can also think of rebase as a series of cherry picks) but one can be more convenient than the other depending on what you&amp;rsquo;re doing or how you prefer to think of the operation.&lt;/p&gt;
&lt;p&gt;Cherry-pick is more convenient if you want to take a series of commits from some &lt;em&gt;other&lt;/em&gt; branch and apply them onto the &lt;em&gt;current&lt;/em&gt; branch.&lt;/p&gt;
&lt;p&gt;Rebase is more convenient if you want to take the &lt;em&gt;current&lt;/em&gt; branch and apply it on top of some &lt;em&gt;other&lt;/em&gt; branch.
And with the &lt;code&gt;--onto&lt;/code&gt; parameter you can change the base or &amp;ldquo;parent branch&amp;rdquo;.
This is a bit harder to wrap your head around but extremely powerful.&lt;/p&gt;
&lt;p&gt;For example given the following:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-txt&#34; data-lang=&#34;txt&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                        H---I---J topicB
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;                        /
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;              E---F---G  topicA
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;              /
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;A---B---C---D  main
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;```txt
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;If you run `git rebase --onto master topicA topicB` then you end up with:
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;```txt
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;              H&amp;#39;--I&amp;#39;--J&amp;#39;  topicB
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            /
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            | E---F---G  topicA
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            |/
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;A---B---C---D  main
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;which is handy if you started working on &lt;code&gt;topicB&lt;/code&gt; and thought you were branched off of &lt;code&gt;main&lt;/code&gt; instead of &lt;code&gt;topicA&lt;/code&gt; or if &lt;code&gt;topicA&lt;/code&gt; got merged or squashed from under you.
This &lt;a href=&#34;https://stackoverflow.com/a/29916361/1715138&#34;&gt;SO answer&lt;/a&gt; does a great job explaining &lt;code&gt;--onto&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Just remember: &lt;code&gt;git rebase --onto &amp;lt;newparent&amp;gt; &amp;lt;oldparent&amp;gt; &amp;lt;until&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;To accomplish the same with cherry-pick would require something like:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git checkout main
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git branch -b temp &lt;span class=&#34;c1&#34;&gt;# create a new temp branch and switch to it&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git cherry-pick topicA..topicB
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git checkout topicB
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git reset --hard temp &lt;span class=&#34;c1&#34;&gt;# topicB is now updated to match temp&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git branch --delete temp
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/git/cherry-pick-range/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Nullish Coalescing Operator</title>
      <link>https://www.brandonpugh.com/til/javascript/nullish-coalescing-operator/</link>
      <pubDate>Mon, 03 Jun 2024 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/javascript/nullish-coalescing-operator/</guid>
      <description>&lt;p&gt;Today I learned that javascript gained a &lt;a href=&#34;https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Nullish_coalescing&#34;&gt;nullish coalescing operator&lt;/a&gt; (&lt;code&gt;??&lt;/code&gt;) in ECMAScript 2020.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-js&#34; data-lang=&#34;js&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kr&#34;&gt;const&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;result&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;potentialEmpty&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;??&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;fallbackValue&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;It return the right operand if the left operand is null or undefined so for me this is a convenient alternative to using the OR (&lt;code&gt;||&lt;/code&gt;) operator if I don&amp;rsquo;t want the fallbackValue on falsy values like &lt;code&gt;0&lt;/code&gt; or an empty string.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/javascript/nullish-coalescing-operator/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>PC Manager is Microsoft&#39;s cleanup tool</title>
      <link>https://www.brandonpugh.com/til/windows/pc-manager/</link>
      <pubDate>Sun, 02 Jun 2024 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/windows/pc-manager/</guid>
      <description>&lt;p&gt;I used to have tools like CCleaner and Revo uninstaller installed on my windows machines but I recently learned that Microsoft now has their utility called &lt;a href=&#34;https://pcmanager.microsoft.com/en-us&#34;&gt;PC Manager&lt;/a&gt; that does things like free up some disk space and disable startup apps.&lt;/p&gt;
&lt;p&gt;Though &lt;a href=&#34;https://www.makeuseof.com/tag/stop-using-ccleaner-windows/&#34;&gt;as this article&lt;/a&gt; points out, you can accomplish a lot of similar tasks without a dedicated tool, so it&amp;rsquo;s more for if you find it convenient.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/windows/pc-manager/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>ISO-8601 Duration Format</title>
      <link>https://www.brandonpugh.com/til/standards/iso-duration/</link>
      <pubDate>Fri, 31 May 2024 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/standards/iso-duration/</guid>
      <description>&lt;p&gt;I learned about the ISO-8601 duration format today.
It&amp;rsquo;s a way to represent a duration of time in a standard format.&lt;/p&gt;
&lt;p&gt;For example, &lt;code&gt;P3Y6M4DT12H30M5S&lt;/code&gt; represents a duration of 3 years, 6 months, 4 days, 12 hours, 30 minutes, and 5 seconds.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://www.digi.com/resources/documentation/digidocs/90001488-13/reference/r_iso_8601_duration_format.htm&#34;&gt;https://www.digi.com/resources/documentation/digidocs/90001488-13/reference/r_iso_8601_duration_format.htm&lt;/a&gt;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/standards/iso-duration/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>View the conflicts resolved in a merge commit</title>
      <link>https://www.brandonpugh.com/til/git/view-merge-conflicts/</link>
      <pubDate>Wed, 29 May 2024 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/git/view-merge-conflicts/</guid>
      <description>&lt;p&gt;Today I learned that &lt;a href=&#34;https://github.blog/2022-04-18-highlights-from-git-2-36/#review-merge-conflict-resolution-with-remerge-diff&#34;&gt;in Git 2.36&lt;/a&gt;, the &lt;code&gt;--remerge-diff&lt;/code&gt; option was added to &lt;code&gt;git show&lt;/code&gt;.
This effectively lets you view any merge conflicts that occurred during a merge commit and how they were resolved.&lt;/p&gt;
&lt;p&gt;So for instance, &lt;code&gt;git show --remerge-diff &amp;lt;commit-message-id&amp;gt;&lt;/code&gt; would show something like:&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;terminal screenshot of git show output&#34; loading=&#34;lazy&#34; src=&#34;https://www.brandonpugh.com/til/git/view-merge-conflicts.png&#34;&gt;&lt;/p&gt;
&lt;p&gt;Under the hood, it recreates the merge with the conflicts and diffs it with the merge commit so the conflict markers are shown in red since the merge commit removes the conflict markers during resolution.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/git/view-merge-conflicts/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>The viewport scroll bar problem</title>
      <link>https://www.brandonpugh.com/til/css/viewport-scrollbar-problem/</link>
      <pubDate>Tue, 28 May 2024 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/css/viewport-scrollbar-problem/</guid>
      <description>&lt;p&gt;Today I learned that the viewport units in CSS don&amp;rsquo;t account for the width of visible classic scrollbars like on Windows.&lt;/p&gt;
&lt;p&gt;This means that if you use &lt;code&gt;width: 100vw&lt;/code&gt; to make an element the full width of the page and then a scrollbar appears, it will cause the element to overflow (by 17px which is apparently the width of Windows scrollbars) and create a horizontal scrollbar.&lt;/p&gt;
&lt;p&gt;CSS media queries don&amp;rsquo;t take them into account either, so if the viewport width is close (say within 17px) of a breakpoint then the appearance of a scrollbar will cause it to cross that threshold.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://www.smashingmagazine.com/2023/12/new-css-viewport-units-not-solve-classic-scrollbar-problem/#avoiding-the-classic-scrollbar-problem&#34;&gt;This article&lt;/a&gt; gives some potential solutions:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Use the new CSS container queries&lt;/li&gt;
&lt;li&gt;Use javascript to calculate the actual width&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Another solution is to use javascript to replace the classic scollbars with overlay scrollbars like you see on mobile operating systems.
&lt;a href=&#34;https://kingsora.github.io/OverlayScrollbars/&#34;&gt;OverlayScrollbars&lt;/a&gt; is a popular js library that does this.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/css/viewport-scrollbar-problem/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Penpot</title>
      <link>https://www.brandonpugh.com/til/devtools/penpot/</link>
      <pubDate>Wed, 22 May 2024 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/devtools/penpot/</guid>
      <description>&lt;p&gt;I just heard about a promising new design tool called &lt;a href=&#34;https://penpot.app/&#34;&gt;Penpot&lt;/a&gt; that positions itself as an open-source alternative to Figma.&lt;/p&gt;
&lt;p&gt;They recently added support for CSS grid layout which I&amp;rsquo;m looking forward to testing out.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://www.smashingmagazine.com/2024/04/penpot-css-grid-layout-designing-superpowers/&#34;&gt;https://www.smashingmagazine.com/2024/04/penpot-css-grid-layout-designing-superpowers/&lt;/a&gt;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/devtools/penpot/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>BFCache</title>
      <link>https://www.brandonpugh.com/til/html/bfcache/</link>
      <pubDate>Tue, 21 May 2024 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/html/bfcache/</guid>
      <description>&lt;p&gt;Today I learned that the Backwards/forwards cache (BFCache) is a thing.
This is the cache where the browser keeps a snapshot of a webpage so that it&amp;rsquo;s able to display almost instantly when a user clicks the back or forward buttons.&lt;/p&gt;
&lt;p&gt;This post gives a nice &lt;a href=&#34;https://www.sabatino.dev/bfcache-explained/&#34;&gt;overview of the BFCache&lt;/a&gt; and how it works — apparently &amp;ldquo;Chrome usage data shows that 1 in 10 navigations on desktop and 1 in 5 on mobile are either back or forward&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;The Chrome Devtools also has a feature to let you &lt;a href=&#34;https://developer.chrome.com/docs/devtools/application/back-forward-cache&#34;&gt;test if your page is cacheable&lt;/a&gt; in the BFCache.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/html/bfcache/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Locally test on old version of Chrome</title>
      <link>https://www.brandonpugh.com/til/devtools/chromium-versions/</link>
      <pubDate>Mon, 20 May 2024 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/devtools/chromium-versions/</guid>
      <description>&lt;p&gt;Today I learned that if you need to test in older versions of Chrome then you can &lt;a href=&#34;https://commondatastorage.googleapis.com/chromium-browser-snapshots/index.html&#34;&gt;download prior snapshots of Chromium builds&lt;/a&gt; as standalone executables.&lt;/p&gt;
&lt;p&gt;The tricky part is figuring out which build snapshot corresponds to which version of Chrome, which involves several steps detailed in the &lt;a href=&#34;https://www.chromium.org/getting-involved/download-chromium/#downloading-old-builds-of-chrome-chromium&#34;&gt;Chromium wiki&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Fortunately, someone put together a site to &lt;a href=&#34;https://vikyd.github.io/download-chromium-history-version/#/&#34;&gt;lookup by Chrome version&lt;/a&gt; and link to the correct build on the archive site.
Then you download and extract the zip file and run the single executable, i.e. &lt;code&gt;chrome.exe&lt;/code&gt;.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/devtools/chromium-versions/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Podman is a nice alternative to Docker</title>
      <link>https://www.brandonpugh.com/til/containers/podman/</link>
      <pubDate>Thu, 18 Apr 2024 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/containers/podman/</guid>
      <description>&lt;p&gt;Today I learned that Podman is a pretty nice alternative to Docker, and in my case was a drop-in-replacement for Docker Desktop.&lt;/p&gt;
&lt;p&gt;The installation process was smooth and it really tries to guide you through the setup.&lt;/p&gt;
&lt;p&gt;They even provide cli aliases for docker commands so you don&amp;rsquo;t have to update any existing scripts.&lt;/p&gt;
&lt;p&gt;Proponents also argue that it has more secure default feature like rootless containers.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://betterstack.com/community/guides/scaling-docker/podman-vs-docker/&#34;&gt;Exploring Podman: A More Secure Docker Alternative&lt;/a&gt;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/containers/podman/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Preload critical assets</title>
      <link>https://www.brandonpugh.com/til/html/preload-assets/</link>
      <pubDate>Wed, 13 Mar 2024 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/html/preload-assets/</guid>
      <description>&lt;p&gt;Today I learned that you can preload critical assets in a page by using the &lt;code&gt;preload&lt;/code&gt; attribute on a link tag i.e. &lt;code&gt;&amp;lt;link rel=&amp;quot;preload&amp;quot;&amp;gt;&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Especially useful for things like fonts that are discovered later by the browser.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://web.dev/articles/preload-critical-assets&#34;&gt;Preload critical assets to improve loading speed&lt;/a&gt;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/html/preload-assets/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Shell Check</title>
      <link>https://www.brandonpugh.com/til/bash/shell-check/</link>
      <pubDate>Tue, 12 Mar 2024 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/bash/shell-check/</guid>
      <description>&lt;p&gt;Today I learned about &lt;a href=&#34;https://www.shellcheck.net/&#34;&gt;ShellCheck&lt;/a&gt; which is essentially a linter for bash scripts.&lt;/p&gt;
&lt;p&gt;You can try it on the website but I recommend installing the &lt;a href=&#34;https://marketplace.visualstudio.com/items?itemName=timonwong.shellcheck&#34;&gt;vscode extension&lt;/a&gt;.
I like that you can look up the rationale for each of the rules so it&amp;rsquo;s a great way to learn some best practices for bash scripts.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/bash/shell-check/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Windows Dev Drive</title>
      <link>https://www.brandonpugh.com/til/windows/dev-drive/</link>
      <pubDate>Mon, 26 Feb 2024 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/windows/dev-drive/</guid>
      <description>&lt;p&gt;Today I learned about a new feature in Windows 11 called &lt;a href=&#34;https://blog.maartenballiauw.be/post/2023/11/22/test-driving-windows-11-dev-drive-for-dotnet.html&#34;&gt;Dev Drive&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;It sounds like it essentially lets you create an optimized drive or volume for heavy file I/O that could speed up large solutions or test suites.&lt;/p&gt;
&lt;p&gt;Doesn&amp;rsquo;t look like I&amp;rsquo;m able to enable this on my work laptop yet but I&amp;rsquo;m curious to try it on one of my personal machines and see if it&amp;rsquo;s a noticeable improvement.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://learn.microsoft.com/en-us/windows/dev-drive/&#34;&gt;Official docs&lt;/a&gt;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/windows/dev-drive/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Truncate table</title>
      <link>https://www.brandonpugh.com/til/sql/truncate-table/</link>
      <pubDate>Tue, 20 Feb 2024 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/sql/truncate-table/</guid>
      <description>&lt;p&gt;Today I learned that there is a &lt;code&gt;truncate table&lt;/code&gt; SQL command that deletes all data from a database table like &lt;code&gt;Delete from&lt;/code&gt; but is faster and uses fewer system and transaction log resources.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s supported in most database engines but there are likely caveats to keep in mind.&lt;/p&gt;
&lt;p&gt;For instance, with SQL Server:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;It will reseed identity columns&lt;/li&gt;
&lt;li&gt;You can&amp;rsquo;t truncate tables that referenced in constraints&lt;/li&gt;
&lt;li&gt;and it requires ALTER table privileges&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For clearing out data in lower environments though, I&amp;rsquo;ve found it useful.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/sql/truncate-table/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Logical Properties</title>
      <link>https://www.brandonpugh.com/til/css/logical-properties/</link>
      <pubDate>Thu, 15 Feb 2024 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/css/logical-properties/</guid>
      <description>&lt;p&gt;I&amp;rsquo;ve recently been learning about the new &lt;a href=&#34;https://web.dev/learn/css/logical-properties&#34;&gt;logical properties&lt;/a&gt; in CSS.&lt;/p&gt;
&lt;p&gt;Essentially if we&amp;rsquo;re developing applications for a global audience, instead of thinking in terms of right/left or top/bottom, we should start thinking in terms of &amp;ldquo;inline&amp;rdquo; and &amp;ldquo;block&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;These let us specify our styling and layouts in relative logical values instead of physical ones so they can adapt appropriately for right-to-left or vertical languages.&lt;/p&gt;
&lt;p&gt;For example, &lt;code&gt;margin-left: 20px&lt;/code&gt; would now be &lt;code&gt;margin-inline-start: 20px&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;These new properties are pretty well supported in browsers so I think it&amp;rsquo;s probably a good practice to try to default to using them when you can even if you don&amp;rsquo;t have any localization concerns.
For one, it doesn&amp;rsquo;t hurt to use them and you&amp;rsquo;re likely to start seeing them more and more in examples and documentation so you&amp;rsquo;ll want to get used to them.&lt;/p&gt;
&lt;p&gt;Plus you can use them as a convenient shorthand in some cases — for example, you can replace &lt;code&gt;margin-left: auto; margin-right: auto;&lt;/code&gt; with just &lt;code&gt;margin-inline: auto;&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The &lt;a href=&#34;https://css-tricks.com/css-logical-properties-and-values/&#34;&gt;CSS-Tricks article&lt;/a&gt; has a lot of good examples.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/css/logical-properties/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Git Maintenance</title>
      <link>https://www.brandonpugh.com/til/git/git-maintanence/</link>
      <pubDate>Mon, 12 Feb 2024 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/git/git-maintanence/</guid>
      <description>&lt;p&gt;Today I learned about the &lt;a href=&#34;https://git-scm.com/docs/git-maintenance&#34;&gt;&lt;code&gt;git maintenance&lt;/code&gt;&lt;/a&gt; command that runs tasks for regular maintenance of a git repo.&lt;/p&gt;
&lt;p&gt;If you run &lt;code&gt;git maintenance start&lt;/code&gt; in a repo, git will create scheduled tasks to run at regular intervals to perform these tasks in the background like garbage collection.
This will optimize and speed up the repo without having to tack them on occasionally as you run other commands.&lt;/p&gt;
&lt;p&gt;A particularly handy task it will run every hour is &lt;code&gt;prefetch&lt;/code&gt;, where it does a &lt;code&gt;git fetch&lt;/code&gt; but only pulls down the data and doesn&amp;rsquo;t update any refs.
Then when you actually run &lt;code&gt;git fetch&lt;/code&gt; or &lt;code&gt;git pull&lt;/code&gt;, it completes almost instantly because it already has all the data.&lt;/p&gt;
&lt;p&gt;On Windows, you can view and tweak these tasks in the Task Scheduler and have names in the form of &lt;code&gt;Git Maintenance (&amp;lt;frequency&amp;gt;)&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;This also ties in well with my desire to be able to work offline if need be, since if I&amp;rsquo;m suddenly without internet but haven&amp;rsquo;t been running fetch all day, I can still run &lt;code&gt;git fetch&lt;/code&gt; and pull in all the changes from the day.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/git/git-maintanence/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Number.isInteger()</title>
      <link>https://www.brandonpugh.com/til/javascript/number-isinteger/</link>
      <pubDate>Thu, 08 Feb 2024 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/javascript/number-isinteger/</guid>
      <description>&lt;p&gt;Today I learned that the &lt;a href=&#34;https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/isNaN&#34;&gt;&lt;code&gt;isNaN&lt;/code&gt;&lt;/a&gt; global function in javascript isn&amp;rsquo;t very useful for validating numbers.
The main reason is that it returns &lt;code&gt;false&lt;/code&gt; for an empty string since it coerces it to &lt;code&gt;0&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;To add to the confusion, &lt;a href=&#34;https://stackoverflow.com/questions/33164725/confusion-between-isnan-and-number-isnan-in-javascript&#34;&gt;&lt;code&gt;Number.isNaN()&lt;/code&gt; behaves slightly differently&lt;/a&gt; since it just checks for the value &lt;code&gt;NaN&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;For validation, I found &lt;a href=&#34;https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isInteger&#34;&gt;&lt;code&gt;Number.isInteger()&lt;/code&gt;&lt;/a&gt; to be the most useful.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/javascript/number-isinteger/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Git ORIG_HEAD</title>
      <link>https://www.brandonpugh.com/til/git/orig-head/</link>
      <pubDate>Wed, 07 Feb 2024 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/git/orig-head/</guid>
      <description>&lt;p&gt;Today I learned that &lt;code&gt;ORIG_HEAD&lt;/code&gt; is a reference that git maintains to the previous commit &lt;code&gt;HEAD&lt;/code&gt; pointed to before it &amp;ldquo;was modified in a drastic way&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;The docs mention these operations as examples of when &lt;code&gt;ORIG_HEAD&lt;/code&gt; is updated: (git am, git merge, git rebase, git reset)&lt;/p&gt;
&lt;p&gt;This is useful when you want to undo one of those operations.&lt;/p&gt;
&lt;p&gt;You can use &lt;code&gt;git reset --hard ORIG_HEAD&lt;/code&gt; (or &lt;a href=&#34;https://www.brandonpugh.com/til/git/reset-keep/&#34;&gt;&lt;code&gt;--keep&lt;/code&gt;&lt;/a&gt;) to put your branch back to where it was before the operation.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/git/orig-head/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Git rebase.abbreviateCommands</title>
      <link>https://www.brandonpugh.com/til/git/git-abbreviate-commands/</link>
      <pubDate>Fri, 02 Feb 2024 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/git/git-abbreviate-commands/</guid>
      <description>&lt;p&gt;This is probably a very niche use case, but I learned today that you can abbreviate commands that git populates in the todo list during an interactive rebase.&lt;/p&gt;
&lt;p&gt;So instead of this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    pick deadbee The oneline of the commit
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    pick fa1afe1 The oneline of the next commit
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;em&gt;&lt;strong&gt;It&amp;rsquo;ll look like this:&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    p deadbee The oneline of the commit
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    p fa1afe1 The oneline of the next commit
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;You can enable this with &lt;code&gt;git config --global rebase.abbreviateCommands true&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;To be clear, you can always use the abbreviated commands, but since I use Vim to edit the list, it makes it slightly more convenient to edit the commands.&lt;/p&gt;
&lt;p&gt;For instance, before when the command was &lt;code&gt;pick&lt;/code&gt;, and I wanted to squash a commit, I would jump to the line, type &lt;code&gt;ciw&lt;/code&gt; to delete the word &lt;code&gt;pick&lt;/code&gt; and enter insert mode, then type &lt;code&gt;s&lt;/code&gt; and then &lt;code&gt;esc&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;But when the command is &lt;code&gt;p&lt;/code&gt;, I can just type &lt;code&gt;r&lt;/code&gt; and &lt;code&gt;s&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;So if you&amp;rsquo;re counting, that&amp;rsquo;s &lt;strong&gt;three&lt;/strong&gt; fewer keystrokes for each command. Mission. Accomplished.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/git/git-abbreviate-commands/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>font-variant-numeric</title>
      <link>https://www.brandonpugh.com/til/css/font-variant-numeric/</link>
      <pubDate>Thu, 01 Feb 2024 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/css/font-variant-numeric/</guid>
      <description>&lt;p&gt;Today I learned about the &lt;code&gt;font-variant-numeric&lt;/code&gt; CSS property that lets you control alternate glyphs for numbers.&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;visual examples of the different values of font-variant-numeric&#34; loading=&#34;lazy&#34; src=&#34;font-variant-numeric.png&#34;&gt;&lt;/p&gt;
&lt;p&gt;Not every font will support all of these but the &lt;code&gt;tabular-nums&lt;/code&gt; option is common and seems especially useful for data in grids.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://textlab.dev/posts/font-variant-numeric&#34;&gt;Using Font Variant Numeric&lt;/a&gt;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/css/font-variant-numeric/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Javascript Array `with()` method</title>
      <link>https://www.brandonpugh.com/til/javascript/array-with-method/</link>
      <pubDate>Wed, 31 Jan 2024 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/javascript/array-with-method/</guid>
      <description>&lt;p&gt;Today I learned that there&amp;rsquo;s a new javascript array method that returns a &lt;em&gt;new&lt;/em&gt; array with the element at the given index replaced with the given value.&lt;/p&gt;
&lt;p&gt;Convenient for manipulating array values without mutating the original array.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-js&#34; data-lang=&#34;js&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kr&#34;&gt;const&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;arr&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;3&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;4&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;5&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;console&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;log&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;arr&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;kd&#34;&gt;with&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;6&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;));&lt;/span&gt; &lt;span class=&#34;c1&#34;&gt;// [1, 2, 6, 4, 5]
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;console&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;log&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;arr&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt; &lt;span class=&#34;c1&#34;&gt;// [1, 2, 3, 4, 5]
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/javascript/array-with-method/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>sourceURL pragma</title>
      <link>https://www.brandonpugh.com/til/devtools/inline-script-sourceurl/</link>
      <pubDate>Mon, 29 Jan 2024 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/devtools/inline-script-sourceurl/</guid>
      <description>&lt;p&gt;Today I learned that you can add &lt;code&gt;//# sourceURL=&amp;lt;anything&amp;gt;.js&lt;/code&gt; special comment to an inline script tag to have it show up as a separate javascript file in the dev tools sources tab.&lt;/p&gt;
&lt;p&gt;This makes it a bit easier to work with especially when you have a huge inline script tag you&amp;rsquo;re dealing with.&lt;/p&gt;
&lt;p&gt;It even works with &lt;code&gt;eval()&lt;/code&gt; too if you&amp;rsquo;re unfortunate enough to be dealing with that.&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;screenshot of an inline script showing as a separate .js file in devtools&#34; loading=&#34;lazy&#34; src=&#34;inline-script-sourceurl.png&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://devtoolstips.org/tips/en/name-evaluated-files/&#34;&gt;https://devtoolstips.org/tips/en/name-evaluated-files/&lt;/a&gt;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/devtools/inline-script-sourceurl/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>CSP `connect-src` directive</title>
      <link>https://www.brandonpugh.com/til/html/csp-connect-src/</link>
      <pubDate>Fri, 26 Jan 2024 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/html/csp-connect-src/</guid>
      <description>&lt;p&gt;Today I learned that there is a Content-Security-Policy (CSP) directive &lt;code&gt;connect-src&lt;/code&gt; that you can use to restrict all outgoing requests from your website to only the domains that you specify.&lt;/p&gt;
&lt;p&gt;This is a powerful mitigation against any kind of script injection attacks since no data can then be exfiltrated from your page.&lt;/p&gt;
&lt;p&gt;It applies to &lt;code&gt;XMLHttpRequest&lt;/code&gt; (AJAX), &lt;code&gt;WebSocket&lt;/code&gt;, &lt;code&gt;fetch()&lt;/code&gt;, &lt;code&gt;&amp;lt;a ping&amp;gt;&lt;/code&gt; or &lt;code&gt;EventSource&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;CSP is an HTTP response header for enhancing the security of a site and there are of course several other directives you might want to enable.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://content-security-policy.com/&#34;&gt;This is a handy reference&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;If you want to see a real-world comprehensive example, take a look at the &lt;a href=&#34;https://report-uri.com/home/analyse/https%3A%2F%2Fhaveibeenpwned.com%2F&#34;&gt;CSP header for haveibeenpwned.com&lt;/a&gt; (this links to &lt;a href=&#34;https://report-uri.com/home/analyse&#34;&gt;the csp analyser from report-uri&lt;/a&gt;).&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/html/csp-connect-src/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Disable entire form</title>
      <link>https://www.brandonpugh.com/til/html/disable-form/</link>
      <pubDate>Wed, 24 Jan 2024 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/html/disable-form/</guid>
      <description>&lt;p&gt;Today I learned that you can disable an entire form by wrapping all the inputs in a &lt;code&gt;&amp;lt;fieldset disabled&amp;gt;&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;You might think that you can disable a form with &lt;code&gt;&amp;lt;form disabled&amp;gt;&lt;/code&gt; but unfortunately, the &lt;a href=&#34;https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form&#34;&gt;form element&lt;/a&gt; doesn&amp;rsquo;t have a disabled attribute.&lt;/p&gt;
&lt;p&gt;Fieldsets are typically used to group related form elements (and in some cases can improve accessibility) — so you can have multiple in a form and disable portions of the form separately.&lt;/p&gt;
&lt;p&gt;This is much more convenient than having to toggle the &lt;code&gt;disabled&lt;/code&gt; attributes on every form element.&lt;/p&gt;
&lt;p&gt;I also learned that there is a difference between styling a button with &lt;code&gt;button:disabled&lt;/code&gt; and &lt;code&gt;button[disabled]&lt;/code&gt;, the former being the one you want to use in this case since the latter only matches a button with a disabled attribute.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://linkedlist.ch/disabling_an_entire_form_in_html_37/&#34;&gt;Disabling an entire form in HTML&lt;/a&gt;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/html/disable-form/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Git clean interactive</title>
      <link>https://www.brandonpugh.com/til/git/git-clean/</link>
      <pubDate>Tue, 23 Jan 2024 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/git/git-clean/</guid>
      <description>&lt;p&gt;I just discovered the interactive mode of &lt;code&gt;git clean&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Git Clean is handy when you want to clear out anything from your local repository folder that isn&amp;rsquo;t tracked by git. This often includes build outputs and other generated files. This is useful if for instance Visual Studio is acting weird and you&amp;rsquo;re tempted to do a fresh clone to fix it.&lt;/p&gt;
&lt;p&gt;I have a git alias I use for this: &lt;code&gt;cl = git clean -idx -e &#39;node_modules&#39;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;This tells git to delete any untracked files including anything ignored by &lt;code&gt;.gitignore&lt;/code&gt; so it&amp;rsquo;s practically the same as doing a fresh clone (except you&amp;rsquo;ll keep work in progress). The &lt;code&gt;-i&lt;/code&gt; is interactive so git shows you everything it&amp;rsquo;ll delete and you can confirm it. I used to use &lt;code&gt;-f&lt;/code&gt; for force but the interactive mode is pretty nice and it&amp;rsquo;s just a couple of extra keystrokes to blow everything way if I want.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;-e &#39;node_modules&#39;&lt;/code&gt; is optional but if it&amp;rsquo;s a dotnet build issue I&amp;rsquo;m having then I don&amp;rsquo;t want to waste time deleting and reinstalling npm modules so this tells git not to touch any &lt;code&gt;node_modules&lt;/code&gt; in the repo.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/git/git-clean/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>DeepGit blame</title>
      <link>https://www.brandonpugh.com/til/git/deepgit/</link>
      <pubDate>Fri, 19 Jan 2024 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/git/deepgit/</guid>
      <description>&lt;p&gt;Today I learned that &lt;a href=&#34;https://www.syntevo.com/deepgit/tour/&#34;&gt;DeepGit&lt;/a&gt; is actually completely free even for commercial use. This is the best git blame utility I&amp;rsquo;ve come across because it lets you continue drilling down into the history of a line, kinda like a recursive blame.
You do have to provide an email address to register but I think it&amp;rsquo;s worth it.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s from the same developer of my preferred git client SmartGit but SmartGit &lt;em&gt;does&lt;/em&gt; require a paid license for commercial use.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/git/deepgit/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Fix package-lock.json merge conflicts</title>
      <link>https://www.brandonpugh.com/til/node/package-lock-conflicts/</link>
      <pubDate>Tue, 16 Jan 2024 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/node/package-lock-conflicts/</guid>
      <description>&lt;p&gt;Today I learned that npm can handle merge conflicts in your &lt;code&gt;package-lock.json&lt;/code&gt; file for you.&lt;/p&gt;
&lt;p&gt;After you resolve any merge conflicts in your &lt;code&gt;package.json&lt;/code&gt;, you can just run &lt;code&gt;npm install [--package-lock-only]&lt;/code&gt; and npm will resolve the conflicts in the lock file.
If &lt;code&gt;--package-lock-only&lt;/code&gt; is provided, it will do this without also modifying your local &lt;code&gt;node_modules/&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://tkdodo.eu/blog/solving-conflicts-in-package-lock-json&#34;&gt;Solving conflicts in package-lock.json&lt;/a&gt;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/node/package-lock-conflicts/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Dynamically darken or lighten a color in CSS</title>
      <link>https://www.brandonpugh.com/til/css/darken-colors-color-mix/</link>
      <pubDate>Mon, 15 Jan 2024 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/css/darken-colors-color-mix/</guid>
      <description>&lt;p&gt;Today I learned that you can now easily darken or lighten a color natively in CSS with the new &lt;a href=&#34;https://developer.chrome.com/docs/css-ui/css-color-mix&#34;&gt;color-mix&lt;/a&gt; function.&lt;/p&gt;
&lt;p&gt;Here&amp;rsquo;s a use case I run into a lot where you have a primary brand color and you need to darken it on hover:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-css&#34; data-lang=&#34;css&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;nd&#34;&gt;root&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;nv&#34;&gt;--brand-color-dark&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;color-mix&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;in&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;oklab&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;var&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;--&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;brand&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;kc&#34;&gt;color&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;),&lt;/span&gt; &lt;span class=&#34;kc&#34;&gt;black&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;30&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;%&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;nv&#34;&gt;--brand-color-light&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;color-mix&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;in&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;oklab&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;var&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;--&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;brand&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;kc&#34;&gt;color&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;),&lt;/span&gt; &lt;span class=&#34;kc&#34;&gt;white&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;30&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;%&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nc&#34;&gt;button&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;nd&#34;&gt;hover&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;k&#34;&gt;background-color&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;var&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;--&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;brand&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;kc&#34;&gt;color&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;dark&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This works by mixing the color with some amount of black or white. I also chose the &lt;code&gt;oklab&lt;/code&gt; &lt;a href=&#34;https://developer.chrome.com/docs/css-ui/high-definition-css-color-guide#meet_the_new_web_color_spaces&#34;&gt;color space&lt;/a&gt; since it&amp;rsquo;s the most likely to produce what I&amp;rsquo;m expecting for this use case.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;ve accomplished this before by using HSL color values with CSS variables and manipulating the lightness channel but this is much nicer and works even if the base color is defined as a hex value (that may or may not come from a database somewhere).&lt;/p&gt;
&lt;p&gt;I was missing something like this from preprocessors like LESS and SASS and as of 2023 this is supported in all modern browsers.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/css/darken-colors-color-mix/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Thin Space</title>
      <link>https://www.brandonpugh.com/til/html/thin-space/</link>
      <pubDate>Fri, 12 Jan 2024 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/html/thin-space/</guid>
      <description>&lt;p&gt;Today I learned that there is an HTML entity called &amp;ldquo;thin space&amp;rdquo; that you can use when you need less space between two characters than the normal space.&lt;/p&gt;
&lt;p&gt;The HTML code is &lt;code&gt;&amp;amp;thinsp;&lt;/code&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Thin Space might be the most underrated HTML entity. It can be used for a name like J. K. Simmons. Without spacing, the J and K would seem too close together; with a regular space, they seem too far apart. Insert a thin space and it is just perfect. - &lt;a href=&#34;https://codepen.io/mikemai2awesome/full/qBygNwq&#34;&gt;Typography Manual&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;a href=&#34;https://codepen.io/mikemai2awesome/pen/LYQwBmp&#34;&gt;You can see a demo here&lt;/a&gt;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/html/thin-space/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Copy Nice Extension</title>
      <link>https://www.brandonpugh.com/til/visual-studio/copy-nice/</link>
      <pubDate>Wed, 10 Jan 2024 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/visual-studio/copy-nice/</guid>
      <description>&lt;p&gt;Today I learned about a handy little Visual Studio extension called &lt;a href=&#34;https://marketplace.visualstudio.com/items?itemName=MadsKristensen.CopyNice&#34;&gt;Copy Nice&lt;/a&gt; whose sole purpose is to address an annoyance I encounter frequently where the indentation is off when I copy and paste code snippets.&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;code snippet with bad indentation&#34; loading=&#34;lazy&#34; src=&#34;copy-nice.png&#34;&gt;&lt;/p&gt;
&lt;p&gt;With this extension, when code is copied it will automatically be formatted to take care of the leading indentation issue.&lt;/p&gt;
&lt;p&gt;Now if only there was some system-level utility to this do when copying from anywhere&amp;hellip;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/visual-studio/copy-nice/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Smooth scrolling</title>
      <link>https://www.brandonpugh.com/til/css/smooth-scrolling/</link>
      <pubDate>Mon, 08 Jan 2024 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/css/smooth-scrolling/</guid>
      <description>&lt;p&gt;Today I learned that you can now implement smooth scrolling purely with CSS in modern browsers.&lt;/p&gt;
&lt;p&gt;By adding the following CSS:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-css&#34; data-lang=&#34;css&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c&#34;&gt;/* Smooth scrolling IF user doesn&amp;#39;t have a preference due to motion sensitivities */&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;@&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;media&lt;/span&gt; &lt;span class=&#34;nt&#34;&gt;screen&lt;/span&gt; &lt;span class=&#34;nt&#34;&gt;and&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;prefers-reduced-motion&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;nt&#34;&gt;no-preference&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;nt&#34;&gt;html&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;scroll-behavior&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;kc&#34;&gt;smooth&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;the browser will scroll smoothly whenever scrolling is triggered either by Javascript (with something like &lt;code&gt;document.documentElement.scrollTop = 0&lt;/code&gt;) or by linking to elements with an internal anchor link.
It&amp;rsquo;s considered best practice to use the &lt;code&gt;prefers-reduced-motion&lt;/code&gt; media query to only enable things like animations to be mindful of users with motion sensitivities.
In my testing, however, the browser won&amp;rsquo;t ever smooth scroll if the user has &lt;code&gt;prefers-reduced-motion&lt;/code&gt; enabled.&lt;/p&gt;
&lt;p&gt;Another way of accomplishing this is with the &lt;a href=&#34;https://developer.mozilla.org/en-US/docs/Web/API/Window/scrollTo&#34;&gt;&lt;code&gt;scrollTo&lt;/code&gt;&lt;/a&gt; function in javascript:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;window.scrollTo({top:0, behavior: &#39;smooth&#39;})&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;or with the &lt;a href=&#34;https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView&#34;&gt;scrollIntoView&lt;/a&gt; function.&lt;/p&gt;
&lt;p&gt;I also discovered that &lt;code&gt;prefers-reduced-motion&lt;/code&gt; is controlled at the system level — in Windows it&amp;rsquo;s determined by the &amp;ldquo;Show animations in Windows&amp;rdquo; setting which is automatically disabled when connecting to Windows via Remote Desktop.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-behavior&#34;&gt;https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-behavior&lt;/a&gt;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/css/smooth-scrolling/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Quit vim with :x</title>
      <link>https://www.brandonpugh.com/til/vim/quit-with-x/</link>
      <pubDate>Sun, 07 Jan 2024 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/vim/quit-with-x/</guid>
      <description>&lt;p&gt;People like to joke that vim is impossible to exit, but I just discovered that there are actually &lt;a href=&#34;https://hashrocket.com/blog/posts/how-to-quit-vim&#34;&gt;several different ways&lt;/a&gt; to quit and &lt;code&gt;:x&lt;/code&gt; is my new favorite.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;:x&lt;/code&gt; command will save and quit but it differs from &lt;code&gt;:wq&lt;/code&gt; in that it will only write the file to disc if there were any changes so the &lt;em&gt;modified date&lt;/em&gt; of the file won&amp;rsquo;t get updated unnecessarily.&lt;/p&gt;
&lt;p&gt;This seems like the preferred behavior most of the time.
That coupled with the fact that it&amp;rsquo;s slightly faster to type has made it my new default way to exit vim.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/vim/quit-with-x/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Easily reference upstream branch</title>
      <link>https://www.brandonpugh.com/til/git/reference-upstream-branch/</link>
      <pubDate>Thu, 04 Jan 2024 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/git/reference-upstream-branch/</guid>
      <description>&lt;p&gt;Today I learned that you can reference the upstream branch in git with &lt;code&gt;@{u}&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;I used this to make a convenient git alias &lt;code&gt;reso&lt;/code&gt; for &amp;ldquo;reset to origin&amp;rdquo;:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git config --global alias.reso &lt;span class=&#34;s2&#34;&gt;&amp;#34;reset --keep @{u}&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;note: I&amp;rsquo;m using &lt;code&gt;--keep&lt;/code&gt; instead of &lt;code&gt;--hard&lt;/code&gt; because it&amp;rsquo;s a bit &lt;a href=&#34;https://www.brandonpugh.com/til/git/reset-keep/&#34;&gt;safer&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I use this when a branch I&amp;rsquo;ve pulled down has completely changed on the remote and I have no changes (for instance when reviewing a PR) and a &lt;code&gt;pull&lt;/code&gt; would be messy (a reset is also much faster depending on the number of commits).&lt;/p&gt;
&lt;p&gt;Or if I&amp;rsquo;ve completely borked my local branch and want to start over from where I last pushed 😅.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/git/reference-upstream-branch/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title></title>
      <link>https://www.brandonpugh.com/til/typescript/strongly-typed-id/</link>
      <pubDate>Tue, 19 Dec 2023 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/typescript/strongly-typed-id/</guid>
      <description>&lt;h1&gt;&lt;/h1&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/typescript/strongly-typed-id/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Collection expressions</title>
      <link>https://www.brandonpugh.com/til/csharp/collection-expressions/</link>
      <pubDate>Thu, 14 Dec 2023 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/csharp/collection-expressions/</guid>
      <description>&lt;p&gt;Today I learned that C# 12 is getting some nice javascript-like syntax with collection expressions and the &lt;code&gt;..&lt;/code&gt; (spread operator):&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-csharp&#34; data-lang=&#34;csharp&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kt&#34;&gt;string&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[]&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;moreFruits&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;orange&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s&#34;&gt;&amp;#34;pear&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;IEnumerable&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;string&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;fruits&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;apple&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s&#34;&gt;&amp;#34;banana&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s&#34;&gt;&amp;#34;cherry&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;..&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;moreFruits&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Note though that the spread operator is only 2 dots instead of 3 dots like in javascript.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/csharp/collection-expressions/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Local overrides in Chrome DevTools</title>
      <link>https://www.brandonpugh.com/til/devtools/local-overrides/</link>
      <pubDate>Mon, 11 Dec 2023 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/devtools/local-overrides/</guid>
      <description>&lt;p&gt;Today I learned about the &lt;a href=&#34;https://developer.chrome.com/docs/devtools/overrides&#34;&gt;local overrides&lt;/a&gt; feature of Chrome Devtools that lets you &amp;ldquo;you can override HTTP response headers and web content, including XHR and fetch requests, to mock remote resources even if you don&amp;rsquo;t have access to them&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;This came in handy for me when trying to debug an issue that I wasn&amp;rsquo;t able to reproduce locally. The official docs do a nice job showing how to enable the feature but just make sure you delete the override once you&amp;rsquo;re done otherwise you might wonder why the page has stopped updating.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://developer.chrome.com/docs/devtools/overrides&#34;&gt;https://developer.chrome.com/docs/devtools/overrides&lt;/a&gt;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/devtools/local-overrides/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Add alt text to presentation slides</title>
      <link>https://www.brandonpugh.com/til/google/alt-text-google-slides/</link>
      <pubDate>Wed, 06 Dec 2023 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/google/alt-text-google-slides/</guid>
      <description>&lt;p&gt;Today I learned that you can add alt text to images in PowerPoint and Google Slides by right-clicking on an image.
It hadn&amp;rsquo;t occurred to me before but it makes sense that it would be as important as alt text for images on the web if you&amp;rsquo;re going to share your slides.
Likewise, you should mark an image as &amp;ldquo;decorative&amp;rdquo; if you want a screen reader to ignore it.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://axesslab.com/alt-texts/&#34;&gt;This post&lt;/a&gt; has some nice examples of how to write good alt text.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/google/alt-text-google-slides/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Display the week number in Google Calendar</title>
      <link>https://www.brandonpugh.com/til/google/show-week-number-calendar/</link>
      <pubDate>Tue, 05 Dec 2023 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/google/show-week-number-calendar/</guid>
      <description>&lt;p&gt;Today I learned that you can configure both Google Calendar and Outlook to show the week number in the &amp;ldquo;month&amp;rdquo; view.&lt;/p&gt;
&lt;p&gt;You might find this handy for project/sprint planning — I&amp;rsquo;ve also been keeping weekly notes with the week number at the beginning of the filename.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/google/show-week-number-calendar/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Open a URL in vim with `gx`</title>
      <link>https://www.brandonpugh.com/til/vim/vim-open-url/</link>
      <pubDate>Mon, 04 Dec 2023 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/vim/vim-open-url/</guid>
      <description>&lt;p&gt;Pressing &lt;code&gt;gx&lt;/code&gt; while over a URL in vim will open that url.&lt;/p&gt;
&lt;p&gt;Confirmed it also works in vscode-vim.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/vim/vim-open-url/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Flow spacing and the lobotomized owl</title>
      <link>https://www.brandonpugh.com/til/css/flow-spacing/</link>
      <pubDate>Wed, 29 Nov 2023 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/css/flow-spacing/</guid>
      <description>&lt;p&gt;This is another #til by proxy. A teammate asked about a CSS selector I used which has come to be referred to as the &lt;a href=&#34;https://alistapart.com/article/axiomatic-css-and-lobotomized-owls/&#34;&gt;&amp;ldquo;lobotomized owl&amp;rdquo;&lt;/a&gt; (&lt;code&gt;* + *&lt;/code&gt;):&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-css&#34; data-lang=&#34;css&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nc&#34;&gt;flow&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;*&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;+&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;*&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;k&#34;&gt;margin-top&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;var&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;--&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;flow&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;kc&#34;&gt;space&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;em&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;What this does is select every child element of the &lt;code&gt;.flow&lt;/code&gt; class except the first one.&lt;/p&gt;
&lt;p&gt;You can also use newer CSS selectors to do the same thing in a way that might be more obvious:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-css&#34; data-lang=&#34;css&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nc&#34;&gt;flow&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;*&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;nd&#34;&gt;where&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;nd&#34;&gt;not&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;nd&#34;&gt;first-child&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;))&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;k&#34;&gt;margin-top&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;var&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;--&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;flow&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;kc&#34;&gt;space&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;em&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The above snippet is probably my favorite CSS utility called &lt;a href=&#34;https://24ways.org/2018/managing-flow-and-rhythm-with-css-custom-properties/&#34;&gt;flow spacing&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s a nice way to easily add consistent spacing between elements in your project and because css variables cascade, it&amp;rsquo;s easy to override for specific contexts within different classes:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-css&#34; data-lang=&#34;css&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nc&#34;&gt;flow--space-compact&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;nv&#34;&gt;--flow-space&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;mf&#34;&gt;.75&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;em&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;or with inline styles: &lt;code&gt;&amp;lt;footer class=&amp;quot;flow&amp;quot; style=&amp;quot;--flow-space: 2em&amp;quot;&amp;gt;&amp;lt;/footer&amp;gt;&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m in the camp that parent components should be responsible for spacing out their child components and this utility makes that easier to do with consistency.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/css/flow-spacing/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Trim videos without re-encoding</title>
      <link>https://www.brandonpugh.com/til/video/trim-without-reencoding/</link>
      <pubDate>Mon, 27 Nov 2023 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/video/trim-without-reencoding/</guid>
      <description>&lt;p&gt;Today I learned that &lt;a href=&#34;https://ffmpeg.org/&#34;&gt;FFmpeg&lt;/a&gt; is the easiest (only?) way to trim/cut a video without re-encoding it.&lt;/p&gt;
&lt;p&gt;You can specify a start and stop time like so:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;ffmpeg -i input.mp4 -ss 00:01:30.000 -to 00:04:05.000 -c copy output.mp4
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The key is the &lt;code&gt;-c copy&lt;/code&gt; parameter which will just copy the data frames for operations where they don&amp;rsquo;t need to be modified.
This is nice because it&amp;rsquo;s &lt;em&gt;way&lt;/em&gt; faster than decoding and re-encoding and you don&amp;rsquo;t have any loss in quality if you&amp;rsquo;re not working with a raw format.&lt;/p&gt;
&lt;p&gt;It also works for removing/replacing the audio of a video.
This &lt;a href=&#34;https://img.ly/blog/ultimate-guide-to-ffmpeg/#cut-and-trim-without-reencoding&#34;&gt;ultimate guide&lt;/a&gt; is really handy.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/video/trim-without-reencoding/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>My default apps of 2023</title>
      <link>https://www.brandonpugh.com/blog/my-default-apps-of-2023/</link>
      <pubDate>Sun, 26 Nov 2023 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/blog/my-default-apps-of-2023/</guid>
      <description>&lt;p&gt;I saw this on &lt;a href=&#34;https://chriscoyier.net/2023/11/25/default-apps-2023/&#34;&gt;Chris Coyier&amp;rsquo;s blog&lt;/a&gt; and thought I would jump on the bandwagon.
&lt;a href=&#34;https://listen.hemisphericviews.com/097&#34;&gt;The idea&lt;/a&gt;, is to see for how many things you use the default apps for your system, which for me is mostly on Android/Google.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s a fun exercise and I totally get the arguments for &amp;ldquo;just&amp;rdquo; using default apps, but I also get a little sad at the thought of huge companies like Apple and Google able beat better alternatives simply because they&amp;rsquo;re the default.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;📨 Mail Client: Gmail&lt;/li&gt;
&lt;li&gt;📮 Mail Server: Google&lt;/li&gt;
&lt;li&gt;📝 Notes: For personal/family stuff &lt;a href=&#34;https://evernote.com&#34;&gt;Evernote&lt;/a&gt; despite looking for alternatives; for technical notes: markdown with &lt;a href=&#34;https://code.visualstudio.com/&#34;&gt;VS Code&lt;/a&gt; and &lt;a href=&#34;https://foambubble.github.io/foam/&#34;&gt;Foam&lt;/a&gt; family of extensions.&lt;/li&gt;
&lt;li&gt;✅ To-Do: &lt;a href=&#34;https://www.rememberthemilk.com/&#34;&gt;Remember the Milk&lt;/a&gt; - I&amp;rsquo;ve been using it since 2008 and I still like it better than all the others I&amp;rsquo;ve tried.&lt;/li&gt;
&lt;li&gt;📷 Photo Shooting: Pixel Phone camera&lt;/li&gt;
&lt;li&gt;🎨 Photo Editing: Google Photos&lt;/li&gt;
&lt;li&gt;📆 Calendar: Google Calendar&lt;/li&gt;
&lt;li&gt;📁 Cloud File Storage: Google Drive&lt;/li&gt;
&lt;li&gt;📖 RSS: &lt;a href=&#34;https://inoreader.com/&#34;&gt;Inoreader&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;🙍🏻‍♂️ Contacts: Google contacts&lt;/li&gt;
&lt;li&gt;🌐 Browser: Chrome&lt;/li&gt;
&lt;li&gt;💬 Chat: Slack&lt;/li&gt;
&lt;li&gt;🔖 Bookmarks: &lt;a href=&#34;https://pinboard.in&#34;&gt;Pinboard&lt;/a&gt; including their awesome archival service&lt;/li&gt;
&lt;li&gt;📑 Read It Later: &lt;a href=&#34;https://getpocket.com&#34;&gt;Pocket&lt;/a&gt; (don&amp;rsquo;t ask how many unread articles I have 😬)&lt;/li&gt;
&lt;li&gt;📜 Word Processing: Google Docs&lt;/li&gt;
&lt;li&gt;📈 Spreadsheets: Google Sheets&lt;/li&gt;
&lt;li&gt;📊 Presentations: &lt;a href=&#34;https://revealjs.com/&#34;&gt;Reveal.js&lt;/a&gt; and specifically &lt;a href=&#34;https://github.com/webpro/reveal-md&#34;&gt;reveal-md&lt;/a&gt; is the best tool I&amp;rsquo;ve found for slides with code snippets.&lt;/li&gt;
&lt;li&gt;🛒 Shopping Lists: &lt;a href=&#34;https://www.rememberthemilk.com/&#34;&gt;Remember the Milk&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;🍴 Meal Planning: N/A&lt;/li&gt;
&lt;li&gt;💰 Budgeting and Personal Finance: &lt;a href=&#34;https://mint.intuit.com/&#34;&gt;Mint&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;📰 News: &lt;a href=&#34;https://inoreader.com/&#34;&gt;Inoreader&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;🎵 Music: Youtube Music&lt;/li&gt;
&lt;li&gt;🎤 Podcasts: &lt;a href=&#34;https://pocketcasts.com/&#34;&gt;Pocket Casts&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;🔐 Password Management: &lt;a href=&#34;https://1password.com/&#34;&gt;1Password&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;🧑‍💻 Code Editor: &lt;a href=&#34;https://code.visualstudio.com/&#34;&gt;VS Code&lt;/a&gt; and &lt;a href=&#34;https://neovim.io/&#34;&gt;Neovim&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;✈️ VPN: &lt;a href=&#34;https://mullvad.net&#34;&gt;Mullvad VPN&lt;/a&gt; and &lt;a href=&#34;https://tailscale.com/&#34;&gt;Tailscale&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/blog/my-default-apps-of-2023/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>The `datalist` HTML element</title>
      <link>https://www.brandonpugh.com/til/html/datalist/</link>
      <pubDate>Mon, 20 Nov 2023 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/html/datalist/</guid>
      <description>&lt;p&gt;Today I learned that there&amp;rsquo;s now an HTML element called &lt;a href=&#34;https://developer.mozilla.org/en-US/docs/Web/HTML/Element/datalist&#34;&gt;&lt;code&gt;datalist&lt;/code&gt;&lt;/a&gt; that&amp;rsquo;s basically an autocomplete-like input element.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/html/datalist/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Dependency Review</title>
      <link>https://www.brandonpugh.com/til/github/dependency-review/</link>
      <pubDate>Wed, 15 Nov 2023 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/github/dependency-review/</guid>
      <description>&lt;p&gt;Today I learned that Github has a cool &lt;a href=&#34;https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/reviewing-dependency-changes-in-a-pull-request&#34;&gt;dependency review&lt;/a&gt; feature for pull requests.&lt;/p&gt;
&lt;p&gt;If a dependency file like a &lt;code&gt;package.json&lt;/code&gt; or &lt;code&gt;.csproj&lt;/code&gt; has been modified, you can click on the &amp;ldquo;rich diff&amp;rdquo; button and it will list out any dependencies that changed or any vulnerabilities for those versions. It&amp;rsquo;ll even list out sub-dependencies in a &lt;code&gt;package-lock.json&lt;/code&gt; which is otherwise pretty inscrutable.&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;screenshot of package.json rich diff&#34; loading=&#34;lazy&#34; src=&#34;dependency-review.png&#34;&gt;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/github/dependency-review/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Disabled buttons are bad for accessibility</title>
      <link>https://www.brandonpugh.com/til/html/disabled-buttons-bad-accessibility/</link>
      <pubDate>Fri, 10 Nov 2023 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/html/disabled-buttons-bad-accessibility/</guid>
      <description>&lt;p&gt;Today I learned that disabled buttons are potentially bad for accessibility.&lt;/p&gt;
&lt;p&gt;I realized long ago that disabled buttons can be bad for UX but I just saw Chris Ferdinandi&amp;rsquo;s post &lt;a href=&#34;https://gomakethings.com/dont-disable-buttons/&#34;&gt;Don&amp;rsquo;t Disable Buttons&lt;/a&gt;, and learned that disabled buttons aren&amp;rsquo;t focusable which means they don&amp;rsquo;t work well with screen readers or navigating with the keyboard.&lt;/p&gt;
&lt;p&gt;I usually recommend against disabling form submit buttons when there are validation errors because the user has no feedback as to &lt;em&gt;why&lt;/em&gt; it&amp;rsquo;s disabled, but Chris gives the example of disabling while the form is being submitted (which I&amp;rsquo;ve probably done in the past) and he goes into detail about the issues with this approach and a good alternative.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/html/disabled-buttons-bad-accessibility/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>`lh` and `rlh` units</title>
      <link>https://www.brandonpugh.com/til/css/line-height-units/</link>
      <pubDate>Thu, 09 Nov 2023 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/css/line-height-units/</guid>
      <description>&lt;p&gt;Today I learned that there are new &lt;a href=&#34;https://css-tricks.com/lh-and-rlh-units/&#34;&gt;line height&lt;/a&gt; units in CSS.
The &lt;code&gt;lh&lt;/code&gt; unit is “equal to the computed value of line-height”.&lt;/p&gt;
&lt;p&gt;If nothing else this will be nice for a small annoyance I&amp;rsquo;ve run into before of vertically centering icons:&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;screenshot showing the difference vertically aligning icon with lh and em&#34; loading=&#34;lazy&#34; src=&#34;line-height-screenshot.png&#34;&gt;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/css/line-height-units/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Native node import path aliases</title>
      <link>https://www.brandonpugh.com/til/node/import-aliases/</link>
      <pubDate>Wed, 08 Nov 2023 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/node/import-aliases/</guid>
      <description>&lt;p&gt;Today I learned that node natively supports import path aliases with the &lt;a href=&#34;https://nodejs.org/api/packages.html#imports&#34;&gt;imports field&lt;/a&gt; in &lt;code&gt;package.json&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The nice thing about this is that they&amp;rsquo;re supported by most node tools now so you don&amp;rsquo;t need to configure your aliases separately in different tools like eslint, webpack, vite, etc&amp;hellip;&lt;/p&gt;
&lt;p&gt;If you&amp;rsquo;re not familiar with import aliases, they&amp;rsquo;re a handy way to avoid unwieldy relative import paths.&lt;/p&gt;
&lt;p&gt;instead of:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-js&#34; data-lang=&#34;js&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kr&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;utils&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;from&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;../../../../shared/utils&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;you can have:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-js&#34; data-lang=&#34;js&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kr&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;utils&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;from&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;#shared/utils&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;A nice config to start with is something similar to:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-json&#34; data-lang=&#34;json&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;imports&amp;#34;&lt;/span&gt;&lt;span class=&#34;err&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;nt&#34;&gt;&amp;#34;#*&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;./*&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;err&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;which lets you import anything from the root of your project.&lt;/p&gt;
&lt;p&gt;I actually discovered this from looking through the &lt;a href=&#34;https://github.com/epicweb-dev/epic-stack/blob/main/docs/decisions/031-imports.md&#34;&gt;decision log&lt;/a&gt; of the &lt;a href=&#34;https://github.com/epicweb-dev/epic-stack&#34;&gt;&lt;code&gt;epic-stack&lt;/code&gt;&lt;/a&gt; react project.&lt;/p&gt;
&lt;p&gt;Unfortunately typescript doesn&amp;rsquo;t support it yet (though it&amp;rsquo;s planned), so you&amp;rsquo;d still need to update &lt;code&gt;tsconfig.json&lt;/code&gt; with:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-json&#34; data-lang=&#34;json&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;paths&amp;#34;&lt;/span&gt;&lt;span class=&#34;err&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;nt&#34;&gt;&amp;#34;#*&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;./*&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;],&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;err&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/node/import-aliases/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Override nested dependencies with npm</title>
      <link>https://www.brandonpugh.com/til/node/npm-overrides/</link>
      <pubDate>Mon, 06 Nov 2023 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/node/npm-overrides/</guid>
      <description>&lt;p&gt;Today I learned that as of npm cli v8.3.0 (2021-12-09), you can use the &lt;a href=&#34;https://docs.npmjs.com/cli/v9/configuring-npm/package-json#overrides&#34;&gt;overrides field&lt;/a&gt; in &lt;code&gt;package.json&lt;/code&gt; to &amp;ldquo;override&amp;rdquo; nested dependency versions.&lt;/p&gt;
&lt;p&gt;This is handy for several scenarios, but for me I used for a third-party react component that has a &lt;code&gt;peerDependency&lt;/code&gt; on v16 of react even though it works just fine with v18 but it isn&amp;rsquo;t under active development at the moment so I had to override the version it accepts:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-json&#34; data-lang=&#34;json&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;s2&#34;&gt;&amp;#34;overrides&amp;#34;&lt;/span&gt;&lt;span class=&#34;err&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;nt&#34;&gt;&amp;#34;react-input-range&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;nt&#34;&gt;&amp;#34;react-dom&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;^18.2.0&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;nt&#34;&gt;&amp;#34;react&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;^18.2.0&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;err&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Yarn has similar functionality that it calls &lt;a href=&#34;https://classic.yarnpkg.com/lang/en/docs/selective-version-resolutions/&#34;&gt;resolutions&lt;/a&gt;.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/node/npm-overrides/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Use ChatGPT to help you write architectural decision records</title>
      <link>https://www.brandonpugh.com/til/ai/chatgpt-to-help-write-adr/</link>
      <pubDate>Fri, 03 Nov 2023 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/ai/chatgpt-to-help-write-adr/</guid>
      <description>&lt;p&gt;I&amp;rsquo;ve been discovering recently that ChatGPT is actually pretty good at helping write &lt;a href=&#34;https://adr.github.io/&#34;&gt;Architectural Decision Records (ADRs)&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Like most writing tasks, I&amp;rsquo;m finding ChatGPT is good at giving me a nice starting point instead of staring a blank template.&lt;/p&gt;
&lt;p&gt;Even with as simple a prompt as &amp;ldquo;write an architectural decision record on why we chose to go with react instead of angular&amp;rdquo;, it&amp;rsquo;ll give a decent list of pros and cons on the topic in a common ADR template.
I can also refine it further by saying &amp;ldquo;write it using the following template instead&amp;hellip;&amp;rdquo;&lt;/p&gt;
&lt;p&gt;I really like ADRs for capturing &lt;strong&gt;&lt;em&gt;why&lt;/em&gt;&lt;/strong&gt; we made a particular decision and the important points we considered and which things might have been deal breakers - which ChatGPT obviously can&amp;rsquo;t do for you but it&amp;rsquo;s a quick way to list out some points and occasionally it&amp;rsquo;ll even mention something I hadn&amp;rsquo;t considered.&lt;/p&gt;
&lt;p&gt;I also like asking it to argue the reverse like: &amp;ldquo;write an architectural decision record on why we chose to go with &lt;em&gt;angular instead of react&lt;/em&gt;&amp;rdquo;&lt;/p&gt;
&lt;p&gt;Interestingly, it will show the result in the UI as the rendered markdown but when you click the &amp;ldquo;copy&amp;rdquo; button it will copy the source markdown which is nice.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/ai/chatgpt-to-help-write-adr/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Blob URLs</title>
      <link>https://www.brandonpugh.com/til/html/blob-url/</link>
      <pubDate>Thu, 02 Nov 2023 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/html/blob-url/</guid>
      <description>&lt;p&gt;Today I learned that in a web page, when you&amp;rsquo;re working with Blob or File objects you can call &lt;code&gt;URL.createObjectURL()&lt;/code&gt; to create a Blob URL that can be used as the source for anything that normally takes a URL like images or download links.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s also apparently a good alternative to base64 encoded Data-URIs especially when dealing with larger amounts of data since a base64 encoded file will be 33% larger than the raw binary.&lt;/p&gt;
&lt;p&gt;I was running into issues trying to embed a large PDF with the &lt;code&gt;&amp;lt;object&amp;gt;&lt;/code&gt; element and instead of setting a massive base64 string as the data source, I was able to convert it to a blob and use a blob url so it ends up looking something like:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&amp;lt;object data=&amp;quot;blob:https://localhost/d827ea99-9e80-496a-a8e0-e107b83080e9&amp;quot; type=&amp;quot;application/pdf&amp;quot;&amp;gt;&amp;lt;/object&amp;gt;&lt;/code&gt;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/html/blob-url/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>`every()` returns true for an empty array</title>
      <link>https://www.brandonpugh.com/til/javascript/every-returns-true-empty-array/</link>
      <pubDate>Wed, 01 Nov 2023 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/javascript/every-returns-true-empty-array/</guid>
      <description>&lt;p&gt;Today I learned that the javascript array method &lt;code&gt;.every()&lt;/code&gt; will always return true for an empty array.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-js&#34; data-lang=&#34;js&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;[].&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;every&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;((&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;x&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;x&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;         &lt;span class=&#34;c1&#34;&gt;// true
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;[].&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;every&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(()&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&#34;kc&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;           &lt;span class=&#34;c1&#34;&gt;// true
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;[].&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;every&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(()&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&#34;kc&#34;&gt;false&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;          &lt;span class=&#34;c1&#34;&gt;// true
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;For me at least, this was a bit surprising and I realized I&amp;rsquo;d been thinking about this function works incorrectly.
Your first thought might be that this is another one of javascript&amp;rsquo;s quirks, but this is actually how most languages implement similar functions including Rust, Python, and C#:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-csharp&#34; data-lang=&#34;csharp&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;result&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;new&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;List&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;int&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;().&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;All&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;x&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;x&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;   &lt;span class=&#34;c1&#34;&gt;// true&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;result&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;new&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;List&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;int&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;().&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;All&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;x&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&#34;kc&#34;&gt;false&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;   &lt;span class=&#34;c1&#34;&gt;// true&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Apparently this is because of Math. Specifically, it&amp;rsquo;s meant to behave the same as the &amp;ldquo;for all&amp;rdquo; quantifier in mathematics.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://humanwhocodes.com/blog/2023/09/javascript-wtf-why-does-every-return-true-for-empty-array/#user-content-fn-10&#34;&gt;Nicholas Zakas has a good article&lt;/a&gt; that goes into more detail and this nice tip if you also found this behavior surprising:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Instead of reading every() as “does every item in this array match this condition?” read it as, “is there any item in this array that doesn’t match this condition?”&lt;/p&gt;
&lt;/blockquote&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/javascript/every-returns-true-empty-array/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Update git credentials in Windows</title>
      <link>https://www.brandonpugh.com/til/git/update-credentials/</link>
      <pubDate>Fri, 20 Oct 2023 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/git/update-credentials/</guid>
      <description>&lt;p&gt;Today I learned that if you need to update (or delete) credentials that were previously saved with the &lt;code&gt;git-credential-manager&lt;/code&gt;, then you have to go the Windows Credential Manager.&lt;/p&gt;
&lt;p&gt;Find it under &lt;code&gt;Control Panel -&amp;gt; Credential Manager -&amp;gt; Generic Credentials&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://cmatskas.com/how-to-update-your-git-credentials-on-windows/&#34;&gt;Read more&lt;/a&gt;.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/git/update-credentials/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Calling an extension method on a null instance</title>
      <link>https://www.brandonpugh.com/til/csharp/string-extension-method/</link>
      <pubDate>Thu, 19 Oct 2023 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/csharp/string-extension-method/</guid>
      <description>&lt;p&gt;Today I learned that you can call an extension method on a null instance of the type.
I had always assumed without thinking about it too hard, that the reason &lt;code&gt;string.IsNullOrEmpty&lt;/code&gt; isn&amp;rsquo;t defined as an extension method in the framework is because you would get &lt;code&gt;NullReferenceException&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;But if we were to define an extension method like &lt;code&gt;public static bool IsNullOrEmpty(this string s)&lt;/code&gt;, and call it like &lt;code&gt;if(s.IsNullOrEmpty())&lt;/code&gt;
this is just syntactic sugar for &lt;code&gt;if(StringExtensions.IsNullOrEmpty(s))&lt;/code&gt; and therefore it&amp;rsquo;s safe to call on a null instance.&lt;/p&gt;
&lt;p&gt;Apparently the argument against this is that it could be confusing or counterintuitive when looking at the code if you think it&amp;rsquo;s an instance method.
I personally fall on the side of adding convenient extension methods like this - if nothing else to add a &lt;code&gt;NotNullOrEmpty&lt;/code&gt; method.&lt;/p&gt;
&lt;p&gt;To me I&amp;rsquo;ve always found it very easy to miss the &lt;code&gt;!&lt;/code&gt; operator in a conditional and so avoiding those makes the condition much easier to read.&lt;/p&gt;
&lt;p&gt;I much perfer:&lt;br&gt;
&lt;code&gt;if(userName.NotNullOrEmpty)&lt;/code&gt;&lt;br&gt;
over&lt;br&gt;
&lt;code&gt;if(!string.IsNullOrEmpty(userName))&lt;/code&gt;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/csharp/string-extension-method/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Zeal offline documentation browser</title>
      <link>https://www.brandonpugh.com/til/documentation/zeal/</link>
      <pubDate>Wed, 18 Oct 2023 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/documentation/zeal/</guid>
      <description>&lt;p&gt;Today I learned about a cool project called &lt;a href=&#34;https://zealdocs.org/&#34;&gt;Zeal&lt;/a&gt; that let&amp;rsquo;s download and browse the documentation for a bunch of projects.
I&amp;rsquo;ve always liked the idea being able to continue working even without internet.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/documentation/zeal/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Conditional logic in pipelines YAML</title>
      <link>https://www.brandonpugh.com/til/azure-devops/conditional-yaml/</link>
      <pubDate>Mon, 16 Oct 2023 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/azure-devops/conditional-yaml/</guid>
      <description>&lt;p&gt;Today I learned that you can have conditional expressions in Azure Pipelines YAML files:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nt&#34;&gt;steps&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;- &lt;span class=&#34;nt&#34;&gt;script&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;l&#34;&gt;tool&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;  &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;env&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;    &lt;/span&gt;&lt;span class=&#34;l&#34;&gt;${{ if parameters.debug }}:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;      &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;TOOL_DEBUG&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;kc&#34;&gt;true&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;      &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;TOOL_DEBUG_DIR&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;l&#34;&gt;_dbg&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;    &lt;/span&gt;&lt;span class=&#34;l&#34;&gt;${{ else }}:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;      &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;TOOL_DEBUG&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;kc&#34;&gt;false&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;      &lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;TOOL_DEBUG_DIR&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;l&#34;&gt;_dbg&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/azure-devops/conditional-yaml/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Toggle CSS classes in Devtools</title>
      <link>https://www.brandonpugh.com/til/devtools/toggle-css-classes/</link>
      <pubDate>Fri, 13 Oct 2023 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/devtools/toggle-css-classes/</guid>
      <description>&lt;p&gt;Today I learned that the little &lt;code&gt;.cls&lt;/code&gt; button in the Chrome devtools is a handy way to toggle classes on an element:&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;toggle class screenshot&#34; loading=&#34;lazy&#34; src=&#34;toggle-css-classes.png&#34;&gt;&lt;/p&gt;
&lt;p&gt;I imagine the trend of using utility classes was the main motivation for this feature (although apparently it&amp;rsquo;s been there for a few years and I only just figured out what it was for).&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/devtools/toggle-css-classes/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Copy git link extension</title>
      <link>https://www.brandonpugh.com/til/visual-studio/copy-git-link/</link>
      <pubDate>Wed, 11 Oct 2023 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/visual-studio/copy-git-link/</guid>
      <description>&lt;p&gt;2025-06-16 Update: This is now &lt;a href=&#34;https://devblogs.microsoft.com/visualstudio/introducing-the-copy-git-permalink-feature-in-visual-studio-17-12/&#34;&gt;built-in to Visual Studio&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Today I learned about the &lt;a href=&#34;https://marketplace.visualstudio.com/items?itemName=EtienneBAUDOUX.CopyGitLink2022&amp;amp;ssr=false#overview&#34;&gt;Copy Git Link&lt;/a&gt; extension for Visual Studio which will give you the url of currently selected lines on your git hosting provider i.e azure devops or GitHub.&lt;/p&gt;
&lt;p&gt;Especially handy for quickly pointing a teammate to a particular part of the codebase.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/visual-studio/copy-git-link/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Git rerere</title>
      <link>https://www.brandonpugh.com/til/git/rerere/</link>
      <pubDate>Thu, 05 Oct 2023 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/git/rerere/</guid>
      <description>&lt;p&gt;If you&amp;rsquo;ve ever had to abort a rebase or merge but didn&amp;rsquo;t want to waste the work you already did resolving merge conflicts, then you should enable the git rerere option:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;git global config rerere.enabled true&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;It stands for Reuse Recorded Resolution, and it essentially remembers how you resolved a merge conflict and will automatically reapply if it sees it again.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://bitbucket.org/blog/resolving-conflicts-with-git-rerere&#34;&gt;Resolving conflicts with git-rerere&lt;/a&gt;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/git/rerere/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>git-absorb</title>
      <link>https://www.brandonpugh.com/til/git/git-absorb/</link>
      <pubDate>Wed, 04 Oct 2023 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/git/git-absorb/</guid>
      <description>&lt;p&gt;One of my favorite git plugins is &lt;a href=&#34;https://github.com/tummychow/git-absorb&#34;&gt;git-absorb&lt;/a&gt; (which is a port of Mercurial&amp;rsquo;s absorb).&lt;br&gt;
It basically helps you create &lt;code&gt;--fixup&lt;/code&gt; commits automatically, which you can then use an interactive rebase with autoSquash to &amp;ldquo;absorb&amp;rdquo; them into your previous commits.&lt;/p&gt;
&lt;p&gt;I tend to use it when I&amp;rsquo;ve made a bunch of small tweaks to my feature branch, especially from automated feedback from a PR bot, I&amp;rsquo;ll then stage the changes and &lt;a href=&#34;https://github.com/tummychow/git-absorb&#34;&gt;git-absorb&lt;/a&gt; will find the previous commit on my branch that also modified those same lines.&lt;/p&gt;
&lt;p&gt;I have a git alias set to run:
&lt;code&gt;git absorb --base main --force&lt;/code&gt;&lt;br&gt;
So it&amp;rsquo;ll search through all the commits on my branch whether I&amp;rsquo;ve pushed them or not.&lt;/p&gt;
&lt;p&gt;As usual Andrew Lock has the best post explaining it: (&lt;a href=&#34;https://andrewlock.net/super-charging-git-rebase-with-git-absorb/&#34;&gt;https://andrewlock.net/super-charging-git-rebase-with-git-absorb/&lt;/a&gt;)&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/git/git-absorb/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>push.autoSetupRemote</title>
      <link>https://www.brandonpugh.com/til/git/auto-setup-remote/</link>
      <pubDate>Tue, 03 Oct 2023 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/git/auto-setup-remote/</guid>
      <description>&lt;p&gt;Today I learned about the git config setting &lt;code&gt;push.autoSetupRemote&lt;/code&gt; that was added in version 2.37.0.&lt;/p&gt;
&lt;p&gt;Like &lt;a href=&#34;https://tekin.co.uk/2020/01/git-alias-to-push-and-set-upstream-trackng-on-a-branch&#34;&gt;Tekin mentions in his post&lt;/a&gt;, I&amp;rsquo;ve had a git alias to do create my upstream branch but I still forget sometimes.
To me this seems safe to enable by default with:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;git config --global --add --bool push.autoSetupRemote true&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;and git will now set the upstream tracking branch for you!&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/git/auto-setup-remote/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Use the `valueAsNumber` property of html number inputs</title>
      <link>https://www.brandonpugh.com/til/html/valueasnumber/</link>
      <pubDate>Mon, 02 Oct 2023 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/html/valueasnumber/</guid>
      <description>&lt;p&gt;Today I learned about the &lt;code&gt;valueAsNumber&lt;/code&gt; property of html number inputs.&lt;/p&gt;
&lt;p&gt;So instead of having to parse the value like: &lt;code&gt;const num = parseFloat(e.target.value)&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;You can do: &lt;code&gt;const num = e.target.valueAsNumber&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;For example in react:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-jsx&#34; data-lang=&#34;jsx&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;return&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;input&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;na&#34;&gt;type&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;number&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;na&#34;&gt;value&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;number&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;na&#34;&gt;onChange&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;e&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;c1&#34;&gt;// ✅
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;kr&#34;&gt;const&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;num&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;e&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;target&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;valueAsNumber&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;nx&#34;&gt;setNumber&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;num&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;p&#34;&gt;}}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;/&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;a href=&#34;https://www.builder.io/blog/numbers-and-dates&#34;&gt;Work With Number and Date Inputs in JavaScript&lt;/a&gt;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/html/valueasnumber/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Format a paragraph</title>
      <link>https://www.brandonpugh.com/til/vim/format-paragraph-hard-wrap/</link>
      <pubDate>Sun, 01 Oct 2023 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/vim/format-paragraph-hard-wrap/</guid>
      <description>&lt;p&gt;In vim you can &lt;a href=&#34;https://vim.fandom.com/wiki/Automatic_formatting_of_paragraphs&#34;&gt;format a paragraph&lt;/a&gt; of prose text with &lt;code&gt;gq&lt;/code&gt;.
This basically will hard-wrap the lines to the configured &lt;code&gt;textwidth&lt;/code&gt; for the filetype.&lt;/p&gt;
&lt;p&gt;I use this all the time when writing git commit messages so the body of the message has the &lt;a href=&#34;https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html&#34;&gt;recommended&lt;/a&gt; max line length of 72.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/vim/format-paragraph-hard-wrap/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Preserve case with find and replace</title>
      <link>https://www.brandonpugh.com/til/vscode/find-replace-preserve-case/</link>
      <pubDate>Fri, 29 Sep 2023 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/vscode/find-replace-preserve-case/</guid>
      <description>&lt;p&gt;Today I learned that vscode has an option to &lt;a href=&#34;https://code.visualstudio.com/updates/v1_37#_preserve-case-in-find-and-replace&#34;&gt;preserve case with find and replace&lt;/a&gt; (I somehow never noticed the &amp;ldquo;AB&amp;rdquo; button before).
I&amp;rsquo;ve always wanted this when having to rename an entity in a file with instances both capitalized and lowercase.&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;preserve case screenshot&#34; loading=&#34;lazy&#34; src=&#34;./preserve-case.gif&#34;&gt;&lt;/p&gt;
&lt;p&gt;I actually discovered this because I saw that this feature was just added to the latest &lt;a href=&#34;https://devblogs.microsoft.com/visualstudio/keep-your-casing-with-case-preserving-find-and-replace/&#34;&gt;Visual Studio 2022 preview&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;And for vim users, there&amp;rsquo;s &lt;a href=&#34;https://github.com/tpope/vim-abolish&#34;&gt;Vim Abolish&lt;/a&gt; 😁&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/vscode/find-replace-preserve-case/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>SVG sprites</title>
      <link>https://www.brandonpugh.com/til/html/svg-sprites/</link>
      <pubDate>Thu, 28 Sep 2023 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/html/svg-sprites/</guid>
      <description>&lt;p&gt;Today I learned about the &lt;code&gt;&amp;lt;use&amp;gt;&lt;/code&gt; element and how you can use it to create &lt;a href=&#34;https://benadam.me/thoughts/react-svg-sprites/&#34;&gt;&lt;em&gt;SVG&lt;/em&gt; sprites&lt;/a&gt;.
It turns out that my preferred way of working with svgs in react by embedding them in the components, &lt;a href=&#34;https://kurtextrem.de/posts/svg-in-js&#34;&gt;is not great for performance&lt;/a&gt; or bundle size.
But as &lt;a href=&#34;https://benadam.me/thoughts/react-svg-sprites/&#34;&gt;Ben Adam&amp;rsquo;s post shows&lt;/a&gt;, it looks like inline svgs using sprites gives you the best performance to development experience tradoff.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/html/svg-sprites/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>One-time code autocomplete</title>
      <link>https://www.brandonpugh.com/til/html/one-time-code-autocomplete/</link>
      <pubDate>Wed, 27 Sep 2023 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/html/one-time-code-autocomplete/</guid>
      <description>&lt;p&gt;I just discovered that there is a &lt;code&gt;autocomplete=&amp;quot;one-time-code&amp;quot;&lt;/code&gt; value you can use on mobile devices where the operating system will autopopulate the field with a code that the user receives via SMS.
I haven&amp;rsquo;t had a chance to test it out but it seems pretty cool and I wish every banking site would just add this one html attribute (since they seem unable to add any MFA option other than SMS).&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://web.dev/articles/sms-otp-form#autocompleteone-time-code&#34;&gt;SMS OTP code&lt;/a&gt;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/html/one-time-code-autocomplete/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>--update-refs won&#39;t update a ref if it&#39;s currently checked out in a working directory</title>
      <link>https://www.brandonpugh.com/til/git/update-refs-working-directory/</link>
      <pubDate>Mon, 25 Sep 2023 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/git/update-refs-working-directory/</guid>
      <description>&lt;p&gt;Today I learned that if you&amp;rsquo;re using the fairly new &lt;code&gt;--update-refs&lt;/code&gt; feature of git to update multiple refs during a rebase, git won&amp;rsquo;t update a ref if it&amp;rsquo;s currently checked out in another working directory for that repo.&lt;/p&gt;
&lt;p&gt;This makes sense but git currently doesn&amp;rsquo;t give you any feedback that it wasn&amp;rsquo;t updated or why. It wasn&amp;rsquo;t until I tried to manually update it with a &lt;code&gt;git branch --force&lt;/code&gt; that it told me the issue:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;fatal: cannot force update the branch &#39;feature-1&#39; checked out at &#39;/projects/my-other-branch&#39;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;If you&amp;rsquo;re not familiar with either of these features I highly recommend looking into them.
Andrew Lock has excellet write-ups on them:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://andrewlock.net/working-on-two-git-branches-at-once-with-git-worktree/&#34;&gt;Working on two git branches at once with git worktree&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://andrewlock.net/working-with-stacked-branches-in-git-is-easier-with-update-refs/&#34;&gt;Working with stacked branches in Git is easier with &amp;ndash;update-refs&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/git/update-refs-working-directory/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Highlight text in markdown</title>
      <link>https://www.brandonpugh.com/til/azure-devops/markdown-highlight/</link>
      <pubDate>Fri, 22 Sep 2023 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/azure-devops/markdown-highlight/</guid>
      <description>&lt;p&gt;I just learned that you can highlight text in PR descriptions and comments on Azure devops by using the &lt;code&gt;&amp;lt;mark&amp;gt;&lt;/code&gt; element in your markdown:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&amp;lt;mark&amp;gt;Notice this!&amp;lt;/mark&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;screenshot of highlighted text on azure devops&#34; loading=&#34;lazy&#34; src=&#34;https://www.brandonpugh.com/til/azure-devops/markdown-highlight-screenshot.png&#34;&gt;&lt;/p&gt;
&lt;p&gt;I don&amp;rsquo;t think I was even aware of the &lt;a href=&#34;https://developer.mozilla.org/en-US/docs/Web/HTML/Element/mark&#34;&gt;&lt;code&gt;mark&lt;/code&gt; html element&lt;/a&gt; even though it&amp;rsquo;s been around for a while now.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/azure-devops/markdown-highlight/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Specify timestamp in Google Drive video URL</title>
      <link>https://www.brandonpugh.com/til/google/video-timestamp-query-param/</link>
      <pubDate>Tue, 19 Sep 2023 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/google/video-timestamp-query-param/</guid>
      <description>&lt;p&gt;Today I learned that Google Drive uses the same video player as YouTube so if you want to link to a specific timestamp in a video you can append a URL parameter like &lt;code&gt;t=&amp;lt;number of seconds&amp;gt;&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;So to share a link to a video and have it start playing at 10:44, the URL will look like &lt;code&gt;/view?t=644&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;A colleague also pointed out that you don&amp;rsquo;t have to calculate the timestamp in seconds — the &lt;code&gt;t&lt;/code&gt; parameter accepts a shorthand like so &lt;code&gt;t=10m44s&lt;/code&gt;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/google/video-timestamp-query-param/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Disabling browser autofill in a form</title>
      <link>https://www.brandonpugh.com/til/html/disable-autocomplete/</link>
      <pubDate>Fri, 15 Sep 2023 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/html/disable-autocomplete/</guid>
      <description>&lt;p&gt;Today I learned that &lt;code&gt;autocomplete=&amp;quot;off&amp;quot;&lt;/code&gt; tends to be completely ignored by browsers these days because they seem to have the attitude that websites don&amp;rsquo;t use it correctly.&lt;/p&gt;
&lt;p&gt;Apparently the best way to prevent a browser from trying to autofill a field is to tell the browser it&amp;rsquo;s not the field it thinks it is with something like &lt;code&gt;autocomplete=&amp;quot;something-else&amp;quot;&lt;/code&gt;.
If it&amp;rsquo;s anything the browser doesn&amp;rsquo;t recognize it won&amp;rsquo;t try to fill it.
It looks like &lt;code&gt;autocomplete=&amp;quot;new-password&amp;quot;&lt;/code&gt; is one people tend to use especially for any &lt;code&gt;type=&amp;quot;password&amp;quot;&lt;/code&gt; fields that aren&amp;rsquo;t actually meant to be a user&amp;rsquo;s login password.
See this &lt;a href=&#34;https://stackoverflow.com/questions/15738259/disabling-chrome-autofill&#34;&gt;StackOverflow question&lt;/a&gt; for more discussion.&lt;/p&gt;
&lt;p&gt;Likewise if you want to give the browser hints about what it should​​​​​​​ try to suggest you can use one of the &lt;a href=&#34;https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete#values&#34;&gt;recognized values&lt;/a&gt; like &lt;code&gt;address-line1&lt;/code&gt;.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/html/disable-autocomplete/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>CSS Nesting</title>
      <link>https://www.brandonpugh.com/til/css/css-nesting/</link>
      <pubDate>Thu, 14 Sep 2023 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/css/css-nesting/</guid>
      <description>&lt;p&gt;Today I learned that as of last month all modern browsers support &lt;a href=&#34;https://developer.chrome.com/articles/css-nesting/&#34;&gt;css nesting&lt;/a&gt;!&lt;/p&gt;
&lt;p&gt;So instead of having to define styles like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-css&#34; data-lang=&#34;css&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nc&#34;&gt;header&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;k&#34;&gt;background-color&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;kc&#34;&gt;blue&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nc&#34;&gt;header&lt;/span&gt; &lt;span class=&#34;nt&#34;&gt;p&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;k&#34;&gt;font-size&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;16&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;px&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nc&#34;&gt;header&lt;/span&gt; &lt;span class=&#34;nt&#34;&gt;p&lt;/span&gt; &lt;span class=&#34;nt&#34;&gt;span&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;nd&#34;&gt;hover&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;k&#34;&gt;color&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;kc&#34;&gt;green&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;you can instead do:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-css&#34; data-lang=&#34;css&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nc&#34;&gt;header&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;k&#34;&gt;background-color&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;kc&#34;&gt;blue&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;err&#34;&gt;p&lt;/span&gt; &lt;span class=&#34;err&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;font-size&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;16&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;px&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;err&#34;&gt;span&lt;/span&gt; &lt;span class=&#34;err&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;err&#34;&gt;&amp;amp;:hover&lt;/span&gt; &lt;span class=&#34;err&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;k&#34;&gt;color&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;kc&#34;&gt;green&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;err&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;err&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;err&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This was the last feature of Sass that I used regularly that was missing from native CSS (&lt;a href=&#34;https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties&#34;&gt;CSS variables&lt;/a&gt; being the first big one that caused me to drop pulling sass into projects).&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/css/css-nesting/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Mock service worker</title>
      <link>https://www.brandonpugh.com/til/javascript/mock-service-worker/</link>
      <pubDate>Wed, 13 Sep 2023 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/javascript/mock-service-worker/</guid>
      <description>&lt;p&gt;I recently discovered &lt;a href=&#34;https://mswjs.io/&#34;&gt;Mock Service Worker&lt;/a&gt;, a clever javascript utility that let&amp;rsquo;s you mock your API by intercepting network requests.
I&amp;rsquo;ve started using it in my frontend tests after reading Kent&amp;rsquo;s article &lt;a href=&#34;https://kentcdodds.com/blog/stop-mocking-fetch&#34;&gt;Stop Mocking Fetch&lt;/a&gt; and it&amp;rsquo;s a nice way to test a component is handling network requests appropriately without actually hitting an API.
The novel aspect is that it can install itself as a service worker (which can intercept network requests for caching) in your app during development and reuse the same mock requests that you&amp;rsquo;ve setup during testing.
Handy for when the backend isn&amp;rsquo;t ready or you don&amp;rsquo;t want to take the time to get the app in the correct state to test a UI change.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/javascript/mock-service-worker/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Dev containers</title>
      <link>https://www.brandonpugh.com/til/vscode/devcontainers/</link>
      <pubDate>Mon, 11 Sep 2023 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/vscode/devcontainers/</guid>
      <description>&lt;p&gt;Today I learned that &lt;a href=&#34;https://containers.dev/&#34;&gt;dev containers&lt;/a&gt; are an actual spec.
I&amp;rsquo;d been hearing the term more lately but I thought it was a general term for containers used for local development but it&amp;rsquo;s actually an open spec for configuring an entire development environment within a container and it&amp;rsquo;s what you use to configure a &lt;a href=&#34;https://github.com/features/codespaces&#34;&gt;github codespace&lt;/a&gt; for a repo.
But the cool thing is you can use the vscode &lt;a href=&#34;https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers&#34;&gt;Dev containers extension&lt;/a&gt; and vscode will reopen in a docker container with all the dependencies, extensions, and configuration specified in a &lt;a href=&#34;https://containers.dev/implementors/spec/#devcontainerjson&#34;&gt;devcontainers.json&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;For example, if you want to experiment with a new programming language, you can quickly launch one of the sample containers (type &amp;ldquo;try&amp;rdquo; from the command palette) and have an environment ready to go (after docker downloads the image).&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;sample container selection screenshot&#34; loading=&#34;lazy&#34; src=&#34;devcontainers.png&#34;&gt;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/vscode/devcontainers/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>CSS accent-color property</title>
      <link>https://www.brandonpugh.com/til/css/accent-color/</link>
      <pubDate>Thu, 07 Sep 2023 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/css/accent-color/</guid>
      <description>&lt;p&gt;Today I learned that browsers now support an &lt;a href=&#34;https://developer.mozilla.org/en-US/docs/Web/CSS/accent-color&#34;&gt;accent-color&lt;/a&gt; property on some form inputs for customizing their color.
This is especially nice for checkboxes and radio buttons because now I no longer need any workarounds I&amp;rsquo;ve used in the past to make a decent-looking checkbox.
It will also ensure that it&amp;rsquo;s accessible by automatically adjusting the color of the check to an appropriate contrast:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-html&#34; data-lang=&#34;html&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;input&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;type&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;checkbox&amp;#34;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;class&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;yellow&amp;#34;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;checked&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;/&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;input&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;type&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;checkbox&amp;#34;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;class&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;purple&amp;#34;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;checked&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;/&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;style&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nt&#34;&gt;input&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;k&#34;&gt;display&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;kc&#34;&gt;block&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;k&#34;&gt;width&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;30&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;px&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;k&#34;&gt;height&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;30&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;px&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nt&#34;&gt;input&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nc&#34;&gt;purple&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;n&#34;&gt;accent-color&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;kc&#34;&gt;rebeccapurple&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nt&#34;&gt;input&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nc&#34;&gt;yellow&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;n&#34;&gt;accent-color&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;kc&#34;&gt;yellow&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;style&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;img alt=&#34;checkboxes-screenshot&#34; loading=&#34;lazy&#34; src=&#34;accent-color.png&#34;&gt;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/css/accent-color/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Delta pager for Git</title>
      <link>https://www.brandonpugh.com/til/git/delta-pager/</link>
      <pubDate>Tue, 05 Sep 2023 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/git/delta-pager/</guid>
      <description>&lt;p&gt;Today I learned that you can configure git to use a different diff viewer when displaying diffs from the command line.
You do this by setting the &lt;code&gt;pager&lt;/code&gt; config &lt;code&gt;git config --global core.pager delta&lt;/code&gt; and &lt;a href=&#34;https://github.com/dandavison/delta&#34;&gt;delta&lt;/a&gt; is a cool one written in Rust that can even display line numbers and syntax highlighting.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;git show&lt;/code&gt; produces:&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;screenshot of delta git show output&#34; loading=&#34;lazy&#34; src=&#34;delta-pager.png&#34;&gt;&lt;/p&gt;
&lt;p&gt;Relatedly, it uses the same themes as &lt;a href=&#34;https://github.com/sharkdp/bat/&#34;&gt;bat&lt;/a&gt; which is a &lt;code&gt;cat&lt;/code&gt; command line replacement with syntax highlighting that is pretty nice.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/git/delta-pager/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Null values in javascript interpolated strings</title>
      <link>https://www.brandonpugh.com/til/javascript/string-interpolation-null/</link>
      <pubDate>Fri, 01 Sep 2023 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/javascript/string-interpolation-null/</guid>
      <description>&lt;p&gt;Today I learned about a key difference between how javascript handles null values in interpolated strings compared to a language like C#&lt;/p&gt;
&lt;p&gt;In C#:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-csharp&#34; data-lang=&#34;csharp&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kt&#34;&gt;var&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;param1&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;kc&#34;&gt;null&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kt&#34;&gt;var&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;queryString&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s&#34;&gt;$&amp;#34;param1={param1}&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt; &lt;span class=&#34;c1&#34;&gt;// =&amp;gt; param1=&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;In Javascript&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-javascript&#34; data-lang=&#34;javascript&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kd&#34;&gt;var&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;param1&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;kc&#34;&gt;null&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kd&#34;&gt;var&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;queryString&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;sb&#34;&gt;`param1=&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;param1&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;sb&#34;&gt;`&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt; &lt;span class=&#34;c1&#34;&gt;// =&amp;gt; param1=null
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;the latter is probably not what you want since your api will likely set param1 to a string value of &amp;ldquo;null&amp;rdquo;.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/javascript/string-interpolation-null/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Object.fromEntries</title>
      <link>https://www.brandonpugh.com/til/javascript/from-entries/</link>
      <pubDate>Wed, 30 Aug 2023 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/javascript/from-entries/</guid>
      <description>&lt;p&gt;Today I learned about &lt;a href=&#34;https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/fromEntries&#34;&gt;Object.fromEntries()&lt;/a&gt; in javascript which essentially lets you convert a list of key/value pairs into an object (this is the same as the lodash function &lt;code&gt;fromPairs&lt;/code&gt;).&lt;/p&gt;
&lt;p&gt;This came in handy when I needed to convert a list of entities into a lookup object like:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-javascript&#34; data-lang=&#34;javascript&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;Object&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;fromEntries&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;nx&#34;&gt;users&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;map&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;((&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;user&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;return&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;user&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;id&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;user&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;isSelected&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;})&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt; &lt;span class=&#34;c1&#34;&gt;// =&amp;gt; { &amp;#39;1&amp;#39;: true, &amp;#39;2&amp;#39;: false, &amp;#39;3&amp;#39;: false }
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/javascript/from-entries/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Emulate page focus</title>
      <link>https://www.brandonpugh.com/til/devtools/emulate-focused-page/</link>
      <pubDate>Mon, 28 Aug 2023 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/devtools/emulate-focused-page/</guid>
      <description>&lt;p&gt;Today I learned about a devtools feature that helped me debug the styling of an element that would disappear when the input element lost focus which happens when you click over to the devtools.&lt;/p&gt;
&lt;p&gt;If you press &lt;code&gt;ctrl+shift+p&lt;/code&gt; to open the command palette in DevTools, and type &amp;ldquo;focus&amp;rdquo;, you&amp;rsquo;ll see a command to &amp;ldquo;Emulate a focused page&amp;rdquo; which will leave the focus on the element in the page even when you click into the DevTools.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://levelup.gitconnected.com/different-ways-to-inspect-disappearing-elements-on-a-browser-5df42888b7cf&#34;&gt;This post&lt;/a&gt; shows several other techniques you could potentially use but I found this option to work best for my scenario.&lt;/p&gt;
&lt;p&gt;My favorite technique is this clever javascript snippet you can run from the console:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-js&#34; data-lang=&#34;js&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;setTimeout&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;kd&#34;&gt;function&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;()&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;kr&#34;&gt;debugger&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;},&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;3000&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/devtools/emulate-focused-page/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Ternary in C# string interpolation</title>
      <link>https://www.brandonpugh.com/til/csharp/string-interpolation/</link>
      <pubDate>Wed, 23 Aug 2023 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/csharp/string-interpolation/</guid>
      <description>&lt;p&gt;Today I learned you can have ternary expressions inside of interpolated strings, you just need to wrap it in parenthesis:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;$&amp;quot;{timeSpan.Hours} hour{(timeSpan.Hours &amp;gt; 1 ? &amp;quot;s&amp;quot; : &amp;quot;&amp;quot;)} ago&amp;quot;&lt;/code&gt;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/csharp/string-interpolation/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Pretty Typescript errors Vscode extension</title>
      <link>https://www.brandonpugh.com/til/typescript/error-extension/</link>
      <pubDate>Mon, 21 Aug 2023 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/typescript/error-extension/</guid>
      <description>&lt;p&gt;I recently discovered the &lt;a href=&#34;https://marketplace.visualstudio.com/items?itemName=yoavbls.pretty-ts-errors&#34;&gt;Pretty Typescript errors&lt;/a&gt; Vscode extension that makes complicated Typescript errors much more readable in Vscode&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;tooltip comparison screenshot&#34; loading=&#34;lazy&#34; src=&#34;pretty-typescript-errors.png&#34;&gt;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/typescript/error-extension/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Ignore commits in Git Blame with --ignore-revs-file</title>
      <link>https://www.brandonpugh.com/til/git/ignore-revs-file/</link>
      <pubDate>Thu, 17 Aug 2023 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/git/ignore-revs-file/</guid>
      <description>&lt;p&gt;Today I learned that you can ignore commits in Git blame on Github with a &lt;code&gt;.git-blame-ignore-revs&lt;/code&gt; file in the root of your repo!&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;d known about the &lt;code&gt;git config blame.ignoreRevsFile&lt;/code&gt; config option where you can point it to a file with a list of commit IDs to ignore which is especially useful for those annoying commits in a repo where whitespace was cleaned up or every tab in the codebase was replaced with spaces.
You have to run the &lt;a href=&#34;https://www.stefanjudis.com/today-i-learned/how-to-exclude-commits-from-git-blame/&#34;&gt;config command locally&lt;/a&gt; but now apparently &lt;a href=&#34;https://docs.github.com/en/repositories/working-with-files/using-files/viewing-a-file#ignore-commits-in-the-blame-view&#34;&gt;Github does it automatically&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I also learned you can include comments in the file like:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# Run this command to always ignore formatting commits in `git blame`
# git config blame.ignoreRevsFile .git-blame-ignore-revs

# Changed everything to tabs
a926bba49c89a5b882cd298be3af2570b1e6252c

# Fixed all the formatting errors
5e78fdc6eac01e4e730046dc2811fbb78157a154
&lt;/code&gt;&lt;/pre&gt;
       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/git/ignore-revs-file/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Git branch --force</title>
      <link>https://www.brandonpugh.com/til/git/branch-force/</link>
      <pubDate>Wed, 16 Aug 2023 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/git/branch-force/</guid>
      <description>&lt;p&gt;Today I learned about the &lt;a href=&#34;https://git-scm.com/docs/git-branch#Documentation/git-branch.txt---force&#34;&gt;&lt;code&gt;--force&lt;/code&gt;&lt;/a&gt; parameter of &lt;code&gt;git branch&lt;/code&gt; which will take an existing branch and point it to a different commit.
This is another handy alternative to &lt;code&gt;git reset --hard&lt;/code&gt; for some common scenarios.&lt;/p&gt;
&lt;p&gt;For example, if I forgot to create a new feature branch and accidentally made some commits onto &lt;code&gt;main&lt;/code&gt;, I can run the following:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git checkout -b new-branch &lt;span class=&#34;c1&#34;&gt;# create the new branch and switch to it&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git branch --force main origin/main &lt;span class=&#34;c1&#34;&gt;# fix main back to what it should be&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;vs what I would do before:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git branch new-branch
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git reset --hard origin/main
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git checkout new-branch
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;which is one less command, but even better the contents of my working directory don&amp;rsquo;t have to change at all!&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/git/branch-force/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Find all CSS changes in Chrome DevTools</title>
      <link>https://www.brandonpugh.com/til/devtools/css-changes/</link>
      <pubDate>Tue, 15 Aug 2023 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/devtools/css-changes/</guid>
      <description>&lt;p&gt;Today I learned about the &lt;a href=&#34;https://developer.chrome.com/docs/devtools/changes/&#34;&gt;Changes tab&lt;/a&gt; in Chrome devtools.&lt;/p&gt;
&lt;p&gt;When you&amp;rsquo;re tweaking CSS styles in Chrome DevTools, you can see all the changes you&amp;rsquo;ve made by clicking the &amp;ldquo;Changes&amp;rdquo; tab in the bottom &amp;ldquo;drawer&amp;rdquo; in DevTools.
It&amp;rsquo;s especially nice because you can then copy the changes to your clipboard and paste them into your actual source file.
You can open it from the command palette (&lt;code&gt;ctrl+shift+p&lt;/code&gt;) and typing &amp;ldquo;show changes&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;One caveat I&amp;rsquo;ve noticed is that it doesn&amp;rsquo;t show styles you&amp;rsquo;ve added directly to an element as an inline style.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/devtools/css-changes/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Javascript Array.prototype.with()</title>
      <link>https://www.brandonpugh.com/til/javascript/array-with/</link>
      <pubDate>Fri, 11 Aug 2023 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/javascript/array-with/</guid>
      <description>&lt;p&gt;I just discovered the &lt;code&gt;with()&lt;/code&gt; method which takes an index value and a value to insert at that index and returns a new array with the value inserted at the index.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-javascript&#34; data-lang=&#34;javascript&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kr&#34;&gt;const&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;arr&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;3&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;4&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;5&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;];&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kr&#34;&gt;const&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;newArr&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;arr&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;kd&#34;&gt;with&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;a&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;console&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;log&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;newArr&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt; &lt;span class=&#34;c1&#34;&gt;// [1, 2, &amp;#39;a&amp;#39;, 4, 5]
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;You could do this before with something like &lt;code&gt;arr[2] = &#39;a&#39;&lt;/code&gt; but that would modify the original array.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;with()&lt;/code&gt; method became widely supported in 2021.&lt;/p&gt;
&lt;p&gt;Read more about the &lt;code&gt;with()&lt;/code&gt; method and alternatives in &lt;a href=&#34;https://www.stefanjudis.com/snippets/copy-array-and-replace-one-element-at-index-javascript/&#34;&gt;Stefan Judis&amp;rsquo; post&lt;/a&gt;.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/javascript/array-with/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Awesome AZD templates</title>
      <link>https://www.brandonpugh.com/til/azure/awesome-azd/</link>
      <pubDate>Thu, 10 Aug 2023 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/azure/awesome-azd/</guid>
      <description>&lt;p&gt;Today I discovered the &lt;a href=&#34;https://azure.github.io/awesome-azd/&#34;&gt;Awesome AZD templates&lt;/a&gt; site which is essentially a curated gallery of a bunch of templates for deploying to Azure with the new &lt;a href=&#34;https://learn.microsoft.com/en-us/azure/developer/azure-developer-cli/overview?tabs=nodejs&#34;&gt;Azure developer cli&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;There are even several for integrating with ChatGPT like &lt;a href=&#34;https://github.com/Azure-Samples/azure-search-openai-demo-csharp/&#34;&gt;ChatGPT + Enterprise Data with Azure OpenAI and Cognitive Search&lt;/a&gt;.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/azure/awesome-azd/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Git reset --keep</title>
      <link>https://www.brandonpugh.com/til/git/reset-keep/</link>
      <pubDate>Wed, 09 Aug 2023 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/git/reset-keep/</guid>
      <description>&lt;p&gt;I just learned that &lt;code&gt;git reset&lt;/code&gt; has a &lt;code&gt;--keep&lt;/code&gt; parameter.&lt;/p&gt;
&lt;p&gt;This works the same as &lt;code&gt;--hard&lt;/code&gt; except that it won&amp;rsquo;t discard any uncommitted changes.
It&amp;rsquo;s meant to be used when we want to remove some of the last commits in the current branch but if there could be conflicts between the changes in the commits we want to remove and our uncommitted changes, then the reset is blocked.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;d been using &lt;code&gt;git reset --hard&lt;/code&gt; and just double checking I didn&amp;rsquo;t have anything uncommitted but I&amp;rsquo;ll be defaulting to &lt;code&gt;--keep&lt;/code&gt; except if I&amp;rsquo;m intentionally trying to clear out my changes.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/git/reset-keep/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Comment styles in React</title>
      <link>https://www.brandonpugh.com/til/react/single-line-comments/</link>
      <pubDate>Tue, 08 Aug 2023 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/react/single-line-comments/</guid>
      <description>&lt;p&gt;I recently learned that there are actually several ways to add &lt;a href=&#34;https://dmitripavlutin.com/react-comments/&#34;&gt;comments in JSX in React&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I had known about the &lt;code&gt;{/* comment */}&lt;/code&gt; syntax but didn&amp;rsquo;t realize you could use &lt;code&gt;//&lt;/code&gt; &lt;em&gt;within&lt;/em&gt; a jsx element:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-jsx&#34; data-lang=&#34;jsx&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kd&#34;&gt;function&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;MyComponent&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;k&#34;&gt;return&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;div&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;p&#34;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;Hello&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;na&#34;&gt;message&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;Hello, World!&amp;#34;&lt;/span&gt; &lt;span class=&#34;err&#34;&gt;//&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;message&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;prop&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;requires&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;string&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      &lt;span class=&#34;p&#34;&gt;/&amp;gt;&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;div&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/react/single-line-comments/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Git pickaxe</title>
      <link>https://www.brandonpugh.com/til/git/git-pickaxe/</link>
      <pubDate>Mon, 07 Aug 2023 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/git/git-pickaxe/</guid>
      <description>&lt;p&gt;You can search through git history not only by the text of a commit message but by the &lt;em&gt;contents of the diff&lt;/em&gt; of commits.
This is commonly referred to as the &lt;a href=&#34;http://www.philandstuff.com/2014/02/09/git-pickaxe.html&#34;&gt;git pickaxe&lt;/a&gt; and you invoke it with the &lt;code&gt;-S&lt;/code&gt; parameter to &lt;code&gt;git log&lt;/code&gt; i.e. &lt;code&gt;git log -S &#39;public void SomeMethod&lt;/code&gt; and you&amp;rsquo;ll get every commit that touched that method signature or even one that &lt;em&gt;deleted&lt;/em&gt; it.&lt;/p&gt;
&lt;p&gt;Some git clients will expose this as an option in a search field but if that fails the git cli lets you include additional filters like author or file path or even use regex with the &lt;code&gt;--pickaxe-regex&lt;/code&gt; switch.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;http://www.philandstuff.com/2014/02/09/git-pickaxe.html&#34;&gt;See an example&lt;/a&gt;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/git/git-pickaxe/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Bram Moolenaar has passed</title>
      <link>https://www.brandonpugh.com/til/vim/vim-boss-bram/</link>
      <pubDate>Sat, 05 Aug 2023 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/vim/vim-boss-bram/</guid>
      <description>&lt;p&gt;I just found out &lt;a href=&#34;https://news.ycombinator.com/item?id=37011324&#34;&gt;about the passing&lt;/a&gt; of Bram Moolenaar, the core maintainer of Vim for the last 30 years 😞&lt;/p&gt;
&lt;p&gt;I like what a commenter posted:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Vim has soul. It is that chisel you inherited from your grandpa that you keep using. It fits well in your grip and is comfortable, even though it lacks the soft rubber that the new ones in the store have. It&amp;rsquo;s a tool with its own history.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Vim was the first real editor I used. I learned it on the CS department shared Unix server by following the instructions on a paper handout our TA gave us&amp;hellip; and ever since I haven&amp;rsquo;t been able to type in anything without &lt;code&gt;hjkl&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://neovim.io/news/2023/08&#34;&gt;Vim Boss&lt;/a&gt;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/vim/vim-boss-bram/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Multi-line string in YAML</title>
      <link>https://www.brandonpugh.com/til/yaml/multiline-strings/</link>
      <pubDate>Fri, 04 Aug 2023 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/yaml/multiline-strings/</guid>
      <description>&lt;p&gt;It turns out there are actually several different ways to handle multiline strings in YAML.
I had noticed varying forms of the syntax but didn&amp;rsquo;t realize they process the strings differently.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://yaml-multiline.info/&#34;&gt;YAML multiline strings&lt;/a&gt; is a handy site with interactive examples of the different forms.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/yaml/multiline-strings/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Paste a URL as a markdown link</title>
      <link>https://www.brandonpugh.com/til/vscode/paste-markdown-url/</link>
      <pubDate>Thu, 03 Aug 2023 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/vscode/paste-markdown-url/</guid>
      <description>&lt;p&gt;Today I learned that the latest version of VS code added a smart option to detect when you&amp;rsquo;re pasting a URL and automatically paste it as a markdown link in markdown files.&lt;/p&gt;
&lt;p&gt;You can enable it by setting the &lt;code&gt;markdown.editor.pasteUrlAsFormattedLink&lt;/code&gt; setting to &lt;code&gt;smart&lt;/code&gt; or &lt;code&gt;always&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;paste url screenshot&#34; loading=&#34;lazy&#34; src=&#34;./url-paste-vscode.gif&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://code.visualstudio.com/updates/v1_81#_markdown-paste-urls-as-formatted-links&#34;&gt;See the release notes.&lt;/a&gt;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/vscode/paste-markdown-url/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>The C4 model for visualizing software architecture</title>
      <link>https://www.brandonpugh.com/til/documentation/c4-model/</link>
      <pubDate>Wed, 02 Aug 2023 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/documentation/c4-model/</guid>
      <description>&lt;p&gt;Today I learned about the &lt;a href=&#34;https://c4model.com/&#34;&gt;C4 model&lt;/a&gt; for visualizing software architecture.
It looks like a nice framework for thinking hierarchically about the architecture of a system and how best to go about conveying it visually.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/documentation/c4-model/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Nominal types in Typescript</title>
      <link>https://www.brandonpugh.com/til/typescript/nominal-types/</link>
      <pubDate>Tue, 01 Aug 2023 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/typescript/nominal-types/</guid>
      <description>&lt;p&gt;Today I learned about a pattern in Typescript called &amp;ldquo;Branded Types&amp;rdquo; which lets you create &amp;ldquo;nominal&amp;rdquo; types.&lt;/p&gt;
&lt;p&gt;Typescript&amp;rsquo;s type system is structural which is incredibly flexible and powerful when working with javascript patterns, but occasionally you want to add some extra strictness where even if the shape of the data is the same, you&amp;rsquo;ll get a type error if the &lt;em&gt;name&lt;/em&gt; of the types don&amp;rsquo;t match (like in C# which is a &lt;em&gt;nominal&lt;/em&gt; type system).&lt;/p&gt;
&lt;p&gt;A simple example looks like this:&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;branded type example code&#34; loading=&#34;lazy&#34; src=&#34;./branded-type-example.png&#34;&gt;&lt;/p&gt;
&lt;p&gt;Read more here: &lt;a href=&#34;https://egghead.io/blog/using-branded-types-in-typescript&#34;&gt;https://egghead.io/blog/using-branded-types-in-typescript&lt;/a&gt;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/typescript/nominal-types/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>You can save window layouts in Visual Studio</title>
      <link>https://www.brandonpugh.com/til/visual-studio/save-window-layout/</link>
      <pubDate>Mon, 31 Jul 2023 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/visual-studio/save-window-layout/</guid>
      <description>&lt;p&gt;If you go to &lt;code&gt;Window &amp;gt; Save Window Layout&lt;/code&gt;, it&amp;rsquo;ll &lt;a href=&#34;https://learn.microsoft.com/en-us/visualstudio/ide/customizing-window-layouts-in-visual-studio?view=vs-2022#create-and-save-custom-layouts&#34;&gt;save your current window layout&lt;/a&gt; in Visual Studio.
For example, when I have to go from my monitor setup to just my laptop, I tend to set the solution explorer to auto-hide and make the Test Explorer smaller.&lt;/p&gt;
&lt;p&gt;Now I can do it with just a keyboard shortcut!&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/visual-studio/save-window-layout/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>You can easily wrap text with HTML tags</title>
      <link>https://www.brandonpugh.com/til/vscode/wrap-text-html/</link>
      <pubDate>Thu, 27 Jul 2023 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/vscode/wrap-text-html/</guid>
      <description>&lt;p&gt;Using the builtin &lt;a href=&#34;https://code.visualstudio.com/docs/editor/emmet&#34;&gt;Emmet&lt;/a&gt; functionality, you select any arbitrary text or HTML and wrap it with new markup by executing the command &lt;code&gt;Emmet: Wrap with Abbreviation&lt;/code&gt; and typing an Emmet abbreviation.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m going to be using this all the time now!&lt;/p&gt;
&lt;p&gt;It even understands JSX so it&amp;rsquo;ll output &lt;code&gt;className&lt;/code&gt; if you specify a css class.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/vscode/wrap-text-html/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Azure Data Studio can display nicely formatted JSON data</title>
      <link>https://www.brandonpugh.com/til/azure-data-studio/json-column/</link>
      <pubDate>Wed, 26 Jul 2023 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/azure-data-studio/json-column/</guid>
      <description>&lt;p&gt;&lt;em&gt;Update: Microsoft is &lt;a href=&#34;https://learn.microsoft.com/en-us/azure-data-studio/whats-happening-azure-data-studio?tabs=dev&#34;&gt;retiring Azure Data Studio&lt;/a&gt; but this feature is also available in the &lt;a href=&#34;https://marketplace.visualstudio.com/items?itemName=ms-mssql.mssql&#34;&gt;MSSQL extension for VS Code&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;If you click on a cell with json data in the results grid in &lt;a href=&#34;https://learn.microsoft.com/en-us/sql/azure-data-studio/what-is-azure-data-studio?view=sql-server-ver16&#34;&gt;Azure Data Studio&lt;/a&gt;, then it will automatically open a new tab with the json nicely formatted and syntax highlighted.
Very handy for quickly checking the data stored in some rows with just a quick &lt;code&gt;select *&lt;/code&gt;.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/azure-data-studio/json-column/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>A hidden button in an HTML form can be submitted</title>
      <link>https://www.brandonpugh.com/til/html/hidden-button-still-submits/</link>
      <pubDate>Tue, 25 Jul 2023 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/html/hidden-button-still-submits/</guid>
      <description>&lt;p&gt;Even if a button is hidden with &lt;code&gt;display: none&lt;/code&gt;, if it has a type of &lt;code&gt;submit&lt;/code&gt; then it will still be activated if it&amp;rsquo;s the first button in a form and a user hits enter in a form field.&lt;/p&gt;
&lt;p&gt;So it&amp;rsquo;s a good reason to always explicitly specify the type of a button since &lt;code&gt;submit&lt;/code&gt; is the default but most of the time you want &lt;code&gt;type=&amp;quot;button&amp;quot;&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;FYI there&amp;rsquo;s an &lt;a href=&#34;https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/button-has-type.md&#34;&gt;eslint rule&lt;/a&gt; for this for react.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/html/hidden-button-still-submits/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>lazydocker</title>
      <link>https://www.brandonpugh.com/til/containers/lazydocker/</link>
      <pubDate>Mon, 24 Jul 2023 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/containers/lazydocker/</guid>
      <description>&lt;p&gt;Today I learned about a cool terminal UI tool for managing containers called &lt;a href=&#34;https://github.com/jesseduffield/lazydocker&#34;&gt;lazydocker&lt;/a&gt;.
I&amp;rsquo;m not really working with Docker on my current project but I&amp;rsquo;m bookmarking it for later.&lt;/p&gt;
&lt;p&gt;If you&amp;rsquo;re a fan of &lt;a href=&#34;https://github.com/jesseduffield/lazygit&#34;&gt;lazygit&lt;/a&gt;, lazydocker is from the same author.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/containers/lazydocker/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>VS code can show the required HTML structure for a CSS selector</title>
      <link>https://www.brandonpugh.com/til/vscode/hover-css-selector/</link>
      <pubDate>Fri, 21 Jul 2023 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/vscode/hover-css-selector/</guid>
      <description>&lt;p&gt;If you hover over a CSS selector or property, &lt;a href=&#34;https://code.visualstudio.com/docs/languages/css&#34;&gt;VS Code&lt;/a&gt; will provide an HTML snippet that&amp;rsquo;s matched by the CSS rule, and it will also show the specificity.&lt;/p&gt;
&lt;p&gt;For example, this very specific rule that&amp;rsquo;s similar to one I came across recently:&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;screenshot of hovering in css&#34; loading=&#34;lazy&#34; src=&#34;./hover-css-selector.png&#34;&gt;&lt;/p&gt;
&lt;p&gt;I also had to look up the &lt;code&gt;~&lt;/code&gt; which is the &lt;a href=&#34;https://developer.mozilla.org/en-US/docs/Web/CSS/General_sibling_combinator&#34;&gt;General sibling combinator&lt;/a&gt;.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/vscode/hover-css-selector/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Sequence Diagrams</title>
      <link>https://www.brandonpugh.com/til/documentation/sequence-diagrams/</link>
      <pubDate>Thu, 20 Jul 2023 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/documentation/sequence-diagrams/</guid>
      <description>&lt;p&gt;I learned how to correctly &lt;a href=&#34;https://www.lucidchart.com/pages/uml-sequence-diagram&#34;&gt;read sequence diagrams&lt;/a&gt;.
I came across a recent post that suggests &amp;ldquo;&lt;a href=&#34;https://www.mermaidchart.com/blog/posts/sequence-diagrams-the-good-thing-uml-brought-to-software-development&#34;&gt;Sequence diagrams are the only good thing UML brought to software development&lt;/a&gt;&amp;rdquo;.
I&amp;rsquo;d never thought they were that useful but it turns out that was because I&amp;rsquo;d been misreading them.&lt;/p&gt;
&lt;p&gt;There&amp;rsquo;s probably been a few instances over the years where I&amp;rsquo;ve made a flowchart where a sequence diagram would have been better.
For example, I tend to add a high-level overview of how a request moves through our application especially since &lt;a href=&#34;https://mermaid.js.org/&#34;&gt;Mermaid.js&lt;/a&gt; makes it really easy to add to markdown documentation (&lt;a href=&#34;https://github.blog/2022-02-14-include-diagrams-markdown-files-mermaid/&#34;&gt;Github and Azure DevOps&lt;/a&gt; will both render them).&lt;/p&gt;
&lt;p&gt;Here&amp;rsquo;s a quick example of a typical &lt;a href=&#34;https://github.com/jbogard/ContosoUniversityDotNetCore-Pages&#34;&gt;vertical slice architecture&lt;/a&gt; we would use at Headspring.
Adding this code block to a markdown file will render a sequence diagram using Mermaid:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;  sequenceDiagram
    UI-&amp;gt;&amp;gt;api: http request
    participant api as API controller
    Note over UI,api: This gets bound to a viewModel &amp;lt;br/&amp;gt;(*[Query|Command].cs)
    participant mediatr as Mediatr handler
    api-&amp;gt;&amp;gt;mediatr: Mediatr request
    mediatr-&amp;gt;&amp;gt;DB: Entity framework query
    DB--&amp;gt;&amp;gt;mediatr: DB records
    Note over mediatr: Business logic/validation
    mediatr--&amp;gt;&amp;gt;api: Response data
    Note over api,mediatr: viewModel (*[Response|Command].cs)
    api--&amp;gt;&amp;gt;UI: http response
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Rendered on Github:&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;sequence diagram as rendered on github&#34; loading=&#34;lazy&#34; src=&#34;sequence-diagram.png&#34;&gt;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/documentation/sequence-diagrams/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Press `ctrl&#43;enter` to submit a comment on Azure DevOps</title>
      <link>https://www.brandonpugh.com/til/azure-devops/submit-comment-hotkey/</link>
      <pubDate>Wed, 19 Jul 2023 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/azure-devops/submit-comment-hotkey/</guid>
      <description>&lt;p&gt;Pressing &lt;code&gt;ctrl+enter&lt;/code&gt; in a comment field on Azure DevOps will submit the comment!
For some reason, this isn&amp;rsquo;t listed on their &lt;a href=&#34;https://learn.microsoft.com/en-us/azure/devops/project/navigation/keyboard-shortcuts?view=azure-devops&#34;&gt;keyboard shortcuts page&lt;/a&gt; but it&amp;rsquo;s so much nicer than using the mouse or pressing &lt;code&gt;tab&lt;/code&gt; four times.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/azure-devops/submit-comment-hotkey/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Git Extensions git client</title>
      <link>https://www.brandonpugh.com/til/git/git-extensions/</link>
      <pubDate>Tue, 18 Jul 2023 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/git/git-extensions/</guid>
      <description>&lt;p&gt;The &lt;a href=&#34;https://gitextensions.github.io/&#34;&gt;Git Extensions&lt;/a&gt; git client is actually pretty powerful and has a lot more features than I thought.
I&amp;rsquo;d seen others using it before but never looked into it until I saw a StackOverflow answer suggesting to use Git Extensions to view the git reflog&amp;hellip; a feature I&amp;rsquo;ve only ever seen in &lt;a href=&#34;https://www.syntevo.com/smartgit/&#34;&gt;Smartgit&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Some nice features I noticed while playing with it for a bit:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;View commits from the reflog in the log view (makes it really easy to recover commits)&lt;/li&gt;
&lt;li&gt;Option to view &lt;a href=&#34;https://www.davidchudzicki.com/posts/first-parent/&#34;&gt;First Parent&lt;/a&gt; only in the log view&lt;/li&gt;
&lt;li&gt;Stage individual lines&lt;/li&gt;
&lt;li&gt;Option to launch external editor for commit message&lt;/li&gt;
&lt;li&gt;The commit message window can autocomplete file names&lt;/li&gt;
&lt;li&gt;Show/Filter any number of branches in the log view&lt;/li&gt;
&lt;li&gt;Windows file explorer integration&lt;/li&gt;
&lt;li&gt;Completely free and open-source and cross-platform&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I think I still prefer &lt;a href=&#34;https://www.syntevo.com/smartgit/&#34;&gt;Smartgit&lt;/a&gt; over &lt;a href=&#34;https://gitextensions.github.io/&#34;&gt;Git Extensions&lt;/a&gt; but it&amp;rsquo;s tough to recommend Smartgit since it requires a license for Commercial use so I&amp;rsquo;m always keeping an eye out for good free options to recommend to others and now Git Extensions is my new recommendation (much better than SourceTree).&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/git/git-extensions/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Strong typing with JSDoc and Zod</title>
      <link>https://www.brandonpugh.com/til/javascript/types-with-jsdoc/</link>
      <pubDate>Thu, 13 Jul 2023 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/javascript/types-with-jsdoc/</guid>
      <description>&lt;p&gt;You can get pretty good type checking in Javascript with just JSDoc comments and an editor like VS code or Visual Studio.
You&amp;rsquo;ll get most of the same intellisense and warnings in your editor as you would with Typescript.&lt;/p&gt;
&lt;p&gt;Combine this with a library like &lt;a href=&#34;https://zod.dev/&#34;&gt;Zod&lt;/a&gt; which can infer validation schemas from your types and you&amp;rsquo;ll have runtime checking also!&lt;/p&gt;
&lt;p&gt;See:
&lt;a href=&#34;https://blog.jim-nielsen.com/2023/types-in-jsdoc-with-zod/&#34;&gt;https://blog.jim-nielsen.com/2023/types-in-jsdoc-with-zod/&lt;/a&gt;
&lt;a href=&#34;https://www.typescriptlang.org/docs/handbook/jsdoc-supported-types.html&#34;&gt;https://www.typescriptlang.org/docs/handbook/jsdoc-supported-types.html&lt;/a&gt;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/javascript/types-with-jsdoc/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Visual Studio 2022 can stage individual lines in git</title>
      <link>https://www.brandonpugh.com/til/visual-studio/line-staging/</link>
      <pubDate>Wed, 12 Jul 2023 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/visual-studio/line-staging/</guid>
      <description>&lt;p&gt;Visual Studio added support for staging to commit individual chunks of changes (also known as interactive staging).
This essentially lets you commit only parts of the changes you&amp;rsquo;ve made to a file or easily undo those changes.
This is probably my most-used feature in a git gui client.&lt;/p&gt;
&lt;p&gt;One caveat, it took me a minute to figure out how to use it in VS because if you have an external diff tool configured in git then clicking to view the diff in VS will open that tool instead of the VS diff viewer.
But you can also stage lines by clicking on the margin annotations:&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;margin indicators in visual studio&#34; loading=&#34;lazy&#34; src=&#34;https://www.brandonpugh.com/til/visual-studio/vs-line-staging.png&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Bonus TIL&lt;/strong&gt;: I now know exactly what these indicators mean.&lt;/p&gt;
&lt;p&gt;See &lt;a href=&#34;https://learn.microsoft.com/en-us/visualstudio/version-control/git-line-staging?view=vs-2022&#34;&gt;https://learn.microsoft.com/en-us/visualstudio/version-control/git-line-staging?view=vs-2022&lt;/a&gt;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/visual-studio/line-staging/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Use the Chrome devtools recorder to automate UI testing</title>
      <link>https://www.brandonpugh.com/til/devtools/devtools-recorder/</link>
      <pubDate>Tue, 11 Jul 2023 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/devtools/devtools-recorder/</guid>
      <description>&lt;p&gt;Chrome devtools has a pretty decent recorder feature that can record and playback your UI interactions.
It&amp;rsquo;s currently in preview but it&amp;rsquo;s been working well for me so far.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s especially handy if you have to keep repeating the same 5 steps every time you reload the page to test your code.&lt;/p&gt;
&lt;p&gt;It automatically waits for UI elements to load and it&amp;rsquo;s pretty easy to tweak the recorded steps and export as a puppeteer script: &lt;a href=&#34;https://developer.chrome.com/docs/devtools/recorder/&#34;&gt;https://developer.chrome.com/docs/devtools/recorder/&lt;/a&gt;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/devtools/devtools-recorder/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Run a bash script from Powershell</title>
      <link>https://www.brandonpugh.com/til/powershell/run-bash-script/</link>
      <pubDate>Sun, 09 Jul 2023 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/powershell/run-bash-script/</guid>
      <description>&lt;p&gt;You can execute a bash script from Powershell on Windows by typing &lt;code&gt;bash&lt;/code&gt; if you&amp;rsquo;ve enabled WSL.
For example &lt;code&gt;bash ./new-til.sh&lt;/code&gt;. Some caveats though:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Make sure you use &lt;code&gt;/&lt;/code&gt; instead of &lt;code&gt;\&lt;/code&gt; in the file path&lt;/li&gt;
&lt;li&gt;Make sure the bash script was saved with unix line-endings&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You can also make a wrapper script for scripts you regularly execute like &lt;code&gt;new-til.ps1&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-powershell&#34; data-lang=&#34;powershell&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;bash&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;./&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;new-til&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;py&#34;&gt;sh&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$args&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;If you don&amp;rsquo;t or can&amp;rsquo;t enable WSL, you can use &lt;code&gt;sh.exe&lt;/code&gt; that&amp;rsquo;s optionally installed with Git for Windows.
For example &lt;code&gt;sh ./new-til.sh&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;See this &lt;a href=&#34;https://stackoverflow.com/questions/1098786/run-bash-script-from-windows-powershell&#34;&gt;StackOverflow post&lt;/a&gt; for more caveats/solutions.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/powershell/run-bash-script/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Create new files faster</title>
      <link>https://www.brandonpugh.com/til/visual-studio/quick-add/</link>
      <pubDate>Fri, 07 Jul 2023 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/visual-studio/quick-add/</guid>
      <description>&lt;p&gt;You can use &lt;code&gt;ctrl+shift+a&lt;/code&gt; to open the new quick add dialog in VS 2022: &lt;a href=&#34;https://devblogs.microsoft.com/visualstudio/adding-new-files-just-got-a-lot-faster/&#34;&gt;https://devblogs.microsoft.com/visualstudio/adding-new-files-just-got-a-lot-faster/&lt;/a&gt;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/visual-studio/quick-add/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Hide a table in sql server management studio</title>
      <link>https://www.brandonpugh.com/til/sql-server/system-table/</link>
      <pubDate>Thu, 06 Jul 2023 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/sql-server/system-table/</guid>
      <description>&lt;p&gt;Apparently in sql server you can mark any table as a system table using &lt;code&gt;EXEC sys.sp_MS_marksystemobject&lt;/code&gt; and then Management studio will hide it automatically.&lt;/p&gt;
&lt;p&gt;I ran into this because the docs say that Entity Framework 6 stores its code-first migration snapshots in a table called &lt;code&gt;__MigrationHistory&lt;/code&gt; but I couldn&amp;rsquo;t find it because it&amp;rsquo;s &lt;em&gt;hidden&lt;/em&gt; since it&amp;rsquo;s marked as a system table.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/sql-server/system-table/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Use ChatGPT to explain bash scripts</title>
      <link>https://www.brandonpugh.com/til/ai/chatgpt-explains/</link>
      <pubDate>Wed, 05 Jul 2023 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/ai/chatgpt-explains/</guid>
      <description>&lt;p&gt;Today I learned that chatGPT is pretty good at explaining cryptic bash scripts and commands.
I was trying to understand exactly how a git &lt;code&gt;prepare-commit-msg&lt;/code&gt; hook was working so I asked chatGPT to &amp;ldquo;explain the following git hook to me&amp;rdquo; and it did a pretty good job.&lt;/p&gt;
&lt;p&gt;For example, it returned tidbits like:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;[[ $BRANCH_NAME =~ $BRANCH_REGEX ]]&lt;/code&gt;: This conditional statement checks if the branch name matches the BRANCH_REGEX pattern.
If the branch name starts with one or more digits, this condition will be true.
and:
&lt;code&gt;sed -i.bak -e &amp;quot;1s/^#${BASH_REMATCH[1]}: //I&amp;quot; $1&lt;/code&gt;: This line uses the &lt;code&gt;sed&lt;/code&gt; command to replace the branch number (captured by the &lt;code&gt;BRANCH_REGEX&lt;/code&gt; pattern) and a colon at the beginning of the commit message with an empty string. The &lt;code&gt;I&lt;/code&gt; flag makes the replacement case-insensitive. The &lt;code&gt;-i.bak&lt;/code&gt; option creates a backup of the original commit message file with a &lt;code&gt;.bak&lt;/code&gt; extension.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Bonus TIL&lt;/em&gt;: the &lt;code&gt;BASH_REMATCH&lt;/code&gt; variable is automatically populated with the matched string in bash when using the &lt;code&gt;=~&lt;/code&gt; regex operator&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/ai/chatgpt-explains/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Use a table variable to hold a list of values</title>
      <link>https://www.brandonpugh.com/til/sql-server/table-variables/</link>
      <pubDate>Tue, 04 Jul 2023 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/sql-server/table-variables/</guid>
      <description>&lt;p&gt;You can store a &amp;ldquo;list&amp;rdquo; of values in sql with a &lt;code&gt;table&lt;/code&gt; variable.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;DECLARE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;@&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;listOfIDs&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;TABLE&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;id&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;INT&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;INSERT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;INTO&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;@&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;listOfIDs&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;SELECT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;id&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;FROM&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Transactions&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;WHERE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;USER&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;bob&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/sql-server/table-variables/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Stacking context affects z-index</title>
      <link>https://www.brandonpugh.com/til/css/stacking-context/</link>
      <pubDate>Fri, 30 Jun 2023 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/css/stacking-context/</guid>
      <description>&lt;p&gt;In CSS, the stacking context can impact which elements display on top of each in addition to the &lt;code&gt;z-index&lt;/code&gt;. So if you end up in a situation where cranking up the &lt;code&gt;z-index&lt;/code&gt; doesn&amp;rsquo;t seem to work, the stacking context is likely the issue.
I technically learned this a while ago but completely forgot about it until I was just reminded about it by a coworker dealing with this issue.
Josh Comeau explains it well in his post on &lt;a href=&#34;https://www.joshwcomeau.com/css/stacking-contexts/&#34;&gt;stacking contexts&lt;/a&gt;.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/css/stacking-context/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>GetUnderlyingType</title>
      <link>https://www.brandonpugh.com/til/csharp/getunderlyingtype/</link>
      <pubDate>Thu, 29 Jun 2023 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/csharp/getunderlyingtype/</guid>
      <description>&lt;p&gt;In c# &lt;a href=&#34;https://learn.microsoft.com/en-us/dotnet/api/system.nullable.getunderlyingtype?view=net-9.0&#34;&gt;&lt;code&gt;Nullable.GetUnderlyingType(type)&lt;/code&gt;&lt;/a&gt;will return &lt;code&gt;null&lt;/code&gt; if the type is &lt;em&gt;not&lt;/em&gt; &lt;code&gt;Nullable&amp;lt;T&amp;gt;&lt;/code&gt;.
For some reason this is not what I expected.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/csharp/getunderlyingtype/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Use `core.hooksPath` for shared hooks</title>
      <link>https://www.brandonpugh.com/til/git/config-hookspath/</link>
      <pubDate>Wed, 28 Jun 2023 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/til/git/config-hookspath/</guid>
      <description>&lt;p&gt;Sometime around 2019, git added the &lt;a href=&#34;https://git-scm.com/docs/git-config#Documentation/git-config.txt-corehooksPath&#34;&gt;&lt;code&gt;core.hooksPath&lt;/code&gt;&lt;/a&gt; config setting to change the directory where git will look for &lt;a href=&#34;https://git-scm.com/docs/githooks&#34;&gt;hooks&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;This is handy for commiting shared hooks into a repo so you no longer need workarounds like a script to copy them into the default &lt;code&gt;$GIT_DIR/hooks&lt;/code&gt; folder or creating symlinks or relying on tools like &lt;a href=&#34;https://typicode.github.io/husky/&#34;&gt;Husky&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://dev.to/anibalardid/how-to-check-commit-message-and-branch-name-with-git-hooks-without-any-new-installation-n34&#34;&gt;This post&lt;/a&gt; is a good example of how you can use it.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/til/git/config-hookspath/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Blazor Best Practices Borrowed From React</title>
      <link>https://www.brandonpugh.com/blog/blazor-best-practices/</link>
      <pubDate>Mon, 19 Dec 2022 10:54:24 +0200</pubDate>
      <guid>https://www.brandonpugh.com/blog/blazor-best-practices/</guid>
      <description>&lt;p&gt;Blazor took a lot of design decisions from React and other frontend frameworks and as a stateful component-based UI framework there is quite a bit of experience that can be transferred from one to the other.&lt;/p&gt;
&lt;p&gt;I gave this talk earlier this year at KCDC and then last week I presented an updated version as a Jetbrains webinar. Special thanks to &lt;a href=&#34;https://khalidabuhakmeh.com/&#34;&gt;Khalid&lt;/a&gt; for inviting me on and being an excellent host!&lt;/p&gt;
&lt;p&gt;I hope to write up the content in a more in depth post sometime soon, but in the mean time you can watch the recording on &lt;a href=&#34;https://www.youtube.com/watch?v=q7qgSzAALLg&#34;&gt;Youtube&lt;/a&gt; and view the slides at &lt;a href=&#34;https://www.brandonpugh.com/blazor-talk/#/&#34;&gt;brandonpugh.com/blazor-talk&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Some of the points I cover:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;State management&lt;/li&gt;
&lt;li&gt;Reusable components&lt;/li&gt;
&lt;li&gt;Accessibility&lt;/li&gt;
&lt;li&gt;Testing&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;div style=&#34;position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;&#34;&gt;
      &lt;iframe allow=&#34;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen&#34; loading=&#34;eager&#34; referrerpolicy=&#34;strict-origin-when-cross-origin&#34; src=&#34;https://www.youtube.com/embed/q7qgSzAALLg?autoplay=0&amp;amp;controls=1&amp;amp;end=0&amp;amp;loop=0&amp;amp;mute=0&amp;amp;start=0&#34; style=&#34;position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;&#34; title=&#34;YouTube video&#34;&gt;&lt;/iframe&gt;
    &lt;/div&gt;

&lt;a href=&#34;https://www.youtube.com/watch?v=q7qgSzAALLg&#34;&gt;Blazor Best Practices Borrowed from React&lt;/a&gt;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/blog/blazor-best-practices/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>An Assortment of Productivity Tips</title>
      <link>https://www.brandonpugh.com/blog/an-assortment-of-productivity-tips/</link>
      <pubDate>Sat, 19 Mar 2022 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/blog/an-assortment-of-productivity-tips/</guid>
      <description>&lt;p&gt;I recently gave a lunch-n-learn at work on productivity.
This is brief a overview of the points from the talk and little tips for saving time or being more efficient while doing knowledge work.&lt;/p&gt;
&lt;h2 id=&#34;organization-vs-execution&#34;&gt;Organization vs Execution&lt;/h2&gt;
&lt;p&gt;To me most productivity advice either falls under &amp;ldquo;organization&amp;rdquo; or &amp;ldquo;execution&amp;rdquo;. Organization being advice like &amp;ldquo;create task lists&amp;rdquo;, &amp;ldquo;process your inboxes&amp;rdquo;, etc. I could write a whole separate post just this category. Whereas execution is all about finding the time to actually do the tasks that are on your plate.&lt;/p&gt;
&lt;h3 id=&#34;attention-and-focus&#34;&gt;Attention and Focus&lt;/h3&gt;
&lt;p&gt;I&amp;rsquo;ve noticed that a lot of the advice on the execution side is really boils down to managing your attention and focus.
And what&amp;rsquo;s fascinating is that a lot of the most popular advice and techniques just deal with focus and different levels of abstraction.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Mindfullness Meditation&lt;/li&gt;
&lt;li&gt;Pomodoro Technique&lt;/li&gt;
&lt;li&gt;Time-block planning / scheduling&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;so-many-techniques&#34;&gt;So many techniques&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://todoist.com/productivity-methods&#34;&gt;Todoist Productivity method quiz&lt;/a&gt; - to explore various productivity methods that might fit your style.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In my post on &lt;a href=&#34;https://www.brandonpugh.com/blog/2019/08/getting-things-done-as-team-lead/&#34;&gt;how I get things done as a tech lead&lt;/a&gt;, I talk about the methods I use. It&amp;rsquo;s mostly still the same today though use &lt;a href=&#34;https://www.calnewport.com/blog/2013/12/21/deep-habits-the-importance-of-planning-every-minute-of-your-work-day/&#34;&gt;time block planning&lt;/a&gt; a lot more.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Don&amp;rsquo;t live life by default - &lt;a href=&#34;https://www.hanselman.com/blog/relationship-hacks-mindfulness-dont-live-your-life-by-default&#34;&gt;Scott Hanselman&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id=&#34;avoid-distractions&#34;&gt;Avoid Distractions&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Use focus mode on Android or iOS&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://slack.com/help/articles/214908388-Pause-notifications-with-Do-Not-Disturb&#34;&gt;Slack dnd&lt;/a&gt; (You can type &lt;code&gt;/dnd&lt;/code&gt; in any chat to start)&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://nohello.net/&#34;&gt;no hello&lt;/a&gt; - to respect colleagues attention&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://chrome.google.com/webstore/detail/youtube-rabbit-hole/nlddakjbmpidooplakalfoogdincflfh&#34;&gt;YouTube Rabbit Hole&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;always-be-learning&#34;&gt;Always be Learning&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Newsletters for different technologies and communities
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://cooperpress.com/publications/&#34;&gt;https://cooperpress.com/publications/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://blog.cwa.me.uk/&#34;&gt;The Morning Brew&lt;/a&gt; - for .Net&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://www.alvinashcraft.com/&#34;&gt;The Morning Dew&lt;/a&gt; - for .Net and web if you like drinking from the firehose&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://getpocket.com&#34;&gt;Pocket&lt;/a&gt; - for saving articles to read later&lt;/li&gt;
&lt;li&gt;If you have lots of internal presentations or meeting recordings to watch, import them into a podcast app
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://www.pocketcasts.com/&#34;&gt;PocketCasts&lt;/a&gt; - my favorite podcast app&lt;/li&gt;
&lt;li&gt;change playback speed, remember play position, listen to audio while folding laundry&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://kill-the-newsletter.com/&#34;&gt;https://kill-the-newsletter.com/&lt;/a&gt; - to consume newsletters as an rss feed&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://www.youtube.com/premium&#34;&gt;Youtube Premium&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;totally worth it IMHO&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;No ads!&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Offline downloads and background listening on mobile&lt;/li&gt;
&lt;li&gt;Creators get paid for your views&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://www.inoreader.com/&#34;&gt;Inoreader&lt;/a&gt; - my favorite rss reader&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;avoid-the-mouse-and-save-your-keystrokes&#34;&gt;Avoid the mouse and save your keystrokes&lt;/h2&gt;
&lt;p&gt;You only have so much time and &lt;a href=&#34;https://keysleft.com/&#34;&gt;keystrokes left&lt;/a&gt; so in general, &lt;a href=&#34;https://www.asianefficiency.com/productivity/5-ways-to-automate-technology-and-save-time/&#34;&gt;automate as much as possible.&lt;/a&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Pressing &lt;code&gt;Ctrl + Backspace&lt;/code&gt; will delete the last word you typed&lt;/li&gt;
&lt;li&gt;speed up informational videos (&lt;code&gt;&amp;lt; &amp;gt;&lt;/code&gt; youtube keyboard shortcuts)&lt;/li&gt;
&lt;li&gt;use markdown-like shortcuts in google docs, confluence, slack, etc.&lt;/li&gt;
&lt;li&gt;global hotkeys
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;win+.&lt;/code&gt; windows emoji picker&lt;/li&gt;
&lt;li&gt;&lt;code&gt;alt+a&lt;/code&gt; mute in zoom (change setting to make this global)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;alt+tab&lt;/code&gt; or &lt;code&gt;command+tab&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;alt+f4&lt;/code&gt; to close a window&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&#34;remap-keys&#34;&gt;Remap keys&lt;/h4&gt;
&lt;p&gt;If you find a keyboard key or hotkey that you use frequently but it&amp;rsquo;s awkward to type then you should use a utility to remap it.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://www.autohotkey.com/&#34;&gt;autohotkey&lt;/a&gt; or &lt;a href=&#34;https://docs.microsoft.com/en-us/windows/powertoys/&#34;&gt;Microsoft powertoys&lt;/a&gt; (windows)&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://karabiner-elements.pqrs.org/&#34;&gt;Karabiner-elements&lt;/a&gt; (mac)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Some I use:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;remap &lt;code&gt;capslock&lt;/code&gt; key
&lt;ul&gt;
&lt;li&gt;a lot of people map it to &lt;code&gt;ctrl&lt;/code&gt; but I personally do &lt;code&gt;esc&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;you can map &lt;code&gt;shift+capslock&lt;/code&gt; to capslock if you still want that functionality&lt;/li&gt;
&lt;li&gt;have a look at &lt;a href=&#34;https://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/&#34;&gt;A useful Caps Lock key&lt;/a&gt; if you&amp;rsquo;re on mac&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;remap &lt;code&gt;alt+f4&lt;/code&gt; to &lt;code&gt;capslock+q&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;capslock+n&lt;/code&gt; is backspace since I was getting RSI from reaching for backspace button so frequently&lt;/li&gt;
&lt;li&gt;&lt;code&gt;capslock&lt;/code&gt; + &lt;code&gt;h&lt;/code&gt;,&lt;code&gt;j&lt;/code&gt;,&lt;code&gt;k&lt;/code&gt;,or&lt;code&gt;l&lt;/code&gt; remapped to &lt;code&gt;←&lt;/code&gt;,&lt;code&gt;↓&lt;/code&gt;,&lt;code&gt;↑&lt;/code&gt;,&lt;code&gt;→&lt;/code&gt; to mimic simple vim key bindings &lt;!-- found these unicode arrows here: https://unicode.org/charts/nameslist/n_2190.html --&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;capslock+{1|2}&lt;/code&gt; for switching between &lt;a href=&#34;https://www.howtogeek.com/197625/how-to-use-virtual-desktops-in-windows-10&#34;&gt;virtual desktops&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In his &lt;a href=&#34;https://www.hillelwayne.com/post/ahk/&#34;&gt;post on autohotkey&lt;/a&gt;, Hillel Wayne talks about fast window switching by creating hotkeys to pull up specific apps. These are some of the ones I have:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;win+z&lt;/code&gt; - zoom&lt;/li&gt;
&lt;li&gt;&lt;code&gt;win+w&lt;/code&gt; - browser windows&lt;/li&gt;
&lt;li&gt;&lt;code&gt;win+c&lt;/code&gt; - code editor&lt;/li&gt;
&lt;li&gt;&lt;code&gt;win+backtick&lt;/code&gt; - terminal&lt;/li&gt;
&lt;li&gt;&lt;code&gt;win+s&lt;/code&gt; - slack&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;On windows you can achieve something similar by pinning apps to the taskbar and using the &lt;a href=&#34;https://www.howtogeek.com/276982/the-most-useful-keyboard-shortcuts-for-the-windows-taskbar/&#34;&gt;built-in taskbar hotkeys.&lt;/a&gt;. I think you can do this with &lt;a href=&#34;https://www.alfredapp.com/&#34;&gt;Alfred&lt;/a&gt; on mac.&lt;/p&gt;
&lt;h3 id=&#34;text-expansion&#34;&gt;Text expansion&lt;/h3&gt;
&lt;p&gt;I&amp;rsquo;ve only been using a text expansion app the last couple of years but I regret not starting sooner because it&amp;rsquo;s a game changer!
There are tons of potential ways it can save you time but here are some of the ones I use the most:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;personal info like email addresses or phone numbers&lt;/li&gt;
&lt;li&gt;things you type all the time like client/company/project names&lt;/li&gt;
&lt;li&gt;hard to type characters or words&lt;/li&gt;
&lt;li&gt;text utilities like typing out the current date&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;There are lots free/paid text expanders but I like &lt;a href=&#34;https://espanso.org/&#34;&gt;Espanso&lt;/a&gt; because it&amp;rsquo;s cross-platform and open source and you configure it entirely with a yaml config file. I could probably write an entire post on my espanso setup.
But there are lots of alternatives:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;macOS has &lt;a href=&#34;https://support.apple.com/guide/mac-help/replace-text-punctuation-documents-mac-mh35735/mac&#34;&gt;built-in basic text replacement&lt;/a&gt; functionality&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://textexpander.com/&#34;&gt;TextExpander&lt;/a&gt; is by far the most popular solution&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://www.phraseexpress.com/&#34;&gt;PhraseExpress&lt;/a&gt; is free for personal use&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You can also use a key remapper like autohotkey for text expansion with a bit more manual effort.&lt;/p&gt;
&lt;h3 id=&#34;misc&#34;&gt;Misc&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;enable clipboard history (native in Windows) &lt;code&gt;win+v&lt;/code&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://sabrogden.github.io/Ditto/&#34;&gt;Ditto&lt;/a&gt; for more features&lt;/li&gt;
&lt;li&gt;Alfred on mac&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://support.google.com/a/users/answer/9310144?hl=en&#34;&gt;chrome profiles&lt;/a&gt; for different personalities&lt;/li&gt;
&lt;li&gt;setup &lt;a href=&#34;https://zapier.com/blog/add-search-engine-to-chrome/&#34;&gt;custom searches in Chrome&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Microsoft powertoys adds some very handy functionality
&lt;ul&gt;
&lt;li&gt;always on top&lt;/li&gt;
&lt;li&gt;always awake&lt;/li&gt;
&lt;li&gt;global mute (&lt;code&gt;win+shift+a&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;command palette (&lt;a href=&#34;https://www.alfredapp.com/&#34;&gt;alfred&lt;/a&gt; on mac)&lt;/li&gt;
&lt;li&gt;key remapper&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;for-developers&#34;&gt;For developers&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;log files with &lt;code&gt;.log&lt;/code&gt; extension will have nice syntax highlighting when opened in vscode&lt;/li&gt;
&lt;li&gt;vscode terminal will open file paths in editor&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://www.hanselman.com/blog/how-to-create-a-file-with-a-dot-prefix-in-windows-explorer&#34;&gt;learn how to create a file with a . dot prefix in Windows Explorer&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;make use of shell/git and aliases&lt;/li&gt;
&lt;li&gt;powershell tools
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/dahlbyk/posh-git&#34;&gt;posh-git&lt;/a&gt; - nice git integration&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/vors/ZLocation&#34;&gt;z-location&lt;/a&gt; - jump to frequently used directories&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/kelleyma49/PSFzf&#34;&gt;PSFzf&lt;/a&gt; - powershell wrapper around fzf (fuzzy file finder)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;powershell-aliases&#34;&gt;Powershell aliases&lt;/h3&gt;
&lt;p&gt;I have a bunch of these just to save me a few keystrokes by not having to type &lt;code&gt;git&lt;/code&gt; in from of my most-used git aliases.
I mostly use powershell these days but most shells have similar capabilities.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-powershell&#34; data-lang=&#34;powershell&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c&#34;&gt;# Git helpers&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kd&#34;&gt;Function&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;st&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;git&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;st&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$args&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kd&#34;&gt;Function&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;stand&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;git&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;standup&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$args&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kd&#34;&gt;Function&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;ci&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;git&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;ci&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$args&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kd&#34;&gt;Function&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;cia&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;git&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;ci&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;-amend&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$args&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kd&#34;&gt;Function&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;rsh&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;git&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;reset&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;-hard&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$args&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kd&#34;&gt;Function&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;p&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;git&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;pr&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$args&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kd&#34;&gt;Function&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;ri&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;git&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;rebase&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;-i&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$args&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c&#34;&gt;# Runners&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kd&#34;&gt;Function&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;nr&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;npm&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;run&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$args&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kd&#34;&gt;Function&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;dn&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;dotnet&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;watch&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$args&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c&#34;&gt;# leverage PSFzf&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kd&#34;&gt;Function&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;fsa&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;Invoke-FuzzyGitStatus&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;%&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;git&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;add&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$_&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;}}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c&#34;&gt;# list and execute psake tasks for a specific project from any directory&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kd&#34;&gt;Function&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;fp&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;Get-PSakeScriptTasks&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;-BuildFile&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;\&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;path&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;\&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;to&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;\&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;project&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;\&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;psakefile&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;py&#34;&gt;ps1&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;Invoke-Fzf&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;%&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;Invoke-PSake&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$_&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;}}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;automate-machine-setup&#34;&gt;Automate machine setup&lt;/h2&gt;
&lt;p&gt;Now that you&amp;rsquo;ve optimized your setup and are in the habit of making tweaks and optimizations as the need arises, you should make sure it&amp;rsquo;s easily repeatable when you have to change machines.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://ninite.com/&#34;&gt;Ninite&lt;/a&gt; quick and easy GUI app for installing some common apps&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://chocolatey.org/&#34;&gt;Chocolatey&lt;/a&gt; or &lt;a href=&#34;https://docs.microsoft.com/en-us/windows/package-manager/winget/&#34;&gt;winget&lt;/a&gt; (windows) or &lt;a href=&#34;https://brew.sh/&#34;&gt;homebrew&lt;/a&gt; (mac)&lt;/li&gt;
&lt;li&gt;Create a &lt;a href=&#34;https://blog.danslimmon.com/2019/07/15/do-nothing-scripting-the-key-to-gradual-automation/&#34;&gt;do nothing script&lt;/a&gt; to document any tasks that can&amp;rsquo;t be automated yet&lt;/li&gt;
&lt;li&gt;sync your config files or scripts &lt;a href=&#34;https://www.atlassian.com/git/tutorials/dotfiles&#34;&gt;with git&lt;/a&gt; or &lt;a href=&#34;https://syncthing.net/&#34;&gt;Syncthing&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/blog/an-assortment-of-productivity-tips/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Git Config Settings I Always Recommend</title>
      <link>https://www.brandonpugh.com/blog/git-config-settings-i-always-recommend/</link>
      <pubDate>Sat, 05 Mar 2022 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/blog/git-config-settings-i-always-recommend/</guid>
      <description>&lt;p&gt;If you&amp;rsquo;ve ever worked on a project with me then I&amp;rsquo;ve probably recommended at least one of these config settings in git.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;git config --global pull.rebase true&lt;/code&gt; - tells git to always pull with rebase instead of merge (the equivalent of &lt;code&gt;pull --rebase&lt;/code&gt;).
This not only saves you having to type the flag every time, but also ensures gui clients will also use rebase when pulling.
&lt;em&gt;&lt;strong&gt;Note:&lt;/strong&gt;&lt;/em&gt; You should only enable this if you&amp;rsquo;re comfortable with rebasing.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;git config --global fetch.prune true&lt;/code&gt; - tells git to automatically run &lt;code&gt;git remote prune&lt;/code&gt; after a &lt;code&gt;fetch&lt;/code&gt;. This will clean up any local objects that no longer exist on the remote like tracking branches that have been deleted from the remote server.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;git config --global rebase.autoStash true&lt;/code&gt; - tells git to automatically stash when you perform a pull and then attempt to unstash them once the rebase is complete. This is almost always my workflow so it&amp;rsquo;s nice to have git do it for me.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;git config --global rebase.autosquash true&lt;/code&gt; - tells git to automatically include the &lt;code&gt;--autosquash&lt;/code&gt; parameter when doing a &lt;code&gt;git rebase --interactive&lt;/code&gt;. You should &lt;a href=&#34;https://thoughtbot.com/blog/autosquashing-git-commits&#34;&gt;read more about autosquashing&lt;/a&gt; commits if you&amp;rsquo;re unfamiliar with it. I use it all the time for fixing up or rewording previous commits.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;newer-settings&#34;&gt;Newer settings&lt;/h2&gt;
&lt;p&gt;If you haven&amp;rsquo;t updated git in a couple years then you should as it&amp;rsquo;s worth it just for these new config options.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;git config --global push.useForceIfIncludes true&lt;/code&gt; (2.30.0) - This setting makes &lt;code&gt;push --force-with-lease&lt;/code&gt; even safer by ensuring the tip of the remote was actually pulled into your local branch at some point. &lt;a href=&#34;https://git-scm.com/docs/git-push#Documentation/git-push.txt---no-force-if-includes&#34;&gt;See the docs&lt;/a&gt; for more info.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;git config --global push.autoSetupRemote true&lt;/code&gt; (2.37.0) - Git will automatically setup an upsteam tracking when you run &lt;code&gt;git push&lt;/code&gt; from a new branch.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;git config --global rebase.updateRefs true&lt;/code&gt; (2.38.0) - the &lt;code&gt;--update-refs&lt;/code&gt; option &lt;a href=&#34;https://andrewlock.net/working-with-stacked-branches-in-git-is-easier-with-update-refs/&#34;&gt;makes working with stacked branches easier&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;personal-preference&#34;&gt;Personal preference&lt;/h2&gt;
&lt;p&gt;You might find these useful depending on your personal workflow.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;git config --global commit.verbose true&lt;/code&gt; - Git will include the diff of the changes at the bottom of the commit message template. I like this because your text editor can then autocomplete variable or function names you want to include in the commit message.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;git config --global rerere.enabled true&lt;/code&gt; - It stands for Reuse Recorded Resolution, and tells Git to remember how you resolved a merge conflict and automatically reapply if it sees it again.&lt;/li&gt;
&lt;/ul&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/blog/git-config-settings-i-always-recommend/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Stuff I like</title>
      <link>https://www.brandonpugh.com/stuff-i-like/</link>
      <pubDate>Sat, 10 Apr 2021 17:23:56 +0000</pubDate>
      <guid>https://www.brandonpugh.com/stuff-i-like/</guid>
      <description>&lt;p&gt;I frequently get asked about the various things that I like so I wanted an easy page to point people to.&lt;/p&gt;
&lt;h2 id=&#34;tech&#34;&gt;Tech&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://mistelkeyboard.com/products/d11cf7a73da49468e2a530b4cf18e76c&#34;&gt;Mistel BAROCCO MD770&lt;/a&gt; split mechanical keyboard.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://www.keychron.com/products/keychron-q11-qmk-custom-mechanical-keyboard?variant=40409509265497&#34;&gt;Keychron Q11&lt;/a&gt; my &lt;em&gt;new&lt;/em&gt; split mechanical keyboard.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://www.amazon.com/dp/B07S395RWD&#34;&gt;Logitech MX Master 3&lt;/a&gt; - My current favorite desktop mouse.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://www.amazon.com/dp/B07GBXMBQF&#34;&gt;Slate Travel Router&lt;/a&gt; - An awesome little travel router with several security features and it runs open-wrt.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://www.amazon.com/dp/B0B7ZNCXKZ&#34;&gt;Jabra Elite 5&lt;/a&gt; - My current wireless earbuds.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://www.hellomaco.com/collections/bestsellers/products/maco-organiser-dock-combo-pack&#34;&gt;MAGO cable organizer&lt;/a&gt; - I&amp;rsquo;ve using these since they were a kickstarter and I haven&amp;rsquo;t found anything as good.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;software&#34;&gt;Software&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://www.syntevo.com/smartgit/&#34;&gt;SmartGit&lt;/a&gt; - My personal favorite cross platform git GUI client that I&amp;rsquo;ve been using for years.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;books&#34;&gt;Books&lt;/h2&gt;
&lt;h3 id=&#34;non-fiction&#34;&gt;Non-fiction&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://www.amazon.com/dp/0131177052&#34;&gt;Working Effectively with Legacy Code&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://www.amazon.com/dp/0321146530&#34;&gt;Test Driven Development: By Example&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://www.amazon.com/dp/B00KWG9M2E&#34;&gt;Getting Things Done&lt;/a&gt; - A productivity classic.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://www.amazon.com/dp/B07D23CFGR&#34;&gt;Atomic Habits&lt;/a&gt; - Actually really helped me develop some habits I still have today.&lt;/li&gt;
&lt;/ul&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/stuff-i-like/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>How I get things done as a tech lead</title>
      <link>https://www.brandonpugh.com/blog/getting-things-done-as-team-lead/</link>
      <pubDate>Sun, 04 Aug 2019 10:54:24 +0200</pubDate>
      <guid>https://www.brandonpugh.com/blog/getting-things-done-as-team-lead/</guid>
      <description>&lt;p&gt;I&amp;rsquo;ve spent the past year as a technical lead for the first time in my career and there have definitely been a lot of lessons learned but in this post I want to focus on personal productivity and time management and the techniques that have helped me in this area.&lt;/p&gt;
&lt;p&gt;As an individual contributor on a dev team, decisions about what you should be working on are mostly made for you. You pick up tasks from the sprint board or tackle tickets as they&amp;rsquo;re assigned to you. Tech leads&amp;rsquo; tasks tend to be much more fluid and it&amp;rsquo;s usually up to you to track them in addition to what the rest of the team is working on. That being said there should still be plenty to take away from this post for non tech leads as well.&lt;/p&gt;
&lt;p&gt;None of these ideas are really original or groundbreaking. This is more of a collection of tips, hacks, and recommendations from various productivity systems I&amp;rsquo;ve read about over the years.&lt;/p&gt;
&lt;h3 id=&#34;write-everything-down&#34;&gt;Write Everything Down&lt;/h3&gt;
&lt;p&gt;Capture everything! The less you try to hold in your head the more you free up your brain to be creative and focus solely on the task at hand. This especially applies to action items. As a lead you&amp;rsquo;re much more likely to be given random tasks at random times&amp;hellip; while walking out of a meeting, in a comment on a JIRA ticket you need to follow up on, or during a quick call with a product owner.&lt;/p&gt;
&lt;p&gt;To be able to handle this effectively you need a task management system that let&amp;rsquo;s you quickly jot things at any time. There are approximately a million todo/tasks/list/note app available so you should be able to find one that works for you but I would recommend one that allows quick entry from both desktop and mobile. I&amp;rsquo;ve personally been using &lt;a href=&#34;https://www.rememberthemilk.com&#34;&gt;Remember the Milk&lt;/a&gt; since 2007.&lt;/p&gt;
&lt;p&gt;If you&amp;rsquo;re able to build this habit then everyone you work with will start to build a trust in you that tasks they delegate won&amp;rsquo;t fall through the cracks if they don&amp;rsquo;t remember to follow up with you.&lt;/p&gt;
&lt;h3 id=&#34;attention-management&#34;&gt;Attention Management&lt;/h3&gt;
&lt;p&gt;A lot has already been written on the importance of minimizing distractions and focusing on a single task at a time so I won&amp;rsquo;t rehash it here, but I&amp;rsquo;ve found that how I manage my attention to be a key factor in how productive my day is. This is so important in fact that my company invested in several hours of mandatory training for everyone on the topic.&lt;/p&gt;
&lt;p&gt;As leader part of our job is doing what we can to make our team as a whole more productive, so we don&amp;rsquo;t always have the luxury of tuning out all distractions entirely but there are things you can do make it easier.&lt;/p&gt;
&lt;h4 id=&#34;create-focus-blocks&#34;&gt;Create focus blocks&lt;/h4&gt;
&lt;p&gt;Try to create dedicated blocks of time where you can focus and get into a flow. For me, some variation of the &lt;a href=&#34;https://lifehacker.com/productivity-101-a-primer-to-the-pomodoro-technique-1598992730&#34;&gt;pomodoro technique&lt;/a&gt; has worked really well. &lt;a href=&#34;https://www.softwaremeadows.com/posts/the_50-10_time_box_revising_pomodoro_for_software_development_repost/&#34;&gt;This post&lt;/a&gt; does a great job of describing a way to apply it to development work as well as explaining how interruptions are especially bad for technical work.&lt;/p&gt;
&lt;p&gt;Making use of Slack&amp;rsquo;s &amp;ldquo;Do Not Disturb&amp;rdquo; mode is great way to minimize distractions during these blocks. It effectively pauses all notifications from slack until DND is disabled at which point Slack let&amp;rsquo;s you know if you missed any messages, but also when someone messages you slack will give them the option to push the message through anyway if it&amp;rsquo;s urgent. You just need to let your team know what types of things are ok to push through. For me, if anyone is completely blocked waiting on something from me then I&amp;rsquo;m fine being interrupted to unblock them.&lt;/p&gt;
&lt;p&gt;In general it&amp;rsquo;s a good idea to &lt;a href=&#34;https://blog.rescuetime.com/slack-focus-guide/&#34;&gt;adjust your notification settings&lt;/a&gt; in whatever apps you use.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s helpful to have some way to easily jot down any thoughts or ideas that pop up so your brain can quickly return focus to the task at hand since it knows the idea was captured and you can address it later. If I&amp;rsquo;m working on a particular feature or reviewing a pull request, I can easily distract myself if I notice an unrelated bug or have an idea to improve some development process around this area of code and before I know it I&amp;rsquo;m down a rabbit hole 5 - 8 browser tabs deep. But if I know I&amp;rsquo;ve dedicated this block of time to a particular task, then it&amp;rsquo;s much easier to catch myself and instead capture the item quickly and then decided how to handle it once this block is over.&lt;/p&gt;
&lt;h3 id=&#34;most-important-tasks&#34;&gt;Most Important Tasks&lt;/h3&gt;
&lt;p&gt;Identify your &lt;a href=&#34;https://zenhabits.net/purpose-your-day-most-important-task/&#34;&gt;most important tasks&lt;/a&gt; for the day and try to tackle these first thing in the morning or whenever you tend to have the most energy and willpower. This is definitely not a new concept but it&amp;rsquo;s one I&amp;rsquo;ve relied on more while in a leadership role where I have more non-technical tasks that I tend to put off or still feel less comfortable doing. For instance, this technique helped me finally finish my team&amp;rsquo;s performance evaluations even while seemly more urgent tasks regularly popped up throughout my day.&lt;/p&gt;
&lt;h3 id=&#34;weekly-review&#34;&gt;Weekly review&lt;/h3&gt;
&lt;p&gt;Having a &lt;a href=&#34;https://lifehacker.com/the-weekly-review-how-one-hour-can-save-you-a-week-s-w-5908816&#34;&gt;weekly review&lt;/a&gt; has become an invaluable practice I picked up from the &lt;a href=&#34;https://www.amazon.com/Getting-Things-Done-Stress-Free-Productivity-ebook/dp/B00KWG9M2E/ref=as_li_ss_tl?_encoding=UTF8&amp;amp;qid=&amp;amp;sr=&amp;amp;linkCode=ll1&amp;amp;tag=bpugh07-20&amp;amp;linkId=a38d0a77a5ff8b08049aef248af8b5cc&amp;amp;language=en_US&#34;&gt;Getting Things Done&lt;/a&gt; system. In terms of agile processes you can think of it as sprint planning and retrospective. You should set a focus block on your calendar and use it as a time plan and prepare for the week ahead as well as reflect on the previous week.&lt;/p&gt;
&lt;p&gt;I use it to process all my &amp;ldquo;inboxes&amp;rdquo; including email, chat messages, unsorted notes, various todo lists, and even open browser tabs. I also check my calendar for the next week for upcoming deadlines or meetings scheduled that require additional preparation.&lt;/p&gt;
&lt;h3 id=&#34;summary&#34;&gt;Summary&lt;/h3&gt;
&lt;p&gt;We all have our own ways of working that work best for us, and I&amp;rsquo;m constantly tweaking my workflows but these techniques have been serving me well for a while now so hopefully you found at least one helpful takeaway you can apply to your own work.
I may even write a follow up post that goes into more of the implementation details of my system, like tools and processes, if there is any interest.&lt;/p&gt;
&lt;h3 id=&#34;further-reading&#34;&gt;Further Reading&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://www.amazon.com/Getting-Things-Done-Stress-Free-Productivity-ebook/dp/B00KWG9M2E/ref=as_li_ss_tl?_encoding=UTF8&amp;amp;qid=&amp;amp;sr=&amp;amp;linkCode=ll1&amp;amp;tag=bpugh07-20&amp;amp;linkId=a38d0a77a5ff8b08049aef248af8b5cc&amp;amp;language=en_US&#34;&gt;Getting Things Done&lt;/a&gt; (GTD) by David Allen&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://www.amazon.com/Deep-Work-Focused-Success-Distracted-ebook/dp/B00X47ZVXM/ref=sr_1_3?keywords=deep&amp;#43;work&amp;amp;qid=1564377876&amp;amp;s=digital-text&amp;amp;sr=1-3&#34;&gt;Deep Work&lt;/a&gt; by Cal Newport&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://amzn.to/31hnYLe&#34;&gt;Hyperfocus&lt;/a&gt; by Chris Bailey&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://amzn.to/2YILcs3&#34;&gt;The Manager&amp;rsquo;s Path&lt;/a&gt; by Camille Fournier -&amp;gt; a great book in general on technical leadership&lt;/li&gt;
&lt;/ul&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/blog/getting-things-done-as-team-lead/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>My Always-Up-to-Date VS Code Setup for Web Development</title>
      <link>https://www.brandonpugh.com/blog/vscode-setup/</link>
      <pubDate>Sat, 29 Jun 2019 10:54:24 +0200</pubDate>
      <guid>https://www.brandonpugh.com/blog/vscode-setup/</guid>
      <description>&lt;p&gt;I&amp;rsquo;ve gone through the setup and daily use of a number of editors over the years including most current popular ones for front end development (i.e. sublime, atom, and vs code) and for me VS code is the best choice for front end development at the moment.&lt;/p&gt;
&lt;p&gt;The team has put a lot of effort into making it a great javascript experience out of the box and it shows (VS code itself is written in typescript and the team uses vs code to build vs code) and with some additional work you can have &lt;em&gt;the best&lt;/em&gt; experience while writing javascript.&lt;/p&gt;
&lt;h2 id=&#34;extensions&#34;&gt;Extensions&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig&#34;&gt;EditorConfig&lt;/a&gt;: See &lt;a href=&#34;http://editorconfig.org/&#34;&gt;http://editorconfig.org/&lt;/a&gt; if you don&amp;rsquo;t already have a &lt;code&gt;.editorconfig&lt;/code&gt; file in your project&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode&#34;&gt;Prettier&lt;/a&gt;: format javascript using the excellent new &lt;a href=&#34;https://github.com/jlongster/prettier&#34;&gt;Prettier&lt;/a&gt; project by &lt;a href=&#34;http://jlongster.com/&#34;&gt;James Long&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint&#34;&gt;Eslint&lt;/a&gt;: Integrates &lt;a href=&#34;https://eslint.org/&#34;&gt;ESLint&lt;/a&gt; JavaScript linter into VS Code&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens&#34;&gt;GitLens&lt;/a&gt;: adds quite a bit of functionality over the builtin git experience in with the free version.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://marketplace.visualstudio.com/items?itemName=yoavbls.pretty-ts-errors&#34;&gt;Pretty Typescript Errors&lt;/a&gt;: Makes typescript errors &lt;em&gt;much&lt;/em&gt; more readable in VS Code—really should be built-in&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://marketplace.visualstudio.com/items?itemName=Orta.vscode-jest&#34;&gt;Jest&lt;/a&gt;: Integration for the &lt;a href=&#34;https://facebook.github.io/jest/&#34;&gt;Jest&lt;/a&gt; testing framework&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://marketplace.visualstudio.com/items?itemName=vitest.explorer&#34;&gt;Vitest&lt;/a&gt;: Since I&amp;rsquo;m using Vite these days, I prefer &lt;a href=&#34;https://vitest.dev/&#34;&gt;Vitest&lt;/a&gt; over Jest and this is their vscode integration.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://marketplace.visualstudio.com/items?itemName=andys8.jest-snippets&#34;&gt;Jest Snippets&lt;/a&gt;: Common code snippets for unit tests&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker&#34;&gt;Code Spell Checker&lt;/a&gt;: An excellent spell checker that works well with camelCase code&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://marketplace.visualstudio.com/items?itemName=christian-kohler.path-intellisense&#34;&gt;Path Intellisense&lt;/a&gt;: Autocompletes filenames, handy when typing paths to import modules&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://marketplace.visualstudio.com/items?itemName=pflannery.vscode-versionlens&#34;&gt;Version Lens&lt;/a&gt;: Shows the latest version for each dependency in your &lt;code&gt;package.json&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://marketplace.visualstudio.com/items?itemName=DavidAnson.vscode-markdownlint&#34;&gt;Markdownlint&lt;/a&gt;: Markdown linting and style checking for Visual Studio Code. Handy for editing Readme files&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://marketplace.visualstudio.com/items?itemName=shinnn.stylelint&#34;&gt;Stylelint&lt;/a&gt;: Modern CSS/SCSS/Less linter&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://marketplace.visualstudio.com/items?itemName=vscode-icons-team.vscode-icons&#34;&gt;vscode-icons&lt;/a&gt;: Very extensive set of icons for just about every file type imaginable. You could consider it purely aesthetics, but I find have distinct icons makes it easier at a glance to find certain files i.e. a different icon for a &lt;code&gt;spec.js&lt;/code&gt; file.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://marketplace.visualstudio.com/items?itemName=johnpapa.vscode-peacock&#34;&gt;Peacock&lt;/a&gt;: Subtly change the workspace color of your workspace. Ideal when you have multiple VS Code instances and you want to quickly identify which is which&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;react-specific&#34;&gt;React Specific&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://marketplace.visualstudio.com/items?itemName=gottfired.css2react&#34;&gt;css2React&lt;/a&gt;: Convert selection between CSS and React inline style syntax and vice versa&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://marketplace.visualstudio.com/items?itemName=dsznajder.es7-react-js-snippets&#34;&gt;ES7+ React/Redux/React-Native snippets&lt;/a&gt;: The name says it all. See the full list of &lt;a href=&#34;https://github.com/ults-io/vscode-react-javascript-snippets/blob/master/docs/Snippets.md&#34;&gt;snippets here&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://marketplace.visualstudio.com/items?itemName=team-sapling.sapling&#34;&gt;Sapling&lt;/a&gt;: Creates an interactive component dependency tree embedded within the VS Code sidebar&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;angular-specific&#34;&gt;Angular Specific&lt;/h2&gt;
&lt;p&gt;&lt;em&gt;Update: It&amp;rsquo;s been a while now since I&amp;rsquo;ve been on an Angular project so I can&amp;rsquo;t really speak to whether these are still the best options but I&amp;rsquo;m leaving them here in case they&amp;rsquo;re still useful.&lt;/em&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://marketplace.visualstudio.com/items?itemName=Angular.ng-template&#34;&gt;Angular Language Service&lt;/a&gt;: Rich editing support for Angular html templates&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://marketplace.visualstudio.com/items?itemName=natewallace.angular2-inline&#34;&gt;Angular2 inline&lt;/a&gt;: Syntax highlighting for Angular inline templates&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://marketplace.visualstudio.com/items?itemName=johnpapa.Angular2&amp;amp;wt.mc_id=angularessentials-github-jopapa&#34;&gt;Angular snippets&lt;/a&gt;: Angular v8 snippets&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://marketplace.visualstudio.com/items?itemName=PKief.angular-component-extractor&#34;&gt;Angular Component Extractor&lt;/a&gt;: Helper to extract components from templates&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;aesthetics&#34;&gt;Aesthetics&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://marketplace.visualstudio.com/items?itemName=zhuangtongfa.Material-theme&#34;&gt;Atom dark theme&lt;/a&gt;: since I used Atom quite a bit before VS code I still feel very at home with this theme, especially in javascript.
_ &lt;a href=&#34;https://marketplace.visualstudio.com/items?itemName=Catppuccin.catppuccin-vsc&#34;&gt;Catppuccin theme&lt;/a&gt;: a very popular color scheme that I&amp;rsquo;ve been liking lately — particularly the Macchiato variant.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;make-use-of-vs-codes-recommended-extensions-feature&#34;&gt;Make use of VS Code&amp;rsquo;s recommended extensions feature&lt;/h3&gt;
&lt;p&gt;VS Code has a nifty feature where you can add an &lt;code&gt;extensions.json&lt;/code&gt; file to the root of your project so when a teammate opens the directory in vs code for the first they&amp;rsquo;ll be prompted to view the recommended extensions for the workspace. &lt;a href=&#34;https://code.visualstudio.com/docs/editor/extension-gallery#_workspace-recommended-extensions&#34;&gt;Read more about here&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Below is the file you can use for all the extensions I&amp;rsquo;ve mentioned above:&lt;/p&gt;
&lt;p&gt;extensions.json:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-javascript&#34; data-lang=&#34;javascript&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;c1&#34;&gt;// Recommended extensions for VS Code
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;c1&#34;&gt;// See http://go.microsoft.com/fwlink/?LinkId=827846
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;c1&#34;&gt;// for the documentation about the extensions.json format
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;s2&#34;&gt;&amp;#34;recommendations&amp;#34;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;c1&#34;&gt;// Extension identifier format: ${publisher}.${name}.
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;s2&#34;&gt;&amp;#34;streetsidesoftware.code-spell-checker&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;s2&#34;&gt;&amp;#34;EditorConfig.EditorConfig&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;s2&#34;&gt;&amp;#34;dbaeumer.vscode-eslint&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;s2&#34;&gt;&amp;#34;xabikos.ReactSnippets&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;s2&#34;&gt;&amp;#34;eamodio.gitlens&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;s2&#34;&gt;&amp;#34;andys8.jest-snippets&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;s2&#34;&gt;&amp;#34;Orta.vscode-jest&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;s2&#34;&gt;&amp;#34;christian-kohler.path-intellisense&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;s2&#34;&gt;&amp;#34;pflannery.vscode-versionlens&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;s2&#34;&gt;&amp;#34;esbenp.prettier-vscode&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;some-handy-settings&#34;&gt;Some handy settings&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;editor.fontFamily&amp;quot;: &amp;quot;Fira Code&amp;quot;&lt;/code&gt; - &lt;a href=&#34;https://github.com/tonsky/FiraCode&#34;&gt;Fira Code font&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;editor.codeActionsOnSave&amp;quot;: { &amp;quot;source.fixAll.eslint&amp;quot;: true }&lt;/code&gt; - Any fixable eslint issues will be automatically fixed on save&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;editor.fontLigatures&amp;quot;: true&lt;/code&gt; - Requires a font that supports ligatures like Fira Code&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&amp;quot;workbench.editor.showTabs&amp;quot;: false&lt;/code&gt; - VS Code has excellent tab switching built and IMHO eliminates the need for displaying tabs across the top&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;profiles&#34;&gt;Profiles&lt;/h2&gt;
&lt;p&gt;Now in VS code you can create various &lt;a href=&#34;https://code.visualstudio.com/docs/editor/profiles&#34;&gt;profiles&lt;/a&gt; as a way to group various customizations and extensions. For example, an Angular and a React profile. I highly recommend checking it out.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/blog/vscode-setup/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>You Should be Using Git Hooks</title>
      <link>https://www.brandonpugh.com/blog/you-should-be-using-git-hooks/</link>
      <pubDate>Wed, 01 May 2019 10:54:24 +0200</pubDate>
      <guid>https://www.brandonpugh.com/blog/you-should-be-using-git-hooks/</guid>
      <description>&lt;p&gt;In my opinion Git hooks are an incredibly useful yet under-utilized feature of git.
There are lots of resources that go into hooks in detail but here I&amp;rsquo;m just going to list some of the ones
I find myself using over and over again.&lt;/p&gt;
&lt;h2 id=&#34;prepare-commit-msg&#34;&gt;prepare-commit-msg&lt;/h2&gt;
&lt;p&gt;This hooks is great for templating your commit messages. &lt;a href=&#34;https://medium.com/nulab/git-commit-messages-for-the-bold-and-the-daring-3cc91a91e29b&#34;&gt;This post&lt;/a&gt; does a great job of highlighting some powerful
possibilities. I like to use it to automatically insert a ticket number from the current branch name.&lt;/p&gt;
&lt;h2 id=&#34;pre-commit&#34;&gt;pre-commit&lt;/h2&gt;
&lt;h3 id=&#34;run-static-code-analysis&#34;&gt;Run static code analysis&lt;/h3&gt;
&lt;p&gt;These hooks are by far used the most often but the trick is to make sure that you don&amp;rsquo;t cause each
commit to take too long to run the checks. Some popular use cases:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;linters&lt;/li&gt;
&lt;li&gt;spell checkers&lt;/li&gt;
&lt;li&gt;code auto formatting&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These checks can save a lot of time on pull requests or code reviews as you&amp;rsquo;re automating a lot of the trivial
issues that can come up and eliminating unnecessary back and forth.&lt;/p&gt;
&lt;p&gt;For example the javascript community uses &lt;a href=&#34;https://prettier.io&#34;&gt;Prettier&lt;/a&gt; to eliminate &lt;em&gt;any&lt;/em&gt; formatting inconsistencies.
The dotnet community has a new tool from the core team &lt;a href=&#34;https://github.com/dotnet/format&#34;&gt;dotnet format&lt;/a&gt; though much
more limited in scope as it only supports formatting configured with an &lt;code&gt;.editorConfig&lt;/code&gt; file
(see &lt;a href=&#34;https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference?view=vs-2019&#34;&gt;dotnet coding conventions&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;They can also be helpful for preventing common mistakes you find yourself making as I detailed in a previous post
a while back: &lt;a href=&#34;https://www.brandonpugh.com/blog/2013/08/avoid-committing-dumb-mistakes-with-git-hooks/&#34;&gt;Avoid Committing Dumb Mistakes with Git hooks&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&#34;pre-push&#34;&gt;pre-push&lt;/h2&gt;
&lt;p&gt;This is a much less used hook but I find it helpful to use it to check to make sure you don&amp;rsquo;t accidentally push certain types of temporary commits for example &lt;code&gt;--fixup&lt;/code&gt;
or &lt;code&gt;--squash&lt;/code&gt; commits or sometimes even &lt;code&gt;WIP&lt;/code&gt; commits.&lt;/p&gt;
&lt;h2 id=&#34;ok-im-sold-now-what&#34;&gt;OK I&amp;rsquo;m sold, now what?&lt;/h2&gt;
&lt;p&gt;There are a lot of great resources online already for getting started with hooks and a lot of great tools
for managing them. I recommend starting with &lt;a href=&#34;https://githooks.com/&#34;&gt;Git Hooks&lt;/a&gt; and I will also have a followup post
where I go into detail on the setup and specific hooks I use on my projects.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/blog/you-should-be-using-git-hooks/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Use Netlify for a Poor Man&#39;s Self-Hosted Url Shortener</title>
      <link>https://www.brandonpugh.com/blog/use-netlify-for-a-poor-mans-self-hosted-url-shortener/</link>
      <pubDate>Thu, 02 Mar 2017 10:54:24 +0200</pubDate>
      <guid>https://www.brandonpugh.com/blog/use-netlify-for-a-poor-mans-self-hosted-url-shortener/</guid>
      <description>&lt;p&gt;I recently migrated my blog from Github pages to &lt;a href=&#34;https://www.netlify.com&#34;&gt;Netlify&lt;/a&gt; and so far it&amp;rsquo;s been an awesome experience! Netlify gives you so much for free it almost feels like stealing! If you&amp;rsquo;re hosting some static content on github pages or S3 or somewhere, I highly recommend you check them out especially if you have a &lt;a href=&#34;https://www.staticgen.com/&#34;&gt;static gen&lt;/a&gt; build process.&lt;/p&gt;
&lt;p&gt;One of the cool features Netlify gives you is configuring &lt;code&gt;301&lt;/code&gt; redirects using a simple &lt;code&gt;_redirects&lt;/code&gt; file in the root of your site. For example:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;/home              /
/news              /blog
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;It also supports external urls so can do things like:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;/linkedin         https://www.linkedin.com/profile
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Pair this with a short domain (Netlify supports custom domains for free!) and you can create your own shortened urls just by adding lines to this file.&lt;/p&gt;
&lt;p&gt;For example, I have a netlify site configured with the domain &lt;code&gt;pugh.pw&lt;/code&gt; and connected to a github repo with this in my redirects file:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;/vim          https://raw.githubusercontent.com/bpugh/dotfiles/master/vim/.vimrc
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Now &lt;a href=&#34;http://pugh.pw/vim&#34;&gt;http://pugh.pw/vim&lt;/a&gt; will take me to my &lt;code&gt;.vimrc&lt;/code&gt; file so if I need to &lt;code&gt;ssh&lt;/code&gt; into a new linux machine I can easily fetch my &lt;code&gt;vimrc&lt;/code&gt; with a quick &lt;code&gt;curl&lt;/code&gt; command.&lt;/p&gt;
&lt;h2 id=&#34;when-would-you-use-this&#34;&gt;When would you use this?&lt;/h2&gt;
&lt;p&gt;This is perfect if you want to make some short memorable urls that you control yourself. Services like Bitly are convenient for quick one-off links but you&amp;rsquo;re depending on a third party service and you don&amp;rsquo;t always have complete control over what the url will look like.&lt;/p&gt;
&lt;p&gt;This probably isn&amp;rsquo;t for you if you need features like analytics or creating a large number of links, in which case you might want to look at some more full featured open source options for self hosting a url shortener.&lt;/p&gt;
&lt;p&gt;But with such a simple setup and being able to quickly add links by editing the file through the github UI, this is great for creating some personally branded urls or convenient shortcut links.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/blog/use-netlify-for-a-poor-mans-self-hosted-url-shortener/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Use npm with a proxy that requires authentication</title>
      <link>https://www.brandonpugh.com/blog/npm-proxy-wrapper/</link>
      <pubDate>Fri, 17 Jun 2016 00:12:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/blog/npm-proxy-wrapper/</guid>
      <description>&lt;p&gt;It&amp;rsquo;s pretty easy to configure npm to connect through a proxy by setting the &lt;code&gt;proxy&lt;/code&gt; and &lt;code&gt;https-proxy&lt;/code&gt; config settings and you can even use &lt;code&gt;npm config set&lt;/code&gt; which will store them in your &lt;code&gt;.npmrc&lt;/code&gt; file. Connecting through a corporate proxy that requires authentication, however, can be a little trickier.&lt;/p&gt;
&lt;p&gt;To specify your credentials, you have to place them in the proxy url so your npm command would look something like this:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;npm install --proxy http://user_name:password@proxy.company.com:8080&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Typing that every time will get old fast. Again you can use &lt;code&gt;npm config set&lt;/code&gt; but the security conscious will probably feel a bit uneasy having your credentials sitting in plain text in a file on disk especially if, like most corporate environments, the proxy uses your active directory credentials.&lt;/p&gt;
&lt;p&gt;To ease the pain I created a powershell wrapper function around npm to prompt for your proxy password:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-powershell&#34; data-lang=&#34;powershell&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kd&#34;&gt;function&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;np&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;nv&#34;&gt;$response&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;Read-host&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Enter password&amp;#34;&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;-AsSecureString&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;nv&#34;&gt;$password&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;no&#34;&gt;Runtime.InteropServices.Marshal&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]::&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;PtrToStringAuto&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;([&lt;/span&gt;&lt;span class=&#34;no&#34;&gt;Runtime.InteropServices.Marshal&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]::&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;SecureStringToBSTR&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$response&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;))&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;nv&#34;&gt;$un&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;no&#34;&gt;Environment&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]::&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Username&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;nv&#34;&gt;$proxy&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;http://&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;${un}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;:&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;${password}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;@proxy.company.com/&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;n&#34;&gt;npm&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$args&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;-proxy&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$proxy&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;If you add this to your powershell profile then you can then you can call &lt;code&gt;np&lt;/code&gt; in place of &lt;code&gt;npm&lt;/code&gt; and it will prompt you to type your password and then call npm with the parameters you supplied along with the proxy url.&lt;/p&gt;
&lt;p&gt;This does assume the proxy username is the same as your machine username but if not you could tweak the script to prompt you for both.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/blog/npm-proxy-wrapper/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Avoid Committing Dumb Mistakes with Git hooks</title>
      <link>https://www.brandonpugh.com/blog/avoid-committing-dumb-mistakes-with-git-hooks/</link>
      <pubDate>Wed, 14 Aug 2013 00:12:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/blog/avoid-committing-dumb-mistakes-with-git-hooks/</guid>
      <description>&lt;p&gt;&lt;strong&gt;TLDR&lt;/strong&gt;: Git hooks are an awesome way to automatically verify your code as you commit your changes&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m sure we&amp;rsquo;ve all been there where we accidentally committed a change that we were supposed to undo or wasn&amp;rsquo;t ready to be pushed and don&amp;rsquo;t realize it until the build breaks or QA finds a bug.&lt;/p&gt;
&lt;p&gt;The first step I take to avoid committing anything unintentionally is instead of just running &lt;code&gt;git add -A&lt;/code&gt; I make sure to review all the changes in the files I&amp;rsquo;m potentially committing. This is where a graphical tool like Gitk or SmartGit comes in handy as they allow you to click on your modified files and easily view a diff and then select which changes to stage.
Unfortunately changes still slip through as happened to me yesterday when a change of mine got pushed all the way to Test before it was noticed. This led me to create an additional safety net.&lt;/p&gt;
&lt;h3 id=&#34;enter-git-hooks&#34;&gt;Enter Git hooks&lt;/h3&gt;
&lt;p&gt;Client side Git hooks are simply scripts that reside in you local repo in the &lt;code&gt;.git/hooks&lt;/code&gt; directory. These scripts get run at specific times during your local workflow depending on the name of the hook. So for me I wrote a pre-commit hook that checks all the files that are about to be committed and looks for the string &lt;code&gt;&#39;todo: remove&#39;&lt;/code&gt;&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# Redirect output to stderr.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;exec&lt;/span&gt; 1&amp;gt;&lt;span class=&#34;p&#34;&gt;&amp;amp;&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;2&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nv&#34;&gt;FORBIDDEN&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;todo: remove&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;git diff --cached --name-only &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; &lt;span class=&#34;se&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    xargs grep --with-filename -i -n &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$FORBIDDEN&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;COMMIT REJECTED Found &amp;#39;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$FORBIDDEN&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#39; references. Please remove them before commiting&amp;#34;&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;exit&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;exit&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;So now if I make any change that I want to undo before committing, say like commenting out a conditional to make testing easier, I just add a comment like &lt;code&gt;//todo: remove&lt;/code&gt; and git won&amp;rsquo;t let me commit the changes.&lt;/p&gt;
&lt;p&gt;You could also have it look for common debug statements like &lt;code&gt;console.log&lt;/code&gt; in javascript files or even have it run a code analysis tool against the files staged for commit.&lt;/p&gt;
&lt;p&gt;You can download the above hook from this gist: &lt;a href=&#34;https://gist.github.com/bpugh/6a9617ac277c93bc86fe5f1507f5ec90&#34;&gt;https://gist.github.com/bpugh/6a9617ac277c93bc86fe5f1507f5ec90&lt;/a&gt;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/blog/avoid-committing-dumb-mistakes-with-git-hooks/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Bittorrent Sync - File syncing for developers</title>
      <link>https://www.brandonpugh.com/blog/bittorrent-sync-file-syncing-for-developers/</link>
      <pubDate>Sun, 16 Jun 2013 18:48:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/blog/bittorrent-sync-file-syncing-for-developers/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;http://labs.bittorrent.com/experiments/sync.html&#34;&gt;Bittorrent sync&lt;/a&gt; is a new file sharing app released by Bittorrent Labs. People are saying its an alternative to popular file syncing services such as Dropbox, SkyDrive, etc. However I don&amp;rsquo;t currently see it as being a true replacement for these services but after playing with for the last few weeks I must say I&amp;rsquo;m impressed and I feel it does sport some cool features I&amp;rsquo;ve long wished for in a file syncing app. I&amp;rsquo;ve even incorporated it into my development workflow as I&amp;rsquo;ll outline later in this post.&lt;/p&gt;
&lt;p&gt;What sets BS apart from similar services is that its purely a peer to peer (P2P) file syncing service. This means that files get transfer directly between your machines without going through a 3rd party&amp;rsquo;s servers. This is handy is you&amp;rsquo;re the more paranoid type dealing with sensitive files and have been turned off by Dropbox&amp;rsquo;s less than stellar track record with security. Also handy for syncing your current projects when your company has a strict policy about letting source code sit on 3rd party servers.&lt;/p&gt;
&lt;p&gt;This has the added benefit of being faster to transfer large files since they don&amp;rsquo;t have to first be uploaded to a third party server and &lt;em&gt;then&lt;/em&gt; downloaded. This recently saved me time when I had to transfer a 100 gb database backup from a remote server. And since it&amp;rsquo;s using the bittorrent protocol it handles disconnects and partial downloads really well so you don&amp;rsquo;t have to worry about having to start a two hour download over again if your connection gets disrupted.&lt;/p&gt;
&lt;p&gt;Also if you have really large files like virtual machine images, these will be pretty costsly to keep synced on something like dropbox but with Bittorrent sync you&amp;rsquo;re only limited by the size of your hard drives.&lt;/p&gt;
&lt;p&gt;One of its selling points for me was its ability exclude files and folders from being synced, a feature which has been frustratingly absent from most popular services. As a bonus this feature is implemented by a .SyncIgnore file! Since the majority of mainstream source control systems implement a similar mechanism for file exclusion most developers can simply copy and paste their existing rules if you want to sync your project files which is exactly what I did.&lt;/p&gt;
&lt;p&gt;Now you may be wondering why you would need to sync your source files if you&amp;rsquo;re already using version control however I&amp;rsquo;ve always been a bit paranoid when it comes to my work in progress. Even though I subscribe to the idea of commit early and commit often, I&amp;rsquo;ve frequently found myself working for the better part of the day before commiting and I just enjoy the peace of mind that the extra bit of redundancy provides. Its also handy for easily switching between working on different machines.&lt;/p&gt;
&lt;h2 id=&#34;conclusion&#34;&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;While you could use Bittorrent sync to replace a service like Dropbox, I think it has some really nice features that can complement traditional sync services especially for some use cases you&amp;rsquo;re likely to have as a developer.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;http://labs.bittorrent.com/experiments/sync.html&#34;&gt;Bittorrent sync&lt;/a&gt;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/blog/bittorrent-sync-file-syncing-for-developers/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>The Obligatory Octopress Post</title>
      <link>https://www.brandonpugh.com/blog/the-obligatory-octopress-post/</link>
      <pubDate>Thu, 24 Jan 2013 09:45:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/blog/the-obligatory-octopress-post/</guid>
      <description>&lt;p&gt;I finally migrated my blog from Wordpress to &lt;a href=&#34;http://octopress.org/&#34;&gt;Octopress&lt;/a&gt; and given all the blog posts I came across while getting it setup it seems almost like a rite of passage to blog about it once you&amp;rsquo;ve migrated.&lt;/p&gt;
&lt;h2 id=&#34;why-make-the-move&#34;&gt;Why make the move?!&lt;/h2&gt;
&lt;p&gt;For the hacker street cred of course. But seriously, I was growing really tired with the performance of Wordpress and dealing with shared hosting on Godaddy and my colleague suggested I give Octopress a try and so here I am.&lt;/p&gt;
&lt;p&gt;I did run into some snags getting it building on Windows but now it&amp;rsquo;s running smoothly. I must say I really like the idea of having all of my content version controlled and in a portable plain text format. Plus this will be a good way to get some additional experience with ruby.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/blog/the-obligatory-octopress-post/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Goals for 2013</title>
      <link>https://www.brandonpugh.com/blog/goals-for-2013/</link>
      <pubDate>Fri, 04 Jan 2013 09:33:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/blog/goals-for-2013/</guid>
      <description>&lt;h4 id=&#34;learn-git&#34;&gt;Learn Git&lt;/h4&gt;
&lt;p&gt;&lt;a href=&#34;http://git.com&#34;&gt;Git&lt;/a&gt; seems to be emerging as one of the most popular version
control systems especially for open source projects so it would make sense to
become more proficient especially given my next goal.&lt;/p&gt;
&lt;h4 id=&#34;contribute-to-oss&#34;&gt;Contribute to OSS&lt;/h4&gt;
&lt;p&gt;I really want to give back and contribute to an open source project. With so
many on Github hopefully learning Git will make this less intimidating.&lt;/p&gt;
&lt;h4 id=&#34;learn-a-javascript-framework&#34;&gt;Learn a Javascript framework&lt;/h4&gt;
&lt;p&gt;With javascript becoming more and more popular for creating a rich client side
experience, learning and using a javascript framework is practically
a necessity. I&amp;rsquo;ll probably start looking at either &lt;a href=&#34;knockoutjs.com&#34;&gt;Knockout.js&lt;/a&gt;
or &lt;a href=&#34;backbonejs.com&#34;&gt;Backbone.js&lt;/a&gt;.&lt;/p&gt;
&lt;h4 id=&#34;attend-an-out-of-town-conference&#34;&gt;Attend an out of town conference&lt;/h4&gt;
&lt;p&gt;Hopefully one of the big ones like &lt;a href=&#34;codemash.org&#34;&gt;Codemash&lt;/a&gt; or &lt;a href=&#34;thatconference.org&#34;&gt;That
Conference&lt;/a&gt;.&lt;/p&gt;
&lt;h4 id=&#34;become-more-active-on-twitter&#34;&gt;Become more active on Twitter&lt;/h4&gt;
&lt;p&gt;Just seems like a great way to get involved in the development community.&lt;/p&gt;
&lt;h4 id=&#34;migrate-blog-to-octopress&#34;&gt;Migrate blog to Octopress&lt;/h4&gt;
&lt;p&gt;I&amp;rsquo;ve been having annoying performance issues with my current Wordpress setup on
on Godaddy and Octopress seems like a fun project to play with. Not to mention
the hacker street cred&amp;hellip;&lt;/p&gt;
&lt;h4 id=&#34;automate-my-dev-environment-setup&#34;&gt;Automate my dev environment setup&lt;/h4&gt;
&lt;p&gt;After having to setup a new machine recently I&amp;rsquo;ve decided my next would probably
use some combination of &lt;a href=&#34;chocolatey.org&#34;&gt;Chocolatey&lt;/a&gt; and powershell to automate
as much of the process as possible.&lt;/p&gt;
&lt;h4 id=&#34;learn-a-new-programming-language&#34;&gt;Learn a new programming language&lt;/h4&gt;
&lt;p&gt;This is probably constantly on every developer&amp;rsquo;s list but I&amp;rsquo;ve really been
wanting learn Ruby or Python. A functional language would also be really fun to
learn like F#&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/blog/goals-for-2013/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Checking if a dom element exists with JQuery [Byte sized tips]</title>
      <link>https://www.brandonpugh.com/blog/checking-if-a-dom-element-exists-with-jquery/</link>
      <pubDate>Mon, 25 Jun 2012 21:52:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/blog/checking-if-a-dom-element-exists-with-jquery/</guid>
      <description>&lt;p&gt;This is a simple tip but one I feel makes my code a bit easier to read.&lt;/p&gt;
&lt;p&gt;I was never very pleased with the standard way of checking if a dom element exits in jquery:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-javascript&#34; data-lang=&#34;javascript&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;if&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;$&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;#userName&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;).&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;length&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;!==&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;){&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;c1&#34;&gt;//do something with $(&amp;#39;#firstName&amp;#39;)
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The solution I like is to create a very simple jQuery plugin to encapsulate this logic:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-javascript&#34; data-lang=&#34;javascript&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c1&#34;&gt;// this extension reads better when selecting elements
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;$&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;fn&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;exists&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;kd&#34;&gt;function&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;()&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;return&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;this&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;length&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;!==&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;0&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;You can place this anywhere you like such as in a &amp;lsquo;utils.js&amp;rsquo; file, so long as it loads after jQuery. Now your code
would like so:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-javascript&#34; data-lang=&#34;javascript&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;if&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;$&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;#userName&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;).&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;exists&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()){&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;c1&#34;&gt;//do something with $(&amp;#39;#firstName&amp;#39;)
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/blog/checking-if-a-dom-element-exists-with-jquery/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>How to use jQuery .on() instead of .live()</title>
      <link>https://www.brandonpugh.com/blog/how-to-use-jquery-on-instead-of-live/</link>
      <pubDate>Sun, 15 Jan 2012 21:52:25 +0000</pubDate>
      <guid>https://www.brandonpugh.com/blog/how-to-use-jquery-on-instead-of-live/</guid>
      <description>&lt;p&gt;One of the most used features of jQuery is the easy methods it provides to to attach event handlers to dom elements like this simple example:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-javascript&#34; data-lang=&#34;javascript&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;$&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;.submitButton&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;).&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;click&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;kd&#34;&gt;function&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;nx&#34;&gt;validateForm&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;();&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;});&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;It doesn&amp;rsquo;t get much easier than that. However, a lot of times we&amp;rsquo;ll want to attach events to elements that were loaded after the initial page load such as from the result of an ajax request. This is where the .live() method comes in really handy:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-javascript&#34; data-lang=&#34;javascript&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;$&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;.submitButton&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;).&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;live&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;click&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;kd&#34;&gt;function&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;nx&#34;&gt;validateForm&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;();&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;});&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;However if you&amp;rsquo;re using jQuery 1.7 and up you now have access to the .on() method which is a very versatile method offering a number of improvements over .live(). &lt;a href=&#34;https://www.bitovi.com/blog/why-you-should-never-use-jquery-live&#34;&gt;This post&lt;/a&gt; does a good job of explaining the main issues with using live, all of which you can avoid by using .on().&lt;/p&gt;
&lt;p&gt;So how do you go about using .on()? Well .on() basically provides a consistent interface for practically all your event binding needs. You can replace the first example with:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-javascript&#34; data-lang=&#34;javascript&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;$&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;.submitButton&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;).&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;on&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;click&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;kd&#34;&gt;function&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;nx&#34;&gt;validateForm&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;();&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;});&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;and you can obviously replace &lt;code&gt;&#39;click&#39;&lt;/code&gt; with whatever event you wish to handle.&lt;/p&gt;
&lt;p&gt;Now to replace the previous live() example with .on() requires the tiniest bit more effort. The way .on() works is it will attach the event to the first selector you specify and if you specify a second selector it will look at all the events that bubble up to it and will only execute the event handler for events that came child elements matching the second selector. So we could replace the example with this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-javascript&#34; data-lang=&#34;javascript&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;$&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;#userForm&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;).&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;on&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;click&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;.submitButton&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;kd&#34;&gt;function&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;nx&#34;&gt;validateForm&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;();&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;});&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Since the submitButton element is a child of the userForm element, the click event from the button will bubble up the dom and when it reaches the form element our event handler will be called. This is how we can dynamically insert as many elements with the calls submitbutton and have them be automatically handled. This is essentially the same thing that .live() accomplishes however it does so by automatically attaching the event handler to the document element which can have performance implications as now our click event would have to bubble all the way up the dom tree to the document before the handler will see it. It would look like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-javascript&#34; data-lang=&#34;javascript&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;$&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;document&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;).&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;on&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;click&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;#submitButton&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;kd&#34;&gt;function&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;nx&#34;&gt;validateForm&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;();&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;});&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Let&amp;rsquo;s look at one last examle:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-javascript&#34; data-lang=&#34;javascript&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;$&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;#dataTable tr&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;).&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;live&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;click&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;kd&#34;&gt;function&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;event&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;){&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;nx&#34;&gt;alert&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;$&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;this&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;).&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;text&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;());&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;});&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This is a fairly common scenario where &lt;code&gt;#dataTable&lt;/code&gt; is populated dynamically by data retrieved asynchronously from the server. Again the issue here is that all the events have to bubble up to the document before they are seen by the handler. We can instead replace this with:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-javascript&#34; data-lang=&#34;javascript&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;$&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;#dataTable tbody&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;).&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;on&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;click&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;tr&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;kd&#34;&gt;function&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;event&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;){&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;nx&#34;&gt;alert&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;$&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;this&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;).&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;text&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;());&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;});&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/blog/how-to-use-jquery-on-instead-of-live/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>About Me</title>
      <link>https://www.brandonpugh.com/about/</link>
      <pubDate>Tue, 10 Jan 2012 17:23:56 +0000</pubDate>
      <guid>https://www.brandonpugh.com/about/</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;To only a fraction of the human race does God give the privilege of earning one&amp;rsquo;s bread doing what one would have gladly pursued free, for passion. I am very thankful. - Frederick Brooks, &lt;a href=&#34;https://smile.amazon.com/Mythical-Man-Month-Software-Engineering-Anniversary/dp/0201835959&#34;&gt;The Mythical Man-Month&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;img alt=&#34;Brandon Pugh profile image&#34; loading=&#34;lazy&#34; src=&#34;https://www.brandonpugh.com/images/about_me.jpg&#34;&gt;&lt;/p&gt;
&lt;p&gt;My name is Brandon Pugh and I&amp;rsquo;m a software developer working for a software consultancy in Austin. I&amp;rsquo;m passionate about what I do and I especially enjoy building web based applications. Currently my experience is mostly in the Microsoft web stack though I work on all aspects of an application from the UX in javascript to SQL Server stored procedures in T-Sql. I also enjoy reading, movies, dancing, and finding ways to utilize technology to make life easier. I&amp;rsquo;m searching for new ways to hone my &lt;a href=&#34;http://manifesto.softwarecraftsmanship.org/&#34;&gt;craft&lt;/a&gt;.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/about/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Colophon</title>
      <link>https://www.brandonpugh.com/colophon/</link>
      <pubDate>Tue, 10 Jan 2012 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/colophon/</guid>
      <description>&lt;p&gt;This is a personal blog built with &lt;a href=&#34;https://gohugo.io/&#34;&gt;Hugo&lt;/a&gt;, a static site generator written in Go. It&amp;rsquo;s designed for speed and simplicity, which is perfect for a blog that prioritizes content over complexity.&lt;/p&gt;
&lt;h2 id=&#34;theme&#34;&gt;Theme&lt;/h2&gt;
&lt;p&gt;The site uses the &lt;a href=&#34;https://github.com/adityatelange/hugo-PaperMod&#34;&gt;PaperMod&lt;/a&gt; theme, a minimal and clean theme that emphasizes readability and performance. Some customizations have been made to the default theme, including IndieWeb microformats and custom blockquote styling for alerts and admonitions.&lt;/p&gt;
&lt;h2 id=&#34;hosting--deployment&#34;&gt;Hosting &amp;amp; Deployment&lt;/h2&gt;
&lt;p&gt;The site is hosted on &lt;a href=&#34;https://www.netlify.com/&#34;&gt;Netlify&lt;/a&gt;, which automatically builds and deploys the site whenever changes are pushed to the GitHub repository. The build process runs Hugo to generate the static site, which is then served globally via Netlify&amp;rsquo;s CDN.&lt;/p&gt;
&lt;h2 id=&#34;tools--technologies&#34;&gt;Tools &amp;amp; Technologies&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Hugo&lt;/strong&gt; (v0.153.2 extended) - Static site generator&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;PaperMod&lt;/strong&gt; - Hugo theme&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Netlify&lt;/strong&gt; - Hosting and continuous deployment&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;GitHub&lt;/strong&gt; - Source control and repository hosting&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Fuse.js&lt;/strong&gt; - Client-side search functionality&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Giscus&lt;/strong&gt; - Comment system (when enabled)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;ImageMagick&lt;/strong&gt; - Image optimization&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;cspell&lt;/strong&gt; - Spell checking&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;analytics--comments&#34;&gt;Analytics &amp;amp; Comments&lt;/h2&gt;
&lt;p&gt;The site uses privacy-respecting methods for analytics and engagement:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Analytics are handled server-side through Netlify Analytics&lt;/li&gt;
&lt;li&gt;Comments are powered by Giscus (GitHub-backed) when enabled&lt;/li&gt;
&lt;li&gt;No third-party tracking or analytics scripts that compromise user privacy&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;content-organization&#34;&gt;Content Organization&lt;/h2&gt;
&lt;p&gt;Content is organized into several sections:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Blog Posts&lt;/strong&gt; - Full articles in &lt;code&gt;/blog/&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;TIL&lt;/strong&gt; (Today I Learned) - Short, topic-based entries in &lt;code&gt;/til/&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Links&lt;/strong&gt; - Curated links with commentary&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Garden&lt;/strong&gt; - Evergreen reference documents and resources&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;About&lt;/strong&gt; - Information about me&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;development&#34;&gt;Development&lt;/h2&gt;
&lt;p&gt;The source code for this site is &lt;a href=&#34;https://github.com/bpugh/brandonpugh.com&#34;&gt;available on GitHub&lt;/a&gt;. Development setup includes a DevContainer configuration for consistent development environments.&lt;/p&gt;
&lt;h2 id=&#34;accessibility--performance&#34;&gt;Accessibility &amp;amp; Performance&lt;/h2&gt;
&lt;p&gt;This site is built with accessibility and performance in mind:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;No JavaScript required for core functionality&lt;/li&gt;
&lt;li&gt;Semantic HTML and proper heading hierarchy&lt;/li&gt;
&lt;li&gt;Fast page loads with static HTML delivery&lt;/li&gt;
&lt;li&gt;Clean, readable typography&lt;/li&gt;
&lt;/ul&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/colophon/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>My thoughts on the Global Day of Coderetreat</title>
      <link>https://www.brandonpugh.com/blog/my-thoughts-on-the-global-day-of-coderetreat/</link>
      <pubDate>Fri, 09 Dec 2011 23:04:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/blog/my-thoughts-on-the-global-day-of-coderetreat/</guid>
      <description>&lt;p&gt;Last weekend I attended the Global Day of Coderetreat in Dallas, TX which was not only my first Coderetreat but also my first time attending a developer community event and I have to say that it was a great and worthwhile experience.&lt;/p&gt;
&lt;p&gt;If you&amp;rsquo;re unfamiliar with the format of a Coderetreat you can read all about it at &lt;a href=&#34;http://coderetreat.com&#34;&gt;coderetreat.com&lt;/a&gt; but its basically a code kata where you spend most of the day pairing up in 45 min sessions and attempt to solve Conway&amp;rsquo;s Game of Life (a fascinating problem by itself). I had only first heard about it a couple weeks before when Corey Haines went on the Herding code podcast to talk about it and I&amp;rsquo;m glad I went because I feel took away a few key benefits.&lt;/p&gt;
&lt;h2 id=&#34;getting-to-know-my-community&#34;&gt;Getting to know my community&lt;/h2&gt;
&lt;p&gt;I hadn&amp;rsquo;t realized what a strong development community there was in my city and I met some really cool people who were not only fun to talk to but who I could learn lots of new things from. I found out that there are other regular meet ups such as the &lt;a href=&#34;http://twitter.com/#!/dallashackclub&#34;&gt;Dallas Hack Club&lt;/a&gt; which I plan to start attending. I even found out that there are quite a few other people besides me who still like to use Vim or Vi key mappings!&lt;/p&gt;
&lt;h2 id=&#34;the-value-of-tdd&#34;&gt;The value of TDD&lt;/h2&gt;
&lt;p&gt;In school and the places I&amp;rsquo;ve worked there hasn&amp;rsquo;t been a very strong emphasis on the importance of TDD or even unit testing so I had only ever dabbled in it after reading about in various books and blog posts. After the Coderetreat however, I was sold. The Coderetreat very strongly encourages following TDD practices and pairing up with an experienced unit tester or TDD practitioner is a great way to learn. Its true that you can get addicted to the quick feedback you get from unit tests and the safety in knowing that whenever we went back and refactored one of our methods we didn&amp;rsquo;t have to worry that we broke something since the unit tests still passed. One of my partners suggested that I read Michael Feathers book &lt;a href=&#34;http://www.amazon.com/Working-Effectively-Legacy-Michael-Feathers/dp/0131177052&#34;&gt;Working Effectively with Legacy Code&lt;/a&gt; and it is looking to be a great read. The bulk of what I&amp;rsquo;m currently doing at work is maintaining existing systems and now I&amp;rsquo;m working on incorporating unit tests into my updates.&lt;/p&gt;
&lt;h2 id=&#34;exposure-to-new-languages&#34;&gt;Exposure to new languages&lt;/h2&gt;
&lt;p&gt;Coderetreat is language agnostic so they encourage pairing up with someone with development experience fairly different from your own which is a great way to see other programming languages in action. I probably spent most of the morning with Ruby guys and it was impressive to see how quickly we could go from a blank project to our first failing test! I also saw some of the cool things you can do with Rake as far as automatically building .net projects and I got some exposure to &lt;a href=&#34;http://nspec.org/&#34;&gt;NSpec&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;So I highly recommend attending a Coderetreat if you get the chance but at the very least get out in your community by attending some local user groups or conferences.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/blog/my-thoughts-on-the-global-day-of-coderetreat/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Getting started with PetaPoco and Postgres</title>
      <link>https://www.brandonpugh.com/blog/getting-started-with-petapoco-and-postgres/</link>
      <pubDate>Wed, 30 Nov 2011 17:50:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/blog/getting-started-with-petapoco-and-postgres/</guid>
      <description>&lt;p&gt;I&amp;rsquo;m currently working on a project I&amp;rsquo;ve inherited that uses a Postgres sql backend and I was looking for an easy way to make writing our data access layer less time consuming and painful. My first thought was to use a micro-ORM like &lt;a href=&#34;https://github.com/robconery/massive&#34;&gt;Massive&lt;/a&gt; but while I&amp;rsquo;ve heard some really great things about Massive, I felt it might be a tough sell to my team members who aren&amp;rsquo;t too comfortable with Expandos and its dynamic nature (I know, but change in baby steps I suppose). Then I came across &lt;a href=&#34;http://www.toptensoftware.com/petapoco/&#34;&gt;PetaPoco&lt;/a&gt; and it seemed to fit the bill. Its basically a mico-ORM like Massive with built in support for Postgres except that it also works with POCOs (Plain old CLR Objects) and was pretty easy to get up and running with.&lt;/p&gt;
&lt;p&gt;First if you&amp;rsquo;re not already working with Postgres you&amp;rsquo;ll need to install a &lt;a href=&#34;https://www.npgsql.org/&#34;&gt;provider like Npgsql&lt;/a&gt;. You can get the assemblies from their site or use Nuget with the command &amp;ldquo;Install-Package Npgsql&amp;rdquo;. If you were already using Postgres like I was you&amp;rsquo;ll have to add a bit more to the web.config/app.config in order to use PetaPoco.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-xml&#34; data-lang=&#34;xml&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nt&#34;&gt;&amp;lt;system.data&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;	&lt;span class=&#34;nt&#34;&gt;&amp;lt;DbProviderFactories&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;	  &lt;span class=&#34;nt&#34;&gt;&amp;lt;add&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;name=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;Npgsql Data Provider&amp;#34;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;invariant=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;Npgsql&amp;#34;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;support=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;FF&amp;#34;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;description=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;.Net Framework Data Provider for Postgresql Server&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;		   &lt;span class=&#34;na&#34;&gt;type=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;Npgsql.NpgsqlFactory, Npgsql, Version=2.0.11.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7&amp;#34;&lt;/span&gt; &lt;span class=&#34;nt&#34;&gt;/&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;	&lt;span class=&#34;nt&#34;&gt;&amp;lt;/DbProviderFactories&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nt&#34;&gt;&amp;lt;/system.data&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nt&#34;&gt;&amp;lt;connectionStrings&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;	&lt;span class=&#34;nt&#34;&gt;&amp;lt;add&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;name=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;Postgres&amp;#34;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;connectionString=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;Server=localhost;Port=5432;User Id=testuser;Password=secret;Database=testdb;&amp;#34;&lt;/span&gt; &lt;span class=&#34;na&#34;&gt;providerName=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;Npgsql&amp;#34;&lt;/span&gt;&lt;span class=&#34;nt&#34;&gt;/&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nt&#34;&gt;&amp;lt;/connectionStrings&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Notice you have to add the DbProviderFactories to the system.data section (you can also do this in the machine.config though you may run into issues when you deploy) and be sure to specify that as the providerName in the connection string.&lt;/p&gt;
&lt;p&gt;Next install PetaPoco which you can get from Nuget with &amp;ldquo;Install-Package PetaPoco&amp;rdquo; which installs it in your project with some handy T4 templates for generating pocos from your database schema but all you really need is the single PetaPoco.cs file somewhere in your project and you should be ready to go. &lt;a href=&#34;http://www.toptensoftware.com/petapoco/&#34;&gt;Check out their site&lt;/a&gt; for some great examples to get coding.&lt;/p&gt;
&lt;p&gt;Its also worth noting though that if you&amp;rsquo;re targeting .Net 3.5 you&amp;rsquo;ll need to define **PETAPOCO_NO_DYNAMIC **as a conditional compile symbol in your project settings or it won&amp;rsquo;t compile since PetaPoco now also supports dynamics.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/blog/getting-started-with-petapoco-and-postgres/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>GhostDoc [Dev tool of the week]</title>
      <link>https://www.brandonpugh.com/blog/ghostdoc-dev-tool-of-the-week/</link>
      <pubDate>Wed, 19 Oct 2011 11:43:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/blog/ghostdoc-dev-tool-of-the-week/</guid>
      <description>&lt;p&gt;Thought I would try to make it a thing where I post about a particular tool I&amp;rsquo;m using that makes life easier for me as a developer.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;http://submain.com/products/ghostdoc.aspx&#34;&gt;GhostDoc&lt;/a&gt; is a cool little Visual Studio plugin that makes commenting your methods and properties much easier. With a keyboard shortcut or right clicking on a method name, GhostDoc will automatically generate xml documentation comments by intelligently looking at the method name and parameters:&lt;/p&gt;
&lt;p&gt;&lt;img loading=&#34;lazy&#34; src=&#34;https://www.brandonpugh.com/images/GhostDoc_Sample_CSharp_660x340.png&#34;&gt;&lt;/p&gt;
&lt;p&gt;I know how we can all get lazy when it comes to documenting our code especially when we&amp;rsquo;re on a time crunch but I&amp;rsquo;ve definitely found GhostDoc helps minimize a bit of the friction when it comes to writing documentation comments and your team members will definitely thank you for it.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;http://submain.com/products/ghostdoc.aspx&#34;&gt;GhostDoc&lt;/a&gt;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/blog/ghostdoc-dev-tool-of-the-week/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Allow pasting multiple lines in IE textbox</title>
      <link>https://www.brandonpugh.com/blog/allow-pasting-multiple-lines-in-ie-textbox/</link>
      <pubDate>Wed, 12 Oct 2011 23:21:07 +0000</pubDate>
      <guid>https://www.brandonpugh.com/blog/allow-pasting-multiple-lines-in-ie-textbox/</guid>
      <description>&lt;p&gt;You may have noticed before that if you try to paste more than one line of text into a textbox in Internet explorer it will on only paste in the first line and disregard the rest. Firefox and Chrome on the other hand will automatically paste all lines of the text onto the one line of the textbox. This issue came up in one of the projects I&amp;rsquo;m currently working on where we wanted users to be able to paste in a list of ID numbers they wanted to run a search on.&lt;/p&gt;
&lt;p&gt;I knew it was possible to get it working in IE since I had seen it done with the search box on Google Maps. I figured the way to do it would be to be to capture the text from the clipboard when the user is attempting to paste it into the textbox and reformat the text into a single line. In the end this is what the javascript looked liked:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-javascript&#34; data-lang=&#34;javascript&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;window&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;clipboardData&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;nx&#34;&gt;$&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;#textboxId&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;).&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;bind&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;paste&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;kd&#34;&gt;function&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;e&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;kd&#34;&gt;var&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;clipped&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;window&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;clipboardData&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;getData&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;Text&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;nx&#34;&gt;clipped&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;clipped&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;replace&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;sr&#34;&gt;/(\r\n|\n|\r)/gm&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34; &amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt; &lt;span class=&#34;c1&#34;&gt;//replace newlines with spaces
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;nx&#34;&gt;$&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;this&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;).&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;val&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;clipped&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;            &lt;span class=&#34;k&#34;&gt;return&lt;/span&gt; &lt;span class=&#34;kc&#34;&gt;false&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt; &lt;span class=&#34;c1&#34;&gt;//cancel the pasting event
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;p&#34;&gt;});&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;To begin with, I&amp;rsquo;m using &lt;a href=&#34;http://jquery.com&#34;&gt;jQuery&lt;/a&gt; because it&amp;rsquo;s incredibly powerful and it&amp;rsquo;s 2011 and if you&amp;rsquo;re not using a javascript library then you are missing out. This allows me to bind an event handler for the paste event to the textbox element. Note that the paste event is supported in practically all browsers however for security reasons accessing the clipboard is only supported in IE. Fortunately for this purpose I&amp;rsquo;m only interested in Intenet Explorer and we can get the text with window.clipboardData object. Passing &amp;lsquo;Text&amp;rsquo; into the getData() function is required to return the data as text.&lt;/p&gt;
&lt;p&gt;Next calling .replace() on the text to replace all of the newline characters with spaces (or any delimeter we choose). Then we simply set the value of the textbox to the newly formatted text.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-javascript&#34; data-lang=&#34;javascript&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;clipped&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;clipped&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;replace&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;sr&#34;&gt;/(\r\n|\n|\r)/gm&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34; &amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt; &lt;span class=&#34;c1&#34;&gt;//replace newlines with spaces
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;$&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;this&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;).&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;val&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;clipped&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Also don&amp;rsquo;t forget to call &lt;em&gt;return false;&lt;/em&gt; to prevent the original text from still being pasted in.&lt;/p&gt;
&lt;p&gt;Lastly we need to handle what will happen in all other browsers. We only want to attempt to read from clipboardData in IE since it will be undefined in all other browsers. One way to accomplish this is by detecting what browser the user has however this is not recommended. The trend nowadays is to use feature detection and there are entire javascript libraries such as &lt;a href=&#34;http://modernizr.com&#34;&gt;Modernizr&lt;/a&gt; dedicated to detecting which features a browser supports and then degrading gracefully when it doesn&amp;rsquo;t. In this case we can simply surround our code with an if statement to ensure our code won&amp;rsquo;t cause any errors outside of Internet Explorer.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-javascript&#34; data-lang=&#34;javascript&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;window&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;clipboardData&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;){}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;And there you go, overcoming one of Internet Explorer&amp;rsquo;s shortcomings with some simple and concise javascript.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/blog/allow-pasting-multiple-lines-in-ie-textbox/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>VsVim [Visual Studio extension showcase]</title>
      <link>https://www.brandonpugh.com/blog/vsvim-visual-studio-extension-showcase/</link>
      <pubDate>Sun, 09 Oct 2011 23:59:33 +0000</pubDate>
      <guid>https://www.brandonpugh.com/blog/vsvim-visual-studio-extension-showcase/</guid>
      <description>&lt;p&gt;I thought I might do an occasional series of posts on useful visual studio extensions that I use and I&amp;rsquo;m starting off with one of my must-haves: &lt;a href=&#34;https://marketplace.visualstudio.com/items?itemName=JaredParMSFT.VsVim&#34;&gt;VsVim&lt;/a&gt;. Vim, for those of you who don&amp;rsquo;t, is a powerful command line based text editor that has been around for a long time. I had to learn it when I was a freshman at college and we had to compile our C++ programs on a central Unix server over SSH and I&amp;rsquo;ve been hooked ever since.&lt;/p&gt;
&lt;p&gt;If you want all the power of the Visual Studio IDE but don&amp;rsquo;t want to give up the power of vim&amp;rsquo;s modal editing and key bindings then this is the extension for you. It&amp;rsquo;s open source and very actively maintained and one of the best vim ports I&amp;rsquo;ve ever used. By using a &lt;code&gt;.vsvimrc&lt;/code&gt; file you can get an editing experience that stays very true to vim.&lt;/p&gt;
&lt;p&gt;Give it a try: &lt;a href=&#34;https://marketplace.visualstudio.com/items?itemName=JaredParMSFT.VsVim&#34;&gt;VsVim&lt;/a&gt;&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/blog/vsvim-visual-studio-extension-showcase/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>My development journal</title>
      <link>https://www.brandonpugh.com/blog/my-development-journal/</link>
      <pubDate>Thu, 06 Oct 2011 06:30:40 +0000</pubDate>
      <guid>https://www.brandonpugh.com/blog/my-development-journal/</guid>
      <description>&lt;p&gt;After having just watched one Rob Conery&amp;rsquo;s excellent screencasts at Tekpub on going from Coder to Developer, I&amp;rsquo;ve finally decided to start my own blog. Rob suggested possibly making it something of a development journal if you&amp;rsquo;re learning a new language or technology and being relatively new to the industry and being a lead developer, it feels like I&amp;rsquo;m learning so much so fast. So this is my outlet for recording/sharing my experiences, knowledge, trials, triumphs, and mistakes with anyone who might find it interesting or useful.&lt;/p&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/blog/my-development-journal/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Archive</title>
      <link>https://www.brandonpugh.com/archives/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/archives/</guid>
      <description>
       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/archives/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Ideas</title>
      <link>https://www.brandonpugh.com/ideas/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/ideas/</guid>
      <description>&lt;p&gt;This is a collection of ideas, thoughts, and projects I&amp;rsquo;m exploring.
This is based on the &lt;a href=&#34;https://slashpages.net/#ideas&#34;&gt;/ideas slashpage&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;blog-posts&#34;&gt;Blog posts&lt;/h2&gt;
&lt;p&gt;Some ideas for posts I might write.
If you see one that you&amp;rsquo;d be interested in reading, let me know!
That might be the motivation I need to actually sit down and write it&amp;hellip;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Useful new CSS features to improve your personal site&lt;/li&gt;
&lt;li&gt;Tips for working with React testing library&lt;/li&gt;
&lt;li&gt;Why Pebbles are the best smartwatches&lt;/li&gt;
&lt;li&gt;Why Fitbit devices suck&lt;/li&gt;
&lt;li&gt;Travel hacks I&amp;rsquo;ve actually found useful&lt;/li&gt;
&lt;li&gt;Features I use in an RSS reader&lt;/li&gt;
&lt;li&gt;Common RSS feeds on blogs&lt;/li&gt;
&lt;li&gt;Why I blog&lt;/li&gt;
&lt;li&gt;Why I prefer Android over iOS&lt;/li&gt;
&lt;li&gt;Knot tying for everyday life&lt;/li&gt;
&lt;li&gt;My time at &lt;a href=&#34;https://www.builtinaustin.com/company/headspring&#34;&gt;Headspring&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Everything about bookmarklets&lt;/li&gt;
&lt;li&gt;How I learn new programming languages through TDD&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;git&#34;&gt;Git&lt;/h3&gt;
&lt;p&gt;I&amp;rsquo;ve always had an interest in version control systems and an unhealthy amount of experience with Git so I have way too many ideas for git-related posts that very likely would interest no one but me.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;My advanced Git aliases&lt;/li&gt;
&lt;li&gt;you might not need husky
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://blog.typicode.com/posts/husky-git-hooks-javascript-config/&#34;&gt;https://blog.typicode.com/posts/husky-git-hooks-javascript-config/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/typicode/husky/discussions/1040#discussioncomment-2194379&#34;&gt;discussion about what value it still has&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;how to do stacked branches
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://newsletter.pragmaticengineer.com/p/stacked-diffs&#34;&gt;stacked diffs&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Azure repos vs github
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://www.continuousimprover.com/2024/01/github-vs-azdo.html&#34;&gt;https://www.continuousimprover.com/2024/01/github-vs-azdo.html&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;my favorite git hooks&lt;/li&gt;
&lt;li&gt;how to keep files in sync with a pre commit hook&lt;/li&gt;
&lt;li&gt;Why commit messages matter&lt;/li&gt;
&lt;li&gt;how to clone just part of a large repo: &lt;a href=&#34;https://stackoverflow.com/a/63786181/1715138&#34;&gt;https://stackoverflow.com/a/63786181/1715138&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://blog.gitbutler.com/git-tips-3-really-large-repositories/&#34;&gt;https://blog.gitbutler.com/git-tips-3-really-large-repositories/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Comparing &lt;a href=&#34;https://graphite.dev/blog/pull-request-merge-strategy&#34;&gt;merge strategies&lt;/a&gt; and why semi-linear is my preferred&lt;/li&gt;
&lt;li&gt;easy ways to keep a clean history on your branch&lt;/li&gt;
&lt;li&gt;advantages of git CLI&lt;/li&gt;
&lt;li&gt;why it&amp;rsquo;s worth paying for a nice GUI client&lt;/li&gt;
&lt;li&gt;cherry pick range vs rebase onto&lt;/li&gt;
&lt;li&gt;why you should use &lt;code&gt;git pull --rebase&lt;/code&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://mergebase.com/blog/doing-git-pull-wrong/&#34;&gt;advantages of pull with rebase&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;people say don&amp;rsquo;t force push to &lt;em&gt;public&lt;/em&gt; branches but don&amp;rsquo;t elaborate on what public means&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;how to backup local repo&lt;/li&gt;
&lt;li&gt;don&amp;rsquo;t add to the end of lists&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;updates-to-this-site&#34;&gt;Updates to this site&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Support webmentions&lt;/li&gt;
&lt;li&gt;Heart button&lt;/li&gt;
&lt;li&gt;Implement &lt;a href=&#34;https://piccalil.li/blog/simplify-sharing-with-built-in-apis-and-progressive-enhancement/&#34;&gt;Web share&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;More informational footer&lt;/li&gt;
&lt;li&gt;Add more color and personalize design&lt;/li&gt;
&lt;li&gt;Add a favorite links page&lt;/li&gt;
&lt;/ul&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/ideas/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Search</title>
      <link>https://www.brandonpugh.com/search/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/search/</guid>
      <description>
       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/search/feed&quot;&gt;
      </description>
    </item>
    
    <item>
      <title>Subscribe</title>
      <link>https://www.brandonpugh.com/subscribe/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://www.brandonpugh.com/subscribe/</guid>
      <description>&lt;p&gt;These are the various ways to find out when I post things to my site.&lt;/p&gt;
&lt;h2 id=&#34;rss-feeds&#34;&gt;RSS Feeds&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://www.brandonpugh.com/post/index.xml&#34;&gt;Articles feed&lt;/a&gt; - just my longer form blog entries&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://www.brandonpugh.com/til/index.xml&#34;&gt;TIL feed&lt;/a&gt; - &amp;ldquo;Today I learned&amp;rdquo; posts&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://www.brandonpugh.com/links/index.xml&#34;&gt;Links feed&lt;/a&gt; - A good old fashioned &lt;a href=&#34;https://simonwillison.net/2024/Dec/22/link-blog/&#34;&gt;link blog&lt;/a&gt;—&lt;a href=&#34;https://www.brandonpugh.com/links/&#34;&gt;Links&lt;/a&gt; I&amp;rsquo;ve found worth sharing.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://www.brandonpugh.com/feed/index.xml&#34;&gt;Everything feed&lt;/a&gt; - all content from all sections&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;email&#34;&gt;Email&lt;/h2&gt;
&lt;p&gt;If you prefer to get updates in your inbox, then enter your email here:&lt;/p&gt;
&lt;form
  action=&#34;
          https://buttondown.com/api/emails/embed-subscribe/bpugh
         &#34;
  method=&#34;post&#34;
&gt;
  &lt;label class=&#34;visuallyhidden&#34; for=&#34;bd-email&#34;&gt;Enter your email&lt;/label&gt;
  &lt;input type=&#34;email&#34; autocomplete=&#34;email&#34; name=&#34;email&#34; placeholder=&#34;you@example.com&#34; id=&#34;bd-email&#34; required /&gt;
  &lt;input type=&#34;hidden&#34; value=&#34;1&#34; name=&#34;embed&#34; /&gt;
  &lt;input type=&#34;submit&#34; value=&#34;Subscribe&#34; /&gt;
&lt;/form&gt;
&lt;p&gt;This isn&amp;rsquo;t a hip newsletter, it&amp;rsquo;s literally just my posts in their entirety, whenever I publish them.&lt;/p&gt;
&lt;h2 id=&#34;social-media&#34;&gt;Social Media&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Mastodon: &lt;a href=&#34;https://hachyderm.io/@bpugh&#34;&gt;@hachyderm.io/@bpugh&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Bluesky: &lt;a href=&#34;https://bsky.app/profile/bpugh.dev&#34;&gt;@bpugh.dev&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

       &lt;hr&gt; &lt;p&gt;Thank you for keeping RSS alive. You&#39;re awesome.&lt;/p&gt; &lt;p&gt;&lt;a href=&#34;mailto:blogrss@bpugh.dev&#34;&gt;Reply by email&lt;/a&gt;&lt;/p&gt;
        &lt;img src=&quot;https://blog.bpugh.workers.dev/cdn/images?p=/subscribe/feed&quot;&gt;
      </description>
    </item>
    
  </channel>
</rss>
