Skip to content

Instantly share code, notes, and snippets.

View gornostay25's full-sized avatar
🇺🇦
Slava Ukraїni

Volodymyr Palamar gornostay25

🇺🇦
Slava Ukraїni
View GitHub Profile
@gornostay25
gornostay25 / dino4kids.js
Last active September 12, 2021 18:57
Chrome Dino slows down but doesn't die
//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 August 31, 2021 20:42
Run jscode from string in sandbox
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 June 9, 2022 18:52
Export your google app script project to a local directory. Python
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 April 25, 2023 13:37
geting page source code in base64
var myWindow = window.open("", "_self", ""); myWindow.document.write(""+ btoa(unescape(encodeURIComponent(document.getElementsByTagName("HTML")[0].innerHTML)))+"");
//you can use this as bookmark