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
@brainysmurf
brainysmurf / README.md
Last active April 3, 2024 18:17
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, bulakh@ppchead.com
*/
@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 May 28, 2024 22:30
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
@tanaikech
tanaikech / submit.md
Created March 4, 2019 04:50
Adding Title of vAxis to Embedded Chart on Spreadsheet using Google Apps Script

Adding Title of vAxis to Embedded Chart on Spreadsheet using Google Apps Script

When a chart is created by using EmbeddedChartBuilder of Spreadsheet service, the title of vAxis which is put by setOption("vAxis", {title: "y axis"}) doesn't work. It is considered that this is a bug. Because I have confirmed that this had worked fine. Ref But this specification had been changed. So I would like to introduce the method for adding the title of vAxis when a chart is created using Google Apps Script.

Sample data

Sample script 1

This is a sample script using EmbeddedChartBuilder of Spreadsheet service.

@sagirk
sagirk / learn-react.md
Created November 18, 2018 18:23
How to become a React expert
  1. Carefully do the official [tutorial][].
  2. Read the official guide to [main concepts][].
  3. Read the official [advanced guides][].
  4. Watch [building React from scratch][] to get an idea of how React actually works (this covers the "stack" reconciler which was used in React 15 and earlier).
  5. Go through the [React "fiber" architecture][] which is the default reconciler since React 16.
  6. Go crazy, build your own projects, and stop doing React tutorials!
@tanaikech
tanaikech / submit.md
Last active September 30, 2020 06:10
Asynchronous Processing using Event Triggers

Asynchronous Processing using Event Triggers

September 21, 2018 Published.

Kanshi Tanaike