A git hook is a script in the .git directory of a git repo on your machine.
They run during various git operations. The important detail to understand about
hooks is that they do not get installed locally when you clone a repo. A newly
cloned repo never has active hooks. Hooks have to be enabled after cloning,
usually by you.
The attack Frank saw was dangerous because it wasn’t a cloned repo: it was a
local checkout that had hooks installed then shared as a Dropbox folder. So
when it landed on Frank’s machine, the hooks were active without him realizing
it.
继续阅读全文
为了尊重作者,这里只展示开头几段。你可以去原文阅读,或者在 HorizonReader 里读:划线做笔记、让 AI 帮忙。
AI 摘要The article describes fixing a long-tail bug in the author's 'human sorting' function, where file names containing numeric runs longer than Python's 4300-digit int conversion limit (added in 2022 to prevent denial-of-service attacks) caused a TypeError because ValueError was misinterpreted as 'not a number.' The fix converts only the digit parts identified by re.split, returning float('inf') for over-long digit runs, while noting that isdigit()-based approaches fail due to Unicode discrepancies with the \d regex. A later update presents Jeff Epler's cleverer alternatives, including parsing digit runs as base 16 (which has no length limit and sorts identically) or using (length, value) tuples, though the author hasn't benchmarked them.
AI 摘要To celebrate Nat's 37th birthday, the family hosted a cupcake-baking party at his group home, bringing box mixes, sugar-free options for his diabetic housemate, and decorating supplies so all the housemates could join in. Everyone wore aprons and chef's hats, helped mix and bake, and decorated cupcakes—surprisingly all choosing vanilla icing—though the family forgot candles and singing 'Happy Birthday.' Reflecting on the day, the author expresses gratitude that Nat has found a warm living situation where the housemates feel like family and the staff like friends.
AI 摘要The author describes blog features they built: since old technical posts may contain outdated details, posts older than five years automatically display human-style age descriptions like 'nearly 12 years' followed by a 'Be careful' warning. Posts that never go stale can be marked 'evergreen,' replacing the warning with 'but it's still good,' which the author recently made customizable per post. They conclude that owning their own site lets them create small, seemingly pointless features that bring them joy.
AI 摘要The article describes the 'Expert Asterisk,' a common pattern in online help discussions where experts assisting beginners add obscure, rarely-used details and tangents that distract learners from their original questions. Using a git help exchange as an example, the author shows how such additions—while well-intentioned and potentially useful to advanced users—can derail a novice who lacks the context to sift important information from esoteric footnotes. The author advises experts to resist the urge to add tangents, instead focusing on understanding the beginner's actual situation and mindset so their help can truly be heard.
AI 摘要The author describes their 'Silence is Golden' lightning talk at PyCon US 2026, whose message is to leave quiet time in discussions so reluctant speakers have a chance to participate. As someone who speaks easily, the author admits they must consciously remind themselves to hold back and create space for others. They were pleased to extend the well-known Pac-Man Rule from space to time, giving the talk an engaging hook rather than just a lecture.