Note di Matteo


#dev

GitHub ha un nuovo capo prodotto, Jared Palmer, ex Vercel, e dice che GitHub implementerà le stacked PR/stacked diff (stile Graphite.dev):

RE: Stacked Diffs on @GitHub

After discussion w @ttaylorr_b, we can implement stacked PRs/PR groups already (in fact we kind of do with Copilot) but restacking (automatically fanning out changes from the bottom of the the stack upwards) would be wildly inefficient. To do it right, we need to migrate @GitHub to use git reftables instead of packed-refs so that multi-ref updates / restacking will be O(n) instead of ngmi.

This will take some time but has been greenlit.

Molto interessante!

#91 /
21 ottobre 2025
/
15:19
/ #dev



GitHub Pages infrastructure

GitHub Pages, our static site hosting service, has always had a very simple architecture. From launch up until around the beginning of 2015, the entire service ran on a single pair of machines (in active/standby configuration) with all user data stored across 8 DRBD backed partitions. Every 30 minutes, a cron job would run generating an nginx map file mapping hostnames to on-disk paths.

There were a few problems with this approach: new Pages sites did not appear until the map was regenerated (potentially up to a 30-minute wait!); cold nginx restarts would take a long time while nginx loaded the map off disk; and our storage capacity was limited by the number of SSDs we could fit in a single machine.

Despite these problems, this simple architecture worked remarkably well for us — even as Pages grew to serve thousands of requests per second to over half a million sites.

Hailey Somerville sul blog GitHub.

#83 /
18 ottobre 2025
/
13:28
/ #dev#cloud

Lavorare con Safari è una pena:

  • i cookie Secure non vanno su localhost perché Safari non supporta Secure Context come gli altri browser.
  • i sottodomini di localhost non funzionano fino a macOS 26, da cui starò alla larga per un po'.
  • nella scheda Storage -> Cookies non si vedono i cookie di terze parti o dei sottodomini??? come in tutti gli altri browser.
  • al momento non riesco a far funzionare un semplice cookie SameSite=Lax del tutto, su localhost con HTTPS. Nella risposta c'è, ma non lo salva. Con gli altri browser funziona.
  • ok, non sono l'unico. Rinuncio.
#82 /
18 ottobre 2025
/
10:08
/ #dev#security#browser

Defunte definitivamente quasi tutte le iniziative di Chrome per uccidere i cookie di terze parti (Privacy Sandbox), restano solo i cookie partizionati e poco altro:

CHIPS and FedCM, which improve cookie privacy and security and streamline identity flows respectively, have seen broad adoption, including support from other browsers. We'll continue to support those APIs and evaluate opportunities for future enhancements. We'll also maintain Private State Tokens and explore additional approaches to help developers reduce fraud and abuse.

After evaluating ecosystem feedback about their expected value and in light of their low levels of adoption, we've decided to retire the following Privacy Sandbox technologies: Attribution Reporting API (Chrome and Android), IP Protection, On-Device Personalization, Private Aggregation (including Shared Storage), Protected Audience (Chrome and Android), Protected App Signals, Related Website Sets (including requestStorageAccessFor and Related Website Partition), SelectURL, SDK Runtime and Topics (Chrome and Android). We will follow Chrome and Android processes for phasing out these technologies and share updates on our developer site.

#81 /
18 ottobre 2025
/
09:46
/ #dev#security#browser

TIL in PostgreSQL ALTER DEFAULT PRIVILEGES si applica solo agli oggetti creati dal ruolo che ha creato i default privileges. Di default è il ruolo attualmente connesso, ma si può specificare:

ALTER DEFAULT PRIVILEGES
FOR ROLE prod_dmarcwise
IN SCHEMA public
GRANT SELECT ON TABLES TO prod_pgdump;
#79 /
17 ottobre 2025
/
09:36
/ #dev#database

SameSite e protezione CSRF con Sec-Fetch-Site

Un po' di risorse sulle tecniche moderne per la protezione da CSRF:

#75 /
16 ottobre 2025
/
21:34
/ #dev#security#browser

TIL Argon2 per le password non è più sicuro di bcrypt come si pensa:

[...] Me (@jmgosney) and @Sc00bzT were both on the experts panel for the Password Hashing Competition, and both of us will tell you not to use Argon2 for password hashing. It is weaker than bcrypt at runtimes < 1000 ms.

Yep, we basically completely failed. We set out to identify The One True PHF and instead we selected yet another KDF. We also placed way too much emphasis on "memory hardness" when we should have been emphasizing "cache hardness."

@TerahashCorp

Bottom line, if you're already using argon2, you're totally fine. It's still a good PHF and much better than most everything out there. But if you aren't using argon2, bcrypt is a better choice.

@jmgosney

#69 /
14 ottobre 2025
/
21:07
/ #dev#security

