Skip to content

Instantly share code, notes, and snippets.

View roseg43's full-sized avatar

Gabriel Rose roseg43

View GitHub Profile
@d-neri
d-neri / Code.gs
Last active April 4, 2024 17:32
Google Apps Script - Gmail count emails by sender
// Execute the "run" function below after setting up the appropriate APIs
// Original credit: https://stackoverflow.com/a/59222719/501042
function sender_list_paged(token) {
var dt = new Date().getTime();
var ss = SpreadsheetApp.create('Gmail count emails by sender ' + dt);
var sh = ss.getActiveSheet()
sh.clear();
sh.appendRow(['Email Address', 'Count']);
var token = token || null;
var query = "in:inbox is:unread";
@renoirb
renoirb / extractcss.js
Last active January 20, 2020 10:19
Extract CSS for a given element
/**
* Based on work from krasimirtsonev
*
* http://krasimirtsonev.com/blog/article/csssteal-chrome-extension-that-extracts-css
*/
// helper function for transforming
// node.children to Array
function toArray (obj, ignoreFalsy) {
var arr = [], i;