When you find a great project on GitHub, you want to read the code and learn from it. Possibly, you will clone the repo to your computer, and use a editor to open the project. You will found a lot of errors, because the project has many dependency.
Sometimes you just want to read the code, instead of run it on your computer. What should you do?
Here I'd like to recommend a Chrome extension name sourcegraph.
Once you installed the extension, you can see a icon When you open a GitHub repo with Chrome:
Click this icon, you will see more details:
You can search the snippet you want just in browser. It's very useful that you can have a preview of the code, then you can decide whether you want to clone it to your computer.
You can click on the left panel to display the code directly.
You can directly locate the code. Doing such things on your browser. That's amazing, right?
This avoids the trouble of cloning it locally to learn the code, and then generating various errors due to the environment configuration.
Besides, you can also install many
(sounds like you are doing something recursively).
extensions on this extension
You can also download a file on Github repo separately! I think this function is awesome. You don't need to download the entire repo for one file.
Hope you will like it!