Skip to content

Instantly share code, notes, and snippets.

View jgorene's full-sized avatar

Jean Gorene jgorene

View GitHub Profile
@hizkifw
hizkifw / ScanFolder.gs
Created March 24, 2021 18:08
Recursively iterate over Google Drive files and folders in Google Apps Script with continuation support
function scanFolder(folder, stopTime, callback) {
let ct = null;
const properties = PropertiesService.getScriptProperties();
// Iterate files
ct = properties.getProperty('iter:' + folder.getId() + ':files')
let files = folder.getFiles();
if(ct) files = DriveApp.continueFileIterator(ct);
while(files.hasNext()) {
const file = files.next();
@guglielmo
guglielmo / .block
Last active August 31, 2018 15:42 — forked from JacquesJahnichen/README.md
d3.js v4 - Interactive zoomable treemap
license: gpl-3.0
height: 600
//assuming array look like this.
var arr = [
["Status", "Name", "Marks", "Position"],
["active", Sarfaraz, 10.0, "Front-end-dev"],
["active", John, 10.0, "Front-end-dev"],
["deactive", Raganar, 10.0, "UI designer"],
];
console.log (arrToObject(arr));
@rokotyan
rokotyan / .block
Last active December 12, 2023 13:07
Export SVG D3 visualization to PNG or JPEG
license: mit
@aquelito
aquelito / git-command.md
Last active May 16, 2024 13:52
GIT - Ligne de commande principale
title category
Git config
Git

Rappel

Ne pas oublier : l'aide en ligne de commande.

@mlocati
mlocati / color-scale.js
Last active May 1, 2024 10:55
Javascript color scale from 0% to 100%, rendering it from red to yellow to green
// License: MIT - https://opensource.org/licenses/MIT
// Author: Michele Locati <michele@locati.it>
// Source: https://gist.github.com/mlocati/7210513
function perc2color(perc) {
var r, g, b = 0;
if(perc < 50) {
r = 255;
g = Math.round(5.1 * perc);
}
else {