Tag Archives: match

各家 glob 的效能...

在「Glob Matching Can Be Simple And Fast Too」這邊看到在分析 (a.*)nb 這樣的 pattern 的效能 (像是 a.*a.*a.*b 這樣的東西),第一波先測 shell,結果發現有趣的現象: 那個 csh 是怎麼了 XDDD Looking at the source code, it doesn’t attempt to perform glob expansion itself. Instead it calls the C library implementation … Continue reading

Posted in Computer, Murmuring, Programming, Security, Software | Tagged , , , , , , , , , | Leave a comment

GitHub 提供更輕量的 Commit Reference SHA-1 API

GitHub 提供了新的 API 讓 client 可以更省網路資源,同時 GitHub 本身也可以省下 query。雖然是 Preview 期間,但已經有專案開始用了:「Commit Reference SHA-1 Preview Period」。 本來是這樣抓: curl "https://api.github.com/repos/Homebrew/homebrew/commits/master" \ -H "Accept: application/vnd.github.chitauri-preview+sha" 現在則可以加上 If-None-Match: curl "https://api.github.com/repos/Homebrew/homebrew/commits/master" \ -H "Accept: application/vnd.github.chitauri-preview+sha" \ -H "If-None-Match: \"814412cfbd631109df337e16c807207e78c0d24e\"" 當本地與遠端的 SHA-1 值一樣時會收到 304,而且不會吃 rate limit … Continue reading

Posted in Computer, Murmuring, Network, Programming, WWW | Tagged , , , , , , , , , , | Leave a comment