Skip to content

Instantly share code, notes, and snippets.

View leandroz's full-sized avatar

Leandro Zubrezki leandroz

View GitHub Profile
@tanaikech
tanaikech / submit.md
Last active April 15, 2025 01:46
Guide to Function Calling with Gemini and Google Apps Script

Guide to Function Calling with Gemini and Google Apps Script

Abstract

Powerful AI tool Gemini's API release (Vertex AI & Google AI Studio) opens doors for diverse applications. Its recent upgrade to version 1.5 boosts capabilities. This report demonstrates using simple Google Apps Script function calls to leverage Gemini's power for both data retrieval and content generation.

Introduction

The recent release of the LLM model Gemini as an API on Vertex AI and Google AI Studio unlocks a world of possibilities. Ref Excitingly, Gemini 1.5 was just announced, further expanding its capabilities. Ref I believe Gemini significantly expands the potential in various situations and paves the way for diverse applications. Notably, the Gemini API can retrieve new data and generate content through function calls. In this report, I introduce the basic flow of function

import { Machine, assign } from 'xstate';
import firebase from './firebase';
const chart = {
id: 'auth',
context: {
auth: null,
error: null,
loggedoutTime: null
},

Angular Universal setup for firebase hosting

1) Install firebase-tools globally

npm i -g firebase-tools

2) Install @angular/platform-server

@paulirish
paulirish / what-forces-layout.md
Last active April 24, 2025 09:45
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent

Google Apps Script Gmail Utilities

##sendAndLabel(recipient, subject, body, options, label)##

An alternative to GmailApp.sendEmail(), which applies a label to the message thread in the sender's account.

Sends an email message with optional arguments. The email can contain plain text or an HTML body. The size of the email