Skip to content

Instantly share code, notes, and snippets.

@ahmedengu
Last active August 26, 2021 00:03
Show Gist options
  • Star 9 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save ahmedengu/2c641e8fca584418c0f4670755894402 to your computer and use it in GitHub Desktop.
Save ahmedengu/2c641e8fca584418c0f4670755894402 to your computer and use it in GitHub Desktop.
keep colab running forever by clicking on reconnect button every 60 and cancel the max ram warning ... paste the following code into your browser console
// run every 1 minute
setInterval(function () {
// close max ram window
document.getElementById("cancel") && document.getElementById("cancel").innerText == "IGNORE" && document.getElementById("cancel").click();
// reconnect
document.getElementById("ok") && document.getElementById("ok").innerText == "RECONNECT" && document.getElementById("ok").click();
!document.getElementsByTagName('iron-overlay-backdrop').length && document.getElementById("connect") && document.getElementById("connect").innerText == "RECONNECT" && document.getElementById("connect").click();
}, 60000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment