Skip to content

Instantly share code, notes, and snippets.

@cadebrown
Created November 7, 2021 16:57
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 cadebrown/162b50f19fde0a2d957b893d1caf53b7 to your computer and use it in GitHub Desktop.
Save cadebrown/162b50f19fde0a2d957b893d1caf53b7 to your computer and use it in GitHub Desktop.
Colab Forever (from Randy Brown)
// AUTHOR: Randy Brown <github.com/randbrown>
// open dev tools and run this in the console to prevent the 90 minute timeout
function ClickConnect() {
console.log("Working");
document
.querySelector('#top-toolbar > colab-connect-button')
.shadowRoot.querySelector('#connect')
.click()
}
var myColabTimerId = setInterval(ClickConnect, 60000)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment