Skip to content

Instantly share code, notes, and snippets.

@misterhay
Last active November 4, 2019 16:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save misterhay/97119a75d67c0070481a747176dd108b to your computer and use it in GitHub Desktop.
Save misterhay/97119a75d67c0070481a747176dd108b to your computer and use it in GitHub Desktop.
Create a Colab link for notebook from GitHub
javascript:(function(){var url=location.href;var res=url.split("github.com/");var site=res[1];colabGitUrl="https://colab.research.google.com/github/"+site;window.prompt("Colab gitpuller link",colabGitUrl);})();
@misterhay
Copy link
Author

misterhay commented Oct 30, 2019

var url = location.href;
var res = url.split("github.com/");
var site = res[1];
colabGitUrl = "https://colab.research.google.com/github/" + site;
window.prompt("Colab gitpuller link",colabGitUrl);

@misterhay
Copy link
Author

If you prefer a bookmarklet that just opens the notebook in Colab:

javascript:(function(){var url=location.href;var res=url.split("github.com/");var site=res[1];colabGitUrl="https://colab.research.google.com/github/"+site;window.open(colabGitUrl);})();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment