Re:Github1s – One second to read GitHub code with VS Code
by madeofpalk on Wednesday February 10, 2021 @04:31AM
(#26087162)
Maybe the shortcut is different in the browser on macOS, but on Windows CTRL + P just works for searching the project, like it does in VSCode proper on desktop.
I quickly did ctrl + shift + f to search as well and it worked well
Re:Github1s – One second to read GitHub code with VS Code
by bewareandaware on Wednesday February 10, 2021 @04:50AM
(#26087290)
It looks like it works for previously opened files. Perhaps the author didn't want to load the whole tree into the browser, or maybe its a limitation on webhosted vscode?
Re:Github1s – One second to read GitHub code with VS Code
by thw0rted on Monday February 15, 2021 @05:35AM
(#26141335)
I suspect that the author didn't want to eager-load all files because the API they're using is rate-limited -- 60 requests/hr when unauthenticated, or 5000/hr if you generate a unique OAuth token. Even that 5k could get burned through pretty quickly for a larger repo, assuming you have to make at least one request per file.
To implement this quickly client-side, one easy way would be to use jsdelivr's data api. For example, to get the directory tree for Ruby on Rails:
https://data.jsdelivr.com/v1/package/gh/rails/rails@06e8d5c2...