See also:
| Service | Type | Storage | Limitations |
|---|---|---|---|
| Amazon DynamoDB | 25 GB | ||
| Amazon RDS | |||
| Azure SQL Database | MS SQL Server | ||
| 👉 Clever Cloud | PostgreSQL, MySQL, MongoDB, Redis | 256 MB (PostgreSQL) | Max 5 connections (PostgreSQL) |
| /** | |
| * Get XML sitemap URLs and metadata. | |
| * | |
| * @param {"https://example.com/sitemap.xml"} url - Input the XML sitemap URL. | |
| * @param {"keyword"} filter [Optional] - keyword to filter URLs. | |
| * @customfunction | |
| */ | |
| function sitemap(url, filter) { | |
| // Validate if the URL is provided. | |
| if (!url) return 'You need to enter the URL'; |
See also:
| Service | Type | Storage | Limitations |
|---|---|---|---|
| Amazon DynamoDB | 25 GB | ||
| Amazon RDS | |||
| Azure SQL Database | MS SQL Server | ||
| 👉 Clever Cloud | PostgreSQL, MySQL, MongoDB, Redis | 256 MB (PostgreSQL) | Max 5 connections (PostgreSQL) |
| // This code will automatically save the current canvas as a .png file. | |
| // Its useful as it can be placed in a loop to grab multiple canvas frames, I use it to create thumbnail gifs for my blog | |
| // Only seems to work with Chrome | |
| // Get the canvas | |
| var canvas = document.getElementById("canvas"); | |
| // Convert the canvas to data | |
| var image = canvas.toDataURL(); | |
| // Create a link | |
| var aDownloadLink = document.createElement('a'); |
This is an extension of DJ Adams' excellent SheetAsJSON Google Apps Script, which provides a way to GET a published Google Spreadsheet as a JSON feed. This version allows generic filtering for terms, more specific control over which rows to parse, and correct MIME type for JSONP output.
The following parameters are required for the script to work.
https://script.google.com/macros/s/AKfycbzGvKKUIaqsMuCj7-A2YRhR-f7GZjl4kSxSN1YyLkS01_CfiyE/exec?
+ id=<spreadsheet key>
+ sheet=<sheet name on spreadsheet>
| import 'reflect-metadata'; | |
| import { container } from 'tsyringe'; | |
| import serverlessExpress from '@vendia/serverless-express'; | |
| import { Logger } from '@aws-lambda-powertools/logger'; | |
| import { Tracer } from '@aws-lambda-powertools/tracer'; | |
| import { capturePromise } from 'aws-xray-sdk-core'; | |
| import env from '@/configs'; | |
| import { DbBootstrapper } from '@/database/db-bootstrapper'; |
| import { container } from 'tsyringe'; | |
| import { CacheService } from '@/services/cache.service'; | |
| const cacheSvc = container.resolve(CacheService); | |
| export function CacheResponse(expiration: number = 3600, serializeKey?: unknown): MethodDecorator { | |
| return function (target, propertyKey: string, descriptor: PropertyDescriptor) { | |
| const classTarget = target.constructor.name; | |
| const oriFunc = descriptor.value; |
| import Redis from 'ioredis'; | |
| import { inject, injectable } from 'tsyringe'; | |
| import { Logger } from '@aws-lambda-powertools/logger'; | |
| import env from '@/configs/be-config'; | |
| @injectable() | |
| export class CacheService { | |
| private redis: Redis | undefined; |
| import { Command } from 'commander'; | |
| import { readdir, rmdir } from 'fs/promises'; | |
| import fs from 'node:fs'; | |
| import concurrently from 'concurrently'; | |
| import path from 'path'; | |
| const getDirectories = async (source) => | |
| (await readdir(source, { withFileTypes: true })) | |
| .filter((dirent) => dirent.isDirectory()) | |
| .map((dirent) => dirent.name); |
| import 'dotenv/config'; | |
| import { NestFactory } from '@nestjs/core'; | |
| import { | |
| FastifyAdapter, | |
| NestFastifyApplication, | |
| } from '@nestjs/platform-fastify'; | |
| import { PromiseHandler, awsLambdaFastify } from '@fastify/aws-lambda'; | |
| import { Logger } from '@nestjs/common'; | |
| import compression from '@fastify/compress'; |