Skip to content

Instantly share code, notes, and snippets.

@fmarais
fmarais / js_gopro_youtube.txt
Last active December 15, 2025 10:41
PUBLIC_Youtube_quicksave_draft
const sleep = ms => new Promise(r => setTimeout(r, ms));
var title = "GOPRO - 24 July 22 - Atlantis L 2nd time";
var filenameEle = document.getElementById("original-filename");
var filename = filenameEle.innerText.substring(0, filenameEle.innerText.length - 4);
var title2 = title + " - " + filename;
var textbox = document.querySelector("#textbox");
textbox.innerText = title2;
document.querySelector(".use-placeholder .dropdown-trigger-text").click();
await sleep(500);
@fmarais
fmarais / PUBLIC_google_drive_sheets_backup_files.txt
Last active May 12, 2022 13:56
PUBLIC_google_drive_sheets_backup_files
// Sheet > Extensions > Apps Script
// Add Script
// Add trigger for script
// ------------------------------
// Backup script
function archiveCopy() {
var file = DriveApp.getFileById("original_file_id_to_backup");
var destination = DriveApp.getFolderById("backup_folder_name");
var timeZone = Session.getScriptTimeZone();
@fmarais
fmarais / google_drive_auto_backup
Last active December 15, 2025 10:42
This script will automatically save spreadsheet sheets when edited in Google docs.
This script will automatically save spreadsheet sheets when edited in Google docs.
Installation:
* Open your google spreadsheet
* Open the script editor by clicking on Tools -> Script Editor
* Paste this code into the script editor
* Change the fileId to file you want to backup,
eg. https://docs.google.com/spreadsheets/d/1Ly5SSIE9d-b_IA6VxDB1HF3pnf37SPf22KhZVv3PPiVA1w/edit#gid=966474823
the fileId would be: