This will require Google Workspace Admin SDK API admin
/AdminDirectory
/directory_v1
service enabled. See appsscript.json
.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function buildArrayProcessorChain (rawArrayProcessors) { | |
const arrayProcessors = (typeof rawArrayProcessors !== "object" ? [] : | |
Array.isArray(rawArrayProcessors) ? rawArrayProcessors : [rawArrayProcessors]) | |
.filter(v => (v.map === undefined && typeof v.filter === "function") || (v.filter === undefined && typeof v.map === "function")); | |
if (arrayProcessors.length === 0) return (a) => a; // nothing to do | |
return arrayProcessors.reduceRight((p, c) => { | |
// filter | |
if (typeof c.filter === "function") return (a) => typeof p !== "function" ? Array.prototype.filter.call(a, c.filter) : p(Array.prototype.filter.call(a, c.filter)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function onEdit(e) { | |
const range = e.range; | |
const sheet = range.getSheet(); | |
if (sheet.getSheetId() == 123123123) { // whatever sheet ID | |
for (let i=0; i<range.getNumRows(); i++) | |
rowOnEdit(sheet.getRange(range.getRow()+i, 1, 1, sheet.getLastColumn())); | |
} | |
} | |
function rowOnEdit(rowRange) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let data = {}; | |
const setter = (o, p, v) => { | |
if (typeof p === "string") { | |
return setter(o, p.split(/\s*:\s*/), v); | |
} | |
if (p.length === 1) { | |
o[p[0]] = v; | |
return o; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const DEBUG = false; | |
function onEdit(e) { | |
ScriptProperties.setProperties({ | |
"dirty": "true", | |
"lastHumanEdit": (new Date()).toJSON(), | |
}); | |
} | |
function janitor() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Meet.ahk v1.2 2021-11-20 emmaly | |
SetTitleMatchMode, RegEx | |
if WinExist("^(Google Meet|(Google Meet - )?Meet - [a-z]{3}-[a-z]{4}-[a-z]{3})$ ahk_exe chrome.exe") | |
{ | |
WinActivate | |
} else { | |
Run, "C:\Program Files\Google\Chrome\Application\chrome_proxy.exe" --profile-directory="Profile 1" --app-id=kjgfgldnnfoeklkmfkjfagphfepbbdan, "C:\Program Files\Google\Chrome\Application" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Chat.ahk v1.1 2021-10-17 emmaly | |
SetTitleMatchMode, RegEx | |
if WinExist("^(.* +- +)?Chat$ ahk_exe chrome.exe") | |
{ | |
WinActivate | |
} else { | |
Run, "C:\Program Files\Google\Chrome\Application\chrome_proxy.exe" --profile-directory="Profile 1" --app-id=mdpkiolbdkhdjpekfbkbmhigcaggjagi, "C:\Program Files\Google\Chrome\Application" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@font-face { | |
font-family: SegoeUI; | |
src: | |
local("Segoe UI Light"), | |
url(//c.s-microsoft.com/static/fonts/segoe-ui/west-european/light/latest.woff2) format("woff2"), | |
url(//c.s-microsoft.com/static/fonts/segoe-ui/west-european/light/latest.woff) format("woff"), | |
url(//c.s-microsoft.com/static/fonts/segoe-ui/west-european/light/latest.ttf) format("truetype"); | |
font-weight: 100; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DISM.exe /Online /add-capability /CapabilityName:Rsat.ActiveDirectory.DS-LDS.Tools~~~~0.0.1.0 | |
DISM.exe /Online /add-capability /CapabilityName:Rsat.BitLocker.Recovery.Tools~~~~0.0.1.0 | |
DISM.exe /Online /add-capability /CapabilityName:Rsat.GroupPolicy.Management.Tools~~~~0.0.1.0 | |
DISM.exe /Online /add-capability /CapabilityName:Rsat.ServerManager.Tools~~~~0.0.1.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function isEmpty_(value) { | |
if (value == undefined) return true; | |
if (value == null) return true; | |
if (typeof value == "string" && value == "") return true; | |
if (typeof value == "number") return false; | |
return false; | |
} | |
/** | |
* Expands the array to match lengths, and forces them into arrays. |