atlas news
    
Peterbe
17  mars     13h58
How do you thousands-comma AND whitespace format a f-string in Python
   Use my large integer:
14  mars     20h24
Leibniz formula for Ï in Python, JavaScript, and Ruby
   Different ways to calculate the value of Ï using the Leibniz formula
02  mars     21h04
Notes on porting a Next.js v14 app from Pages to App Router
   Unfortunately, the app I ported from using the Pages Router to using App Router, is in a private repo. It’s a Next.js static site SPA Single Page App . It’s built with npm run build and then exported so that the out directory is the only thing I need to ship to the CDN and it just works. There’s...
14  février     03h09
How to avoid a count query in Django if you can
   Suppose you have a complex Django QuerySet query that is somewhat costly in other words slow . And suppose you want to return: The first N results A count of the total possible results So your implementation might be something like this: def get results queryset, fields, size : count ...
08  février     17h53
How to restore all unstaged files in with git
   git restore .
19  janvier     14h01
How slow is Node to Brotli decompress a file compared to not having to decompress?
   tl;dr; Not very slow.
30  décembre     17h40
Search hidden directories with ripgrep, by default
   I encourage you to set alias rg ’rg hidden’ to make ripgrep always find hidden files
28  décembre     01h05
fnm is much faster than nvm.
   fnm is much faster than nvm and the transition is easy
05  octobre     13h51
Comparing different efforts with WebP in Sharp
   When you, in a Node program, use sharp to convert an image buffer to a WebP buffer, you have an option of effort. The higher the number the longer it takes but the image it produces is smaller on disk. I wanted to put some realistic numbers for this, so I wrote a benchmark, run on my Intel...
04  octobre     17h14
Zipping files is appending by default - Watch out
   zip r my.zip some directory will, by default, append the stuff in some directory