This file contains 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 onLoad() { | |
var isOrderGuide = g_service_catalog.isOrderGuide(); | |
if(isOrderGuide) { | |
g_form.addInfoMessage("We're part of an order guide!"); | |
} else { | |
g_form.addInfoMessage("We are not a part of an order guide."); | |
} | |
} |
This file contains 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 run() { | |
const names = []; | |
const today = new Date(); | |
const calendars = CalendarApp.getAllCalendars(); | |
const pat = /^(.*)\'s birthday$/; | |
const subject = `Birthday Notifications for ${today.toString()}`; | |
const body = "The following birthdays occur today:"; | |
const myEmail = Session.getActiveUser().getEmail(); | |
calendars.forEach( calendar => { |
This file contains 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 dateBoundaryFactory = (today = new Date()) => { | |
const yesterday = new Date(today) | |
const yesternight = new Date(today) | |
// set yesterday to 00:00:00 | |
yesterday.setDate(today.getDate() - 1) | |
yesterday.setHours(0) | |
yesterday.setMinutes(0) | |
yesterday.setSeconds(0) |
This file contains 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
/** | |
* Email Notifications to Chat | |
* | |
* Attach this script to a Sheet with two columns | |
* Column A - Label | |
* Column B - Webhook | |
* | |
* NOTE: This script will skip the first row and only use the first two columns. | |
* | |
* In column A (Label), list all of the labels for which you would like to receive notifications in Chat. |
This file contains 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
var config = { | |
numberToInclude: { | |
lowers : 3, | |
uppers : 2, | |
digits : 2, | |
symbols: 2 | |
}, | |
digits: "23456789", | |
symbols: "@#$%&*()[]~=", | |
lowers: "abcdefghjkmnpqrstuvwxyz", |
This file contains 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 config = { | |
numberToInclude: { | |
lowers : 3, | |
uppers : 2, | |
digits : 2, | |
symbols: 2 | |
}, | |
digits: "23456789", | |
symbols: "@#$%&*()[]~=", | |
lowers: "abcdefghjkmnpqrstuvwxyz", |
This file contains 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
/** | |
* @param {string} s | |
* @return {number} | |
*/ | |
const lengthOfLongestSubstring = s => { | |
let begin = 0 | |
let end = 1 | |
let final = "" | |
const length = s.length + 1 |
This file contains 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
/* Returns the environment of an object, or all the environments above an | |
* object, or a single environment at a given position. | |
* | |
* Example: | |
* backpack | |
* -> pouch | |
* -> bean | |
* | |
* environment( bean ) ; // returns pouch | |
* environment( bean, 0 ) ; // returns pouch |
This file contains 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
void log_file( string file, string text ) | |
{ | |
string pathfile ; | |
if( !stringp( file ) || !stringp( text ) ) return ; // syntax error | |
if( strsrch( file, ".." ) != -1 ) return ; // security error | |
if( text[ <1 .. ] != "\n") text += "\n" ; | |
if (previous_object()) |
This file contains 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
// /std/events.c | |
// Event emitter inheritible | |
// | |
// Created: 2021/04/09: Gesslar | |
// Last Change: 2021/04/09: Gesslar | |
// | |
// 2021/04/09: Gesslar - Created | |
private static mapping event_listeners = ([ ]) ; |
OlderNewer