Skip to content

Instantly share code, notes, and snippets.

View oshliaer's full-sized avatar
😼
Cat face with wry smile

Alex Ivanov oshliaer

😼
Cat face with wry smile
View GitHub Profile
@rcknr
rcknr / Code.gs
Last active December 16, 2024 09:04
MD5 Hash in Google Apps Script
function md5(inputString) {
return Utilities.computeDigest(Utilities.DigestAlgorithm.MD5, inputString)
.reduce((output, byte) => output + (byte & 255).toString(16).padStart(2, '0'), '');
}
@irustm
irustm / deno-faq.md
Last active June 10, 2020 13:35
Deno FAQ

Попытаюсь ответить на общие и частные вопросы, и возможно развенчать некоторые мифы, потому как очень много авторов статей прыгнули на этот хайп трейн, и под копирку вышло очень много статей. А некоторые ответы, например Раяна , были вырваны из контекста.

В дино тс из коробки, а в ноде надо настраивать. Настраивается быстро и просто. Не считаю, полезной фичей

Не знаю из какой статьи эта фраза, но думаю тож вырвано из контекста. И все таки хочется дать какой то комментарии. Возможно тут упор идет на новичков, которым не приходилось ранее работать со всякими сборщиками и лоадерами. Не говоря уж о простом запуске tsc. Да, кому то действительно это не нужно, у многих давно есть свои инструменты CLI, которые это делают, и многие даже не задумываются что происходит под капотом. Кроме того дополню что команды Deno CLI включают многие вещи, которых действительно не было в экосистеме Node из коробки. Что я имею ввиду - когда я разрабатывал на .NET все было включено, так же из коробки, и не нужны были мне те же, н

@tanaikech
tanaikech / submit.md
Last active February 2, 2024 09:54
Updated Specification of Google Spreadsheet: Multiple Hyperlinks to a Cell

Updated Specification of Google Spreadsheet: Multiple Hyperlinks to a Cell

Recently, it seems that the specification of Google Spreadsheet was updated. Before this, when a cell has only one hyperlink. In this case, the hyperlink was given to a cell using =HYPERLINK("http://www.google.com/", "Google") as following figure.

But by the recent update, a cell got to be able to have multiple hyperlinks as following figure. In this case, the hyperlinks are set by the RichTextValue object.

@brainysmurf
brainysmurf / README.md
Last active June 21, 2024 05:53
Things one can get used to for the V8 Google Apps Scripts engine

Things one can get used to for the V8 Google Apps Scripts engine

A bit of a monologue about various syntax changes and adjustments in learning and using the tool.

Logging is slooooooow

I know. Everyone knows.

That's why I wrote a library that writes to a spreadsheet instead. Ever since I started using it I'm far more productive. I don't know how people are still putting with that god-awful lagging logger.

@BinnyChanchal
BinnyChanchal / gist:161d3c5b9cb44187a2a174aecf0b86d1
Created February 11, 2020 13:19
List files on Google Shared Drive(Team Drive)
function gettigAllTeamDrivesWithId(){
let drives = Drive.Drives.list();
return drives;
}
function gettingAllFilesOfTeamDrive(teamDriveId){
var query = 'mimeType = "application/vnd.google-apps.folder" and trashed=false ';
var param = {
corpora:'teamDrive',
includeTeamDriveItems:true,
@postman31
postman31 / Dissaproved Extensions Report.js
Last active February 11, 2022 04:30
Dissaproved Extensions Report Script
/*
Disapproved Extensions Report Script.
This scripts generates an email if there are some non-removed disapproved extensions.
Disapproval reasons are taken from PLACEHOLDER_FEED_ITEM_REPORT.
Check the nameMapping veriable below for the list of supported extensions.
Email message could also include a long list of dissaproved remarketing feed items, so adjust settings to skip this if necessary.
Developed by Dmytro Bulakh, 2020, [email protected]
*/
@Oaphi
Oaphi / asyncGAPI.js
Last active February 24, 2021 15:27
Async-friendly google.script.run utility
/**
* Promise-friendly google.script.run call
* @param {String} funcName
* @param {...*} params
* @returns {Promise}
*/
const asyncGAPI = (funcName, ...params) => {
return new Promise((res, rej) => {
google.script.run
.withSuccessHandler(data => res(data))
@stewartmcgown
stewartmcgown / takeout-discovery.json
Last active October 15, 2024 07:58
Google Takeout API
{
"title": "Takeout API",
"discoveryVersion": "v1",
"ownerName": "Google",
"version_module": true,
"resources": {
"exports": {
"methods": {
"get": {
"flatPath": "v2/{service}/exports/{exportId}",
@tanaikech
tanaikech / submit.md
Last active July 26, 2023 16:04
Automatic Recalculation of Custom Function on Spreadsheet Part 2

Automatic Recalculation of Custom Function on Spreadsheet Part 2

Description

I have already reported about "Automatic Recalculation of Custom Function on Spreadsheet Part 1" at here. Here, I would like to introduce other workaround for forcibly recalculating the custom functions and built-in functions using Class TextFinder. Class TextFinder has added at April 5, 2019. By this, this workaround can be proposed.

Sample scripts

Pattern 1

/**
* Unpivot a pivot table of any size.
* https://stackoverflow.com/questions/24954722/how-do-you-create-a-reverse-pivot-in-google-sheets
* @param {A1:D30} data The pivot table.
* @param {1} fixColumns Number of columns, after which pivoted values begin. Default 1.
* @param {1} fixRows Number of rows (1 or 2), after which pivoted values begin. Default 1.
* @param {"city"} titlePivot The title of horizontal pivot values. Default "column".
* @param {"distance"[,...]} titleValue The title of pivot table values. Default "value".
* @return The unpivoted table
* @customfunction