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 handler(webhook) { | |
const {data: user} = webhook.payload; | |
// Extract relevant details | |
const emailAddress = user.email_addresses?.[0]?.email_address || 'Unknown user'; | |
const firstName = user.first_name || ''; | |
const lastName = user.last_name || ''; | |
const fullName = `${firstName} ${lastName}`.trim() || emailAddress; | |
const profileImageUrl = user.profile_image_url || 'https://www.gravatar.com/avatar?d=mp'; | |
const createdAt = new Date(user.created_at).toLocaleString(); |
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
/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument */ | |
interface Logger { | |
trace(message: string, ...optionalParams: any[]): void; | |
debug(message: string, ...optionalParams: any[]): void; | |
info(message: string, ...optionalParams: any[]): void; | |
warn(message: string, ...optionalParams: any[]): void; | |
error(message: string, ...optionalParams: any[]): void; | |
[x: string]: any; | |
} |
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
// or just replace the short sha with the full length one | |
(function() { | |
const links = document.querySelectorAll("a.Link--muted svg.octicon-git-commit"); | |
links.forEach(link => { | |
link.parentElement.innerText = link.parentElement.href.split("/").pop() | |
}); | |
})(); |
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
--- | |
swagger: "2.0" | |
info: | |
version: "1.0.0" | |
title: "Minimal OpenAPI Spec" | |
description: "A sample API for testing" | |
termsOfService: "http://swagger.io/terms/" | |
contact: | |
name: "N/A" | |
license: |
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
{"swagger":"2.0","info":{"description":"Redis Labs Pro API ","version":"Version 1","title":"Redis Labs Cloud API - Version 1","contact":{"name":"Customer Support","url":"https://support.redislabs.com","email":"[email protected]"},"license":{}},"host":"api.redislabs.com","basePath":"/v1","tags":[{"name":"Account","description":"Current account and ownership information"},{"name":"Subscriptions","description":"All operations related to subscriptions lifecycle"},{"name":"Databases","description":"All operations related to databases lifecycle"},{"name":"Cloud Accounts","description":"All operations related to cloud accounts (RV only)"},{"name":"Tasks","description":"Displays information on long running operations"}],"produces":["application/json"],"paths":{"/":{"get":{"tags":["Account"],"summary":"Get current Account","description":"Current account and related information","operationId":"getCurrentAccountUsingGET","produces":["application/json"],"responses":{"200":{"description":"OK","schema":{"$ref":"#/defin |
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 main() { | |
const labelMap = new Map(); | |
Gmail.Users.Labels.list("me").labels.forEach((label) => { | |
if (label.type == "user") labelMap[label.name] = label.id; | |
}); | |
if (messageList = Gmail.Users.Messages.list("me", { | |
q: "in:Inbox has:nouserlabels", | |
}).messages) { | |
messageList.forEach((msg) => { | |
const newLabel = |