Peter Bengtsson's Avatar

Peter Bengtsson

@peppebe.bsky.social

Web developer at GitHub. Blogs at https://www.peterbe.com From Sweden but lives in South Carolina, USA.

46 Followers  |  30 Following  |  34 Posts  |  Joined: 07.02.2025  |  1.7476

Latest posts by peppebe.bsky.social on Bluesky

Preview
gg2 - a new CLI for helping me manage git branches - Peterbe.com gg2 is an executable CLI to help with tedious git commands for power users.

Blogged about a new CLI tool I've started hacking on.
www.peterbe.com/plog/gg2-ini...

What I think is neat is that I use `bun build --compile ...` to generate a single executable instead of relying on something like `bunx` or `pipx`.

06.08.2025 15:11 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Post image

Been a good start to the month!
Page views on my blog.

15.07.2025 12:28 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Preview
Native connection pooling in Django 5 with PostgreSQL - Peterbe.com Enabling native connection pooling in Django 5 gives me a 5.4x speedup.

Native connection pooling in Django v5 gives a 5x speedup.
www.peterbe.com/plog/native-...

26.06.2025 04:55 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Peterbe.com - Stuff in Peter's head Peterbe.com is the personal website and blog of Peter Bengtsson.

Native connection pooling in Django 5 with PostgreSQL - Peterbe.com

5x more requests-per-second improvement with this one single trick. Actually.

26.06.2025 01:03 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Preview
Video to screenshots app - Peterbe.com

Blog post about it here

www.peterbe.com/plog/video-t...

24.06.2025 00:11 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

Maybe a fun experiment, would be to try to load ffmpeg in Wasm and see what can be done.

24.06.2025 00:11 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0
Preview
GitHub - peterbe/video-to-screenshots: A web app to turn a video file into screenshots without a server A web app to turn a video file into screenshots without a server - peterbe/video-to-screenshots

I made an app!

github.com/peterbe/vide...

Itโ€™s simple but useful. Wanted to explore what can be done with video files without sending them to a server.

24.06.2025 00:11 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

Iโ€™m going to try a new IDE/editor.
What would you recommend? Zed or Cursor?

I loved Zed when it came out but downfall was that I couldnโ€™t add custom completion macros.

07.05.2025 20:19 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Redis is open source again - <antirez>

Yay for Redis v8!
antirez.com/news/151

01.05.2025 17:25 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

This is what I use to have GitHub Dependabot make package updates for Bun projects:
```
version: 2
enable-beta-ecosystems: true
updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "monthly"
```

01.05.2025 17:18 โ€” ๐Ÿ‘ 1    ๐Ÿ” 1    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Post image Post image

`links` is my favorite tool for testing if web pages work without CSS or JS.

27.04.2025 15:00 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Preview
How to SSG a Vite SPA - Peterbe.com You can write a script to statically generate the HTML of a SPA to make the initial load feel faster.

Self-posting my latest blog post. It's not about AI.
www.peterbe.com/plog/ssg-vit...

27.04.2025 14:58 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0
BREAKING: Guido van Rossum Returns as Python's BDFL
YouTube video by Honeypot BREAKING: Guido van Rossum Returns as Python's BDFL

Can't wait!
www.youtube.com/watch?v=wgxB...

01.04.2025 18:08 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Post image

Thisโ€™ll be wet

31.03.2025 22:49 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Preview
626. Ten Myths About the U.S. Tax System Freakonomics Radio ยท Episode

One of the most educative podcast episodes out there on US tax policy.
It's not partisan, although it (has to) touches politics. It's more about understanding and it's delivered in a 1h rapid chat. I'm impressed.
open.spotify.com/episode/0Zrw...

17.03.2025 11:51 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Docs Docs: Your new companion to collaborate on documents efficiently, intuitively, and securely.

This is cool!
docs.numerique.gouv.fr
It's like Google Docs but all Open Source and backed by the French and German government.
Skimmed the code; it's Python/Django on the backend and React on the frontend.

I hope this becomes successful!

16.03.2025 17:37 โ€” ๐Ÿ‘ 2    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

I sent this seconds before I noticed a bug in how it updates `uv.lock`. Actively chatting with the people behind this but a fix might have to wait a bit.

Happy to pass along issues/bugs you might find.

14.03.2025 18:57 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Preview
Dependabot version updates now support uv in general availability ยท GitHub Changelog Dependabot version updates now support uv in general availability

For fellow `uv` fans,
github.blog/changelog/20...

You'll need to update your `.github/dependabot.yml` like this
github.com/peterbe/djan...

#python

14.03.2025 18:47 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0
Preview
Spot the Difference A web app game for finding a difference between two snippets of code

Spot the Difference Stats
spot-the-difference.peterbe.com/stats

It now compares your (best) times with the median number of seconds people take.

Need more plays though! So the medians start to make sense :)

04.03.2025 13:13 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

Less well. The โ€œtraining dataโ€ is a massive list of English food words.

25.02.2025 23:37 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Preview
Announcing: Spot the Difference - Peterbe.com Spot the Difference is a web app where you're shown two snippets of code and you're supposed to find the one difference. If you get it right, you get showered in confetti.

I made a fun web app game.
www.peterbe.com/plog/announc...

Please come up with fun and whimsical ideals to make it more fun.

24.02.2025 12:44 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0
Video thumbnail

Adding items to the grocery shopping list by taking a picture from the cookbook.

thatsgroce.web.app

22.02.2025 15:33 โ€” ๐Ÿ‘ 2    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0
Video thumbnail

Adding items to the grocery shopping list by speech.

thatsgroce.web.app

22.02.2025 15:32 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

I recently rewrote my personal website/blog from Remix to React Router v7.

It was moderately easy and fun. But now I'm dreading the hard work of writing a retrospective blog post about it.

At the time of actual coding, it felt like an engineering feat. Now it feels more like a chore to write up.

20.02.2025 17:26 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Preview
Spot the Difference

spot-the-difference.peterbe.com is now using Dexie.js for storage.

20.02.2025 12:53 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

In other words, Mitchell Baker is "ends her tenure"

20.02.2025 12:46 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

โฏ uv cache prune
Pruning cache at: /Users/peterbe/.cache/uv
Removed 98902 files (1.2GiB)

โฏ du -sh `uv cache dir`
43M /Users/peterbe/.cache/uv

20.02.2025 12:44 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

โฏ du -sh `uv cache dir`
1.4G /Users/peterbe/.cache/uv

What you got?

20.02.2025 12:43 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

Is this some sort of Apple Watch app?

20.02.2025 12:41 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0
Preview
feat: support for brotli by bjohansebas ยท Pull Request #194 ยท expressjs/compression The changes from #172 are brought in, with the exception of using the accept negotiation logic.

If you use `compression` in your Express server, it now supports Brotli as of github.com/expressjs/co...

No more need to pull in `@nitedani/shrink-ray-current`

18.02.2025 16:46 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

@peppebe is following 20 prominent accounts