Skip to content

Instantly share code, notes, and snippets.

@gornostay25
gornostay25 / dino4kids.js
Last active Sep 12, 2021
Chrome Dino slows down but doesn't die
View dino4kids.js
//Paste this code into console (CTRL+Shift+I / F12)
function customGameOver(){
let timer;
return ()=>{
clearTimeout(timer);
timer = setTimeout(()=>{
this.playSound(this.soundFx.HIT);
let csp = this.currentSpeed;
if (csp/2 < 4){
@gornostay25
gornostay25 / sandbox.js
Last active Aug 31, 2021
Run jscode from string in sandbox
View sandbox.js
function sandboxcode(s) {
function construct(c, a) {
function F(){return c.apply(this, a)}
F.prototype = c.prototype;
return new F()
}
let g = ["Function","globalThis","eval"]
for (let i in globalThis){g.push(i)}
g.push(s);
return construct(Function, g).apply({});
@gornostay25
gornostay25 / GASExportProject.py
Last active Mar 5, 2021
Export your google app script project to a local directory. Python
View GASExportProject.py
import requests,configparser
filename = "GASsettings.ini"
config = configparser.ConfigParser()
config.read(filename)
if not "GAS" in config:
print("Please create "+filename+" file!")
exit(1)
exportFolder = "./MyGASproject"
@gornostay25
gornostay25 / bs64_page_source.js
Last active Dec 3, 2020
geting page source code in base64
View bs64_page_source.js
var myWindow = window.open("", "_self", ""); myWindow.document.write(""+ btoa(unescape(encodeURIComponent(document.getElementsByTagName("HTML")[0].innerHTML)))+"");
//you can use this as bookmark