<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
    <channel>
      <title>cblanken.dev - TIL</title>
      <link>https://www.cblanken.dev/til/</link>
      <description></description>
      <generator>Zola</generator>
      <language>en</language>
      <atom:link href="https://www.cblanken.dev/til/rss.xml" rel="self" type="application/rss+xml"/>
      <item>
          <title>Restore All Your Arch Packages</title>
          <pubDate>Fri, 19 Jun 2026 00:00:00 +0000</pubDate>
          <author>Cameron Blankenbuehler</author>
          <link>https://www.cblanken.dev/til/arch-restore-all-packages/</link>
          <guid>https://www.cblanken.dev/til/arch-restore-all-packages/</guid>
          <description xml:base="https://www.cblanken.dev/til/arch-restore-all-packages/">&lt;p&gt;About a week ago, I ran into some trouble with an update on my Arch Linux (btw) system. I ran a
regular &lt;code&gt;pacman -Syu&lt;&#x2F;code&gt; to sync all my packages via, but unfortunately, this update broke my desktop
environment, KDE PLasma. It can be quite a hassle to rollback individual packages and I wasn’t have
any luck at all. I even found someone with seemingly
&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;discuss.kde.org&#x2F;t&#x2F;arch-linux-kde-plasma-crash-after-upgrade&#x2F;46506&quot;&gt;the same issue&lt;&#x2F;a&gt;. I
suspend either there was in fact a breaking change for the newest version of KDE Plasma at the time
or my update corrupted some files. Either way, the solutions discussed there weren’t able to fix
whatever had broken my installation of KDE plasma.&lt;&#x2F;p&gt;
&lt;p&gt;Anyway, this little misadventure led me to discover that &lt;code&gt;pacman&lt;&#x2F;code&gt; via the
&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;archive.archlinux.org&quot;&gt;Arch Linux Archive&lt;&#x2F;a&gt; allows you to restore &lt;em&gt;all&lt;&#x2F;em&gt; of your packages to
the state they would have been on a particular date in the past. Meaning, if you know the date of
your last update when your system was functional, you can force &lt;code&gt;pacman&lt;&#x2F;code&gt; to sync with all the
packages on that date.&lt;&#x2F;p&gt;
&lt;p&gt;Basically, you set the target &lt;code&gt;Server&lt;&#x2F;code&gt; in your &lt;code&gt;pacman.conf&lt;&#x2F;code&gt; to point to the archive. Like this:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#3C3836, #C5C9C5); background-color: light-dark(#FBF1C7, #181616);&quot;&gt;&lt;code data-lang=&quot;ini&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#9D0006, #B6927B);&quot;&gt;Server&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C6F64, #9E9B93);&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; https:&#x2F;&#x2F;archive.archlinux.org&#x2F;repos&#x2F;2026&#x2F;04&#x2F;30&#x2F;$repo&#x2F;os&#x2F;$arch&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;That URL points to the package archive as it was on 2026-04-30. Then you run &lt;code&gt;sudo pacman -Syyuu&lt;&#x2F;code&gt;
and wait with fingers crossed. Of course please read through the
&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;wiki.archlinux.org&#x2F;title&#x2F;Arch_Linux_Archive#Restore_all_packages_to_a_specific_date&quot;&gt;official directions&lt;&#x2F;a&gt;
on the wiki to get all the details.&lt;&#x2F;p&gt;
&lt;p&gt;Just be aware, the archive only maintains a few years of package history, but hopefully that will be
enough for you to restore your system to a functioning state and figure the rest from there.&lt;&#x2F;p&gt;
&lt;p&gt;Happy hacking!&lt;&#x2F;p&gt;
</description>
      </item>
      <item>
          <title>Faillock</title>
          <pubDate>Fri, 15 May 2026 00:00:00 +0000</pubDate>
          <author>Cameron Blankenbuehler</author>
          <link>https://www.cblanken.dev/til/faillock/</link>
          <guid>https://www.cblanken.dev/til/faillock/</guid>
          <description xml:base="https://www.cblanken.dev/til/faillock/">&lt;p&gt;After over eight years of using primarily Linux as my OS of choice, today was the first time that my system has locked me out for failed password attempts. It wasn’t that I had forgotten by password. I was simply in a hurry and made a typo three times in row, and, &lt;em&gt;apparently&lt;&#x2F;em&gt;, the &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;www.man7.org&#x2F;linux&#x2F;man-pages&#x2F;man8&#x2F;pam_faillock.8.html&quot;&gt;&lt;code&gt;pam_faillock.so&lt;&#x2F;code&gt; PAM module&lt;&#x2F;a&gt; is configured to lockout the user for &lt;em&gt;fifteen&lt;&#x2F;em&gt; minutes after three failed login attempts. At least on Arch Linux (btw) anyway.&lt;&#x2F;p&gt;
&lt;p&gt;If you’re like me, and think that lockout policy is just a &lt;em&gt;little&lt;&#x2F;em&gt; aggressive, then look no further. I’ll get you sorted. The default location for the &lt;code&gt;pam_faillock.so&lt;&#x2F;code&gt; module config is &lt;code&gt;&#x2F;etc&#x2F;security&#x2F;faillock.conf&lt;&#x2F;code&gt;, and in that file you’ll find an entry titled &lt;code&gt;deny&lt;&#x2F;code&gt; set to 3.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#3C3836, #C5C9C5); background-color: light-dark(#FBF1C7, #181616);&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# Deny access if the number of consecutive authentication failures&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# for this user during the recent interval exceeds n tries.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;# The default is 3.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;deny = 3&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Swap that sucker to a more agreeable number. I picked 10. The next time you restart your system, the new default will be set! If you’ve somehow locked a user session, but you still have access on the system as a root user then you can reset the lockout with the following command without needing to restart.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#3C3836, #C5C9C5); background-color: light-dark(#FBF1C7, #181616);&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#B57614, #8EA4A2);&quot;&gt;faillock&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8F3F71, #8A9A7B);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8F3F71, #8A9A7B);&quot;&gt;-user&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#79740E, #8A9A7B);&quot;&gt; YourUsername&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8F3F71, #8A9A7B);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8F3F71, #8A9A7B);&quot;&gt;-reset&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Happy hacking!&lt;&#x2F;p&gt;
</description>
      </item>
      <item>
          <title>Bootstrapping pip</title>
          <pubDate>Fri, 08 May 2026 00:00:00 +0000</pubDate>
          <author>Cameron Blankenbuehler</author>
          <link>https://www.cblanken.dev/til/ensurepip/</link>
          <guid>https://www.cblanken.dev/til/ensurepip/</guid>
          <description xml:base="https://www.cblanken.dev/til/ensurepip/">&lt;p&gt;Today I needed to setup &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;pypi.org&#x2F;project&#x2F;pip&#x2F;&quot;&gt;pip&lt;&#x2F;a&gt; in a python virtual environment inside a Docker container to quickly install a couple dependencies for testing without doing a full rebuild. Unfortunately, &lt;code&gt;pip&lt;&#x2F;code&gt; wasn’t included as a dependency for the docker container because additional python dependencies didn’t normally need to be installed during regular operation. But, luckily for us &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;xkcd.com&#x2F;353&#x2F;&quot;&gt;there’s a python package for that&lt;&#x2F;a&gt;. Enter stage left, &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;docs.python.org&#x2F;3&#x2F;library&#x2F;ensurepip.html&quot;&gt;ensurepip&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Activate your virtual environment wherever it resides e.g. &lt;code&gt;source .&#x2F;.venv&#x2F;bin&#x2F;active&lt;&#x2F;code&gt; and make a call to the &lt;code&gt;ensurepip&lt;&#x2F;code&gt; module with &lt;code&gt;python -m ensurepip&lt;&#x2F;code&gt;. You should get output that looks something like this:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#3C3836, #C5C9C5); background-color: light-dark(#FBF1C7, #181616);&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Looking in links: &#x2F;tmp&#x2F;tmpznyyt9jn&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Processing &#x2F;tmp&#x2F;tmpznyyt9jn&#x2F;pip-26.0.1-py3-none-any.whl&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Installing collected packages: pip&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;Successfully installed pip-26.0.1&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;There you go, &lt;code&gt;pip&lt;&#x2F;code&gt; ready and rarin’ to go&lt;&#x2F;p&gt;
</description>
      </item>
      <item>
          <title>IANA Protocol Registry</title>
          <pubDate>Mon, 16 Sep 2024 00:00:00 +0000</pubDate>
          <author>Cameron Blankenbuehler</author>
          <link>https://www.cblanken.dev/til/iana-protocols/</link>
          <guid>https://www.cblanken.dev/til/iana-protocols/</guid>
          <description xml:base="https://www.cblanken.dev/til/iana-protocols/">&lt;p&gt;If you’ve ever found yourself browsing through RFCs published by the
&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;www.ietf.org&quot;&gt;IETF&lt;&#x2F;a&gt;, you know it can be a bit of a chore if you’re
just researching some tag name or error code. You shouldn’t need to read
through the entire spec for a protocol just to do some troubleshooting. Right?
Well, here comes &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;www.iana.org&quot;&gt;IANA&lt;&#x2F;a&gt; to the rescue. IANA has
conveniently compiled a central repository for the many codes and numbers
contained in Internet protocols. You can find it at their &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;www.iana.org&#x2F;protocols&quot;&gt;protocol
registry&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Personally I was just looking for a &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;www.iana.org&#x2F;assignments&#x2F;dmarc-parameters&#x2F;dmarc-parameters.xhtml#tag&quot;&gt;simple
breakdown&lt;&#x2F;a&gt;
of all the tags available for DMARC. Of course, there’s also a &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;www.rfc-editor.org&#x2F;rfc&#x2F;rfc7489.html#section-11.4&quot;&gt;DMARC tag
registry table&lt;&#x2F;a&gt;
embedded in the &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;www.rfc-editor.org&#x2F;rfc&#x2F;rfc7489.html&quot;&gt;DMARC RFC (RFC
7489)&lt;&#x2F;a&gt;. But I was having trouble
wading through all 73 pages of the spec. So, in this case, it wasn’t really
necessary. However, for something like the &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;www.iana.org&#x2F;assignments&#x2F;mail-parameters&#x2F;mail-parameters.xhtml#mail-parameters-2&quot;&gt;SMTP service
extensions&lt;&#x2F;a&gt;,
it can be much more useful as the service extensions are spread across many
different RFCs.&lt;&#x2F;p&gt;
</description>
      </item>
      <item>
          <title>What is DMARC?</title>
          <pubDate>Tue, 03 Sep 2024 00:00:00 +0000</pubDate>
          <author>Cameron Blankenbuehler</author>
          <link>https://www.cblanken.dev/til/learning-dmarc/</link>
          <guid>https://www.cblanken.dev/til/learning-dmarc/</guid>
          <description xml:base="https://www.cblanken.dev/til/learning-dmarc/">&lt;p&gt;I’ve recently been trying to get a better handle on how email works and how
it’s secured. If you want to do the same. Go try out the exercises at
&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;www.learndmarc.com&quot;&gt;https:&#x2F;&#x2F;www.learndmarc.com&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;It’s a great resource for visualizing how DMARC works in conjuction with
&lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;datatracker.ietf.org&#x2F;doc&#x2F;html&#x2F;rfc7208&quot;&gt;Sender Policy Framework (SPF)&lt;&#x2F;a&gt;
and &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;datatracker.ietf.org&#x2F;doc&#x2F;html&#x2F;rfc4686&quot;&gt;Domain Keys Identified mail
(DKIM)&lt;&#x2F;a&gt; to secure email and
catch spam and phishing attempts.&lt;&#x2F;p&gt;
&lt;p&gt;There’s even a quiz you can try to see how well you can analyze email traffic
and determine the DMARC results.&lt;&#x2F;p&gt;
</description>
      </item>
    </channel>
</rss>