Cache-Control for Civilians è un classico must-read (ancora attuale e ancora aggiornato) per chi vuole imparare una volta per tutti gli header per gestire la cache HTTP.

#68 /
14 ottobre 2025
/
11:41
/ #dev#cdn#http

TIL ora JavaScript ha una funzione nativa groupBy() e non serve più usare reduce(). Mini guida qui.

#67 /
14 ottobre 2025
/
11:39
/ #dev#javascript


Vite: The Documentary: un documentario su Vite con molte persone chiave dell'ecosistema JavaScript, interessante!

#62 /
11 ottobre 2025
/
21:09
/ #dev

HTTP/1.1 must die

Ho trovato questa recente iniziativa, HTTP/1.1 must die, secondo cui il rischio di HTTP smuggling è troppo alto e quindi bisognerebbe migrare verso HTTP/2 per gli upstream nei reverse proxy.

Per contesto (dal paper):

HTTP/1.1 has a fatal, highly-exploitable flaw - the boundaries between individual HTTP requests are very weak. Requests are simply concatenated on the underlying TCP/TLS socket with no delimiters, and there are multiple ways to specify their length. This means attackers can create extreme ambiguity about where one request ends and the next request starts.

HTTP/2 non soffre di questo problema:

HTTP/2 is not perfect - it's significantly more complex than HTTP/1, and can be painful to implement. However, upstream HTTP/2+ makes desync vulnerabilities vastly less likely. This is because HTTP/2 is a binary protocol, much like TCP and TLS, with zero ambiguity about the length of each message.

E il problema si può presentare anche se il client usa HTTP/2, proprio per via dei reverse proxy:

Servers and CDNs often claim to support HTTP/2, but actually downgrade incoming HTTP/2 requests to HTTP/1.1 for transmission to the back-end system, thereby losing most of the security benefits.

Come risolvere:

First, ensure your origin server supports HTTP/2. Most modern servers do, so this shouldn't be a problem.

Next, toggle upstream HTTP/2 on your proxies. I've confirmed this is possible on the following vendors: HAProxy, F5 Big-IP, Google Cloud, Imperva, Apache (experimental), and Cloudflare (but they use HTTP/1 internally).

Unfortunately, the following vendors have not yet added support for upstream HTTP/2: nginx, Akamai, CloudFront, Fastly.

#54 /
8 ottobre 2025
/
20:22
/ #dev#cdn#http

GitHub si sposta su Microsoft Azure:

Vladimir Fedorov, GitHub’s chief technology officer, made the Azure migration announcement internally earlier this week, noting that GitHub is currently struggling with data center capacity. GitHub is currently hosted on the company’s own hardware, centrally located in Virginia. “We are constrained on data server capacity with limited opportunities to bring more capacity online in the North Virginia region,” Fedorov writes in a note to GitHub employees, or GitHubbers as they’re known internally.

To ensure the move to Azure is completed within 12 months, GitHub’s leadership team is asking employees to delay new features in favor of the Azure migration. “We will be asking teams to delay feature work to focus on moving GitHub,” Fedorov says. [...]

GitHub is now aiming to move fully off its own data centers within two years. This gives GitHub 18 months to execute its migration, with a six-month buffer for any delays. Most of the work will be completed over the next 12 months, according to Fedorov.

Magari è la volta buona che abilitano IPv6.

(The Verge)

#53 /
8 ottobre 2025
/
20:07
/ #microsoft#dev#cloud#datacenter

swot. Una lista di domini di università e scuole mantenuta da JetBrains con lo scopo di permettere l'automatizzazione degli sconti studenti.

#46 /
6 ottobre 2025
/
09:29
/ #dev

TIL gli Heisenbug:

In computer programming jargon, a heisenbug is a software bug that seems to disappear or alter its behavior when one attempts to study it. The term is a pun on the name of Werner Heisenberg, the physicist who first asserted the observer effect of quantum mechanics, which states that the act of observing a system inevitably alters its state. In electronics, the traditional term is probe effect, where attaching a test probe to a device changes its behavior.

#44 /
5 ottobre 2025
/
15:47
/ #dev

"Google is a tech island"

Google’s infrastructure is distinct from every other tech company because it’s all completely custom: not just the infra, but also the dev tools. Google is a tech island, and engineers joining the tech giant can forget about tools they’re used to – GitHub, VS Code, Kubernetes, etc. Instead, it’s necessary to use Google’s own version of the tool when there’s an equivalent one.

(The Pragmatic Engineer)

#40 /
4 ottobre 2025
/
17:57
/ #google#dev

ffmpeg con FDK AAC, AV1 e SRT:

brew tap homebrew-ffmpeg/ffmpeg
brew install homebrew-ffmpeg/ffmpeg/ffmpeg --HEAD --with-fdk-aac --with-svt-av1 --with-srt
#39 /
4 ottobre 2025
/
17:21
/ #video#dev

← Precedente Pagina 2 di 2