To access the Sheets API, you will need to enable the Sheets API, obtain credentials, and grant access to your Sheet.
Based on these instructions
- Open the Google Developers Console
- Select your project or create a new one (and then select it)
To access the Sheets API, you will need to enable the Sheets API, obtain credentials, and grant access to your Sheet.
Based on these instructions
/* | |
Usage: | |
import getImageKitModifierQueryString from "getImageKitModifiers.js"; | |
const IMAGEKIT_CDN_ROOT = "https://ik.imagekit.io/my-app/"; | |
const myImageKey = "image.jpg"; | |
const modifierQueryString = getImageKitModifierQueryString({ | |
width: 45, |
jsPDF is a low-level library for building PDF files in JavaScript. It does not support multiline text.
Here's a complete helper function based on the answers by @KB1788 and @user3749946 in this StackOverflow thread:
It includes line wrap, page wrap, and some styling control:
function convertPointsToUnit(points, unit) { | |
// Unit table from https://github.com/MrRio/jsPDF/blob/ddbfc0f0250ca908f8061a72fa057116b7613e78/jspdf.js#L791 | |
var multiplier; | |
switch(unit) { | |
case 'pt': multiplier = 1; break; | |
case 'mm': multiplier = 72 / 25.4; break; | |
case 'cm': multiplier = 72 / 2.54; break; | |
case 'in': multiplier = 72; break; | |
case 'px': multiplier = 96 / 72; break; | |
case 'pc': multiplier = 12; break; |
A Pre-signed URL is used to allow untrusted users to temporary access to private S3 resources. (Example: upload an image to a private S3 bucket).
The URL is a string consists of:
base64
string describing the HTTP request:There's no questions about it: in the age of "fat" frontend clients, less bloat is better. A useful technique is to split off large libraries into separate Webpack chunks so the they don't take up space in your main bundle, delaying the initial load of your webapp. I like doing this with what I call the "installer pattern". Every split-out library gets its own "installer", an async function that loads the Webpack chunk, performs any initializations or configuration necessary, and then informs the relevant parts of your app that loading has completed.
Here's what that pattern looks like for installing the Sentry.io error reporting SDK:
First, add Sentry to your project:
You can deploy this function on any of the serverless platforms - AWS Lambda, Google Cloud Functions, Azure Functions, Netlify, Cloudflare Workers, etc.
nodemailer
to your package.json
(npm i nodemailer
), and follow your platform's instructions on bundling dependencies.clientID
, clientSecret
, and refreshToken
. Follow this YouTube tutorialGMAIL_EMAIL_ADDRESS