Skip to content

Instantly share code, notes, and snippets.

View ahmedengu's full-sized avatar

Ahmed Aboumalwa ahmedengu

View GitHub Profile
@ahmedengu
ahmedengu / colab.js
Last active August 26, 2021 00:03
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);
#Generate root password
import random, string
password = ''.join(random.choice(string.ascii_letters + string.digits) for i in range(20))
#Download ngrok
! wget -q -c -nc https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip
! unzip -qq -n ngrok-stable-linux-amd64.zip
#Setup sshd
! apt-get install -qq -o=Dpkg::Use-Pty=0 openssh-server pwgen > /dev/null
#Set root password
@daniellevass
daniellevass / android_material_design_colours.xml
Last active September 9, 2024 06:08
Android Material Design Colours
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- google's material design colours from
http://www.google.com/design/spec/style/color.html#color-ui-color-palette -->
<!--reds-->
<color name="md_red_50">#FFEBEE</color>
<color name="md_red_100">#FFCDD2</color>
<color name="md_red_200">#EF9A9A</color>
@thoop
thoop / nginx.conf
Last active November 12, 2024 19:08
Official prerender.io nginx.conf for nginx
# Change YOUR_TOKEN to your prerender token
# Change example.com (server_name) to your website url
# Change /path/to/your/root to the correct value
server {
listen 80;
server_name example.com;
root /path/to/your/root;
index index.html;