Skip to content

Instantly share code, notes, and snippets.


Max Makhrov Max-Makhrov

View GitHub Profile
Max-Makhrov / gist:5a36610a2dd1eaff3d3252d74e34d557
Last active Dec 1, 2021 — forked from peterherrmann/gist:2700284
GASRetry - Exponential backoff JavaScript implementation for Google Apps Script (Library project key: "MGJu3PS2ZYnANtJ9kyn2vnlLDhaBgl_dE")
View gist:5a36610a2dd1eaff3d3252d74e34d557
* Invokes a function, performing up to 5 retries with exponential backoff.
* Retries with delays of approximately 1, 2, 4, 8 then 16 seconds for a total of
* about 32 seconds before it gives up and rethrows the last error.
* See:
* <br>Author: (Peter Herrmann)
<pre>//Calls an anonymous function that concatenates a greeting with the current Apps user's email
var example1 ={return "Hello, " + Session.getActiveUser().getEmail();});
</pre><pre>//Calls an existing function
Max-Makhrov /
Last active Aug 9, 2020 — forked from tanaikech/
Uploading Local Files to Google Drive without Authorization using HTML Form

Uploading Local Files to Google Drive without Authorization using HTML Form

This is a sample script for uploading local file to Google Drive without the authorization using HTML form. A selected file in your local PC using HTML form is uploaded to Google Drive and saved to Google Drive.

When you use this, at first, please deploy Web Apps. The script is doPost() of following scripts.

Script : Google Apps Script

function doPost(e) {
  var data = Utilities.base64Decode(;
Max-Makhrov / copy-checklist.js
Last active Jun 24, 2020 — forked from niallsmart/copy-checklist.js
Copy Trello checklist to console
View copy-checklist.js
$(".checklist-item").map(function(i, item) {
let text = $(item).find(".checklist-item-details-text").text();
if( $(item).hasClass("checklist-item-state-complete") ) {
text += " (DONE)";
return text;
Max-Makhrov / dump.vim
Last active May 27, 2020 — forked from mattn/dump.vim
View dump.vim
scriptencoding utf-8
let s:calendar_list = [
\ ['Australian Holidays', ''],
\ ['Austrian Holidays', ''],
\ ['Brazilian Holidays', ''],
\ ['Canadian Holidays', ''],
\ ['China Holidays', ''],
\ ['Christian Holidays', ''],
\ ['Danish Holidays', ''],
View import_json_appsscript.js
* Retrieves all the rows in the active spreadsheet that contain data and logs the
* values for each row.
* For more information on using the Spreadsheet API, see
function readRows() {
var sheet = SpreadsheetApp.getActiveSheet();
var rows = sheet.getDataRange();
var numRows = rows.getNumRows();
Max-Makhrov /
Last active Sep 25, 2019 — forked from Spencer-Easton/
Example on how to export a Google sheet to various formats, includes most PDF options
function exportSpreadsheet() {
//All requests must include id in the path and a format parameter
//format=xlsx //excel
//format=ods //Open Document Spreadsheet
//format=zip //html zipped