Congratulations!

[Valid RSS] This is a valid RSS feed.

Recommendations

This feed is valid, but interoperability with the widest range of feed readers could be improved by implementing the following recommendations.

Source: http://www.peterbe.com/rss.xml

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Peterbe.com</title><link>http://www.peterbe.com/rss.xml</link><description>Stuff in Peter's head</description><atom:link href="http://www.peterbe.com/rss.xml" rel="self"/><language>en-us</language><lastBuildDate>Wed, 03 Sep 2025 15:08:07 +0000</lastBuildDate><item><title>How to count the number of non-blank lines with Bash</title><link>http://www.peterbe.com/plog/how-to-count-the-number-of-non-blank-lines-with-bash</link><description>You can use `awk 'NF &gt; 0'` to filter blank lines before piping to `wc` to filter out blank lines.</description><pubDate>Wed, 03 Sep 2025 15:08:07 +0000</pubDate><guid>http://www.peterbe.com/plog/how-to-count-the-number-of-non-blank-lines-with-bash</guid></item><item><title>gg commit with suggested --no-verify</title><link>http://www.peterbe.com/plog/gg-commit-with-suggested-no-verify</link><description>&lt;p&gt;In version &lt;a href="https://github.com/peterbe/gg2/releases/tag/v0.0.11"&gt;0.0.11&lt;/a&gt; of &lt;a href="https://github.com/peterbe/gg2"&gt;gg&lt;/a&gt; you can now type &lt;code&gt;gg commit Bla bla&lt;/code&gt; and it will try to commit but if that fails, it will ask you one more time, if you want to re-attempt to commit but with &lt;code&gt;--no-verify&lt;/code&gt;.&lt;/p&gt;
  3. &lt;p&gt;For example:&lt;/p&gt;
  4. &lt;pre&gt;&lt;code class="hljs"&gt;
  5. $ gg commit This is my commit message
  6. ❌ file has formatting problems
  7. Commit failed and you did not use --no-verify.
  8. ? Try again but with --no-verify? (y/N)
  9. &lt;/code&gt;&lt;/pre&gt;
  10.  
  11. &lt;p&gt;(&lt;em&gt;see screenshots below where color makes these things more intuitive&lt;/em&gt;)&lt;/p&gt;
  12. &lt;p&gt;This is handy when you know that the &lt;code&gt;.git/hooks/pre-commit&lt;/code&gt; might be failing for a reason that is actually not a problem &lt;em&gt;after&lt;/em&gt; you've committed.&lt;/p&gt;
  13. &lt;p&gt;In a sample repo I have:&lt;/p&gt;
  14. &lt;pre&gt;&lt;code class="hljs"&gt;
  15. $ &lt;span class="hljs-built_in"&gt;cat&lt;/span&gt; .git/hooks/pre-commit
  16. &lt;span class="hljs-comment"&gt;#!/bin/sh&lt;/span&gt;
  17.  
  18. &lt;span class="hljs-built_in"&gt;echo&lt;/span&gt; &lt;span class="hljs-string"&gt;&amp;quot;❌ Rejecting all commits like an angry troll&amp;quot;&lt;/span&gt;
  19. &lt;span class="hljs-built_in"&gt;exit&lt;/span&gt; 1
  20. &lt;/code&gt;&lt;/pre&gt;
  21.  
  22. &lt;p&gt;And when I use &lt;code&gt;gg commit ...&lt;/code&gt; this happens:&lt;/p&gt;
  23. &lt;p&gt;&lt;a href="/cache/5a/45/5a45eeb1b7d7baebdc9d07e6eb652fc8.png"&gt;&lt;img src="/cache/ff/ff/ffff529524b78fb3a84267679f8519ee.png" alt="Prompt"  width="370" height="90"&gt;&lt;/a&gt;&lt;/p&gt;
  24. &lt;p&gt;&lt;a href="/cache/67/10/671041199ffb99018237b945e483c761.png"&gt;&lt;img src="/cache/87/0e/870e49b633d6cddde804121623bd08e1.png" alt="Said y for Yes"  width="370" height="147"&gt;&lt;/a&gt;&lt;/p&gt;</description><pubDate>Fri, 29 Aug 2025 18:37:45 +0000</pubDate><guid>http://www.peterbe.com/plog/gg-commit-with-suggested-no-verify</guid></item><item><title>Faster way to sum an integer series in Python</title><link>http://www.peterbe.com/plog/faster-way-to-sum-an-integer-series-in-python</link><description>You can sum a simple series with `n(n+1)/2`</description><pubDate>Thu, 28 Aug 2025 12:11:22 +0000</pubDate><guid>http://www.peterbe.com/plog/faster-way-to-sum-an-integer-series-in-python</guid></item><item><title>Find GitHub Pull Request by commit SHA</title><link>http://www.peterbe.com/plog/find-github-pull-request-by-commit-sha</link><description>You can find the PR by searching for any of its SHA commits</description><pubDate>Thu, 21 Aug 2025 11:38:23 +0000</pubDate><guid>http://www.peterbe.com/plog/find-github-pull-request-by-commit-sha</guid></item><item><title>Always run biome migrate after upgrading biome</title><link>http://www.peterbe.com/plog/always-run-biome-migrate-after-upgrading-biome</link><description>Use postinstall in your package.json to automatically keep your biome.json up to date when @biomejs/biome is upgraded</description><pubDate>Sat, 16 Aug 2025 16:08:34 +0000</pubDate><guid>http://www.peterbe.com/plog/always-run-biome-migrate-after-upgrading-biome</guid></item><item><title>gg shell completion</title><link>http://www.peterbe.com/plog/gg-shell-completion</link><description>gg now support shell completions in Bash and Zsh</description><pubDate>Wed, 13 Aug 2025 12:44:06 +0000</pubDate><guid>http://www.peterbe.com/plog/gg-shell-completion</guid></item><item><title>Combining Django signals with in-memory LRU cache</title><link>http://www.peterbe.com/plog/combining-django-signals-with-in-memory-lru-cache</link><description>It's easy to combine functools.lru_cache with Django signals to get a good memoization pattern on Django ORM queries.</description><pubDate>Sat, 09 Aug 2025 18:33:43 +0000</pubDate><guid>http://www.peterbe.com/plog/combining-django-signals-with-in-memory-lru-cache</guid></item><item><title>gg2 - a new CLI for helping me manage git branches</title><link>http://www.peterbe.com/plog/gg2-initial</link><description>gg2 is an executable CLI to help with tedious git commands for power users.</description><pubDate>Wed, 06 Aug 2025 08:55:30 +0000</pubDate><guid>http://www.peterbe.com/plog/gg2-initial</guid></item><item><title>Bot traffic hitting my blog</title><link>http://www.peterbe.com/plog/bot-traffic-hitting-my-blog</link><description>&lt;p&gt;I have a simple blog. It dates back years. Most things are about technology but I also have a popular &lt;a href="/plog/blogitem-040601-1"&gt;blog post about finding song by lyrics&lt;/a&gt; which gets the lion share of the traffic.&lt;/p&gt;
  25. &lt;p&gt;I have implemented my own analytics of incoming traffic:&lt;/p&gt;
  26. &lt;ol&gt;
  27. &lt;li&gt;Every request that comes to the backend server gets logged in PostgreSQL  &lt;/li&gt;
  28. &lt;li&gt;When you view any page, an async XHR request is made and that's also logged in PostgreSQL&lt;/li&gt;
  29. &lt;/ol&gt;
  30. &lt;p&gt;Most traffic terminates at the CDN. Most likely, when you're reading this page right now it never renders on my server but is served straight from the CDN, but it will send an XHR request to my analytics backend, which in a sense becomes a measure that you're in a real regular browser that supports JavaScript.&lt;/p&gt;
  31. &lt;p&gt;One thing I noticed is that the request &lt;code&gt;User-Agent&lt;/code&gt; of the incoming requests that come in, appear to be some sort of bot that is &lt;em&gt;not&lt;/em&gt; Googlebot, which &lt;em&gt;used&lt;/em&gt; to dominate the traffic on my blog.&lt;/p&gt;
  32. &lt;p&gt;&lt;a href="/cache/ed/5a/ed5ad8259eedf0b173d5e63f82152b77.png"&gt;&lt;img src="/cache/ed/5a/ed5ad8259eedf0b173d5e63f82152b77.png" alt="Bot Agent Requests" width="100%"&gt;&lt;/a&gt;&lt;/p&gt;
  33. &lt;p&gt;Notables:&lt;/p&gt;
  34. &lt;ul&gt;
  35. &lt;li&gt;Claude's bot makes a ton of traffic!&lt;/li&gt;
  36. &lt;li&gt;OpenAI appears to have two bots ("gptbot" and "searchbot") and it's large&lt;/li&gt;
  37. &lt;li&gt;What on earth is that Facebook crawler doing? Is it crawling for training Meta's LLMs?&lt;/li&gt;
  38. &lt;li&gt;What is this Amazonbot and why is it making as much traffic as Googlebot?&lt;/li&gt;
  39. &lt;/ul&gt;
  40. &lt;h3 id="javascript-or-not"&gt;&lt;a class="toclink" href="#javascript-or-not"&gt;JavaScript or not&lt;/a&gt;&lt;/h3&gt;
  41. &lt;p&gt;At the time of writing this, I had only recently started tracking the &lt;code&gt;User-Agent&lt;/code&gt; of pageviews so I can't compare historical numbers. But generally it seems only ~1% of pageviews is by a bot user agent, whereas direct server-side traffic to the server, ~66% is from a bot agent.&lt;/p&gt;
  42. &lt;p&gt;&lt;a href="/cache/84/88/8488c0c71cb1ee540c6497984c243012.png"&gt;&lt;img src="/cache/84/88/8488c0c71cb1ee540c6497984c243012.png" alt="Is bot in pageviews vs requests" width="100%"&gt;&lt;/a&gt;&lt;/p&gt;
  43. &lt;p&gt;That means that a lot of the bots don't render the page with JavaScript. Or rather, perhaps they do but they have some provision in there so as to not trigger XHR requests to my analytics (which is implemented with &lt;code&gt;sendBeacon&lt;/code&gt;).&lt;/p&gt;
  44. &lt;p&gt;The reason for the "-16.5%" drop was because I recently implemented a fix to redirect traffic that bypassed the CDN and went straight to the backend.&lt;/p&gt;</description><pubDate>Wed, 09 Jul 2025 13:07:48 +0000</pubDate><guid>http://www.peterbe.com/plog/bot-traffic-hitting-my-blog</guid></item><item><title>Native connection pooling in Django 5 with PostgreSQL</title><link>http://www.peterbe.com/plog/native-connection-pooling-django-5-pg</link><description>Enabling native connection pooling in Django 5 gives me a 5.4x speedup.</description><pubDate>Wed, 25 Jun 2025 21:36:32 +0000</pubDate><guid>http://www.peterbe.com/plog/native-connection-pooling-django-5-pg</guid></item></channel></rss>

If you would like to create a banner that links to this page (i.e. this validation result), do the following:

  1. Download the "valid RSS" banner.

  2. Upload the image to your own server. (This step is important. Please do not link directly to the image on this server.)

  3. Add this HTML to your page (change the image src attribute if necessary):

If you would like to create a text link instead, here is the URL you can use:

http://www.feedvalidator.org/check.cgi?url=http%3A//www.peterbe.com/rss.xml

Copyright © 2002-9 Sam Ruby, Mark Pilgrim, Joseph Walton, and Phil Ringnalda