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) |
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 { withAuth } from "next-auth/middleware"; | |
| export default withAuth( | |
| function middleware(request) { | |
| if (request.nextUrl.pathname !== "/") return; | |
| return Response.redirect(new URL("/home", request.url)); | |
| }, | |
| // This is NextAuth.js | |
| // Docs: https://next-auth.js.org/configuration/nextjs#pages | |
| // Needs to be the same as your `authOptions.pages` |
| #!/bin/node | |
| import { SignJWT } from "jose" | |
| import { createPrivateKey } from "crypto" | |
| if (process.argv.includes("--help") || process.argv.includes("-h")) { | |
| console.log(` | |
| Creates a JWT from the components found at Apple. | |
| By default, the JWT has a 6 months expiry date. | |
| Read more: https://developer.apple.com/documentation/sign_in_with_apple/generate_and_validate_tokens#3262048 |
| // An example script consuming an API with various throttling and 429 error | |
| // handling strategies. | |
| // | |
| // Blog post with more context | |
| // https://www.useanvil.com/blog/2021-03-29-throttling-and-consuming-apis-with-429-rate-limits | |
| // | |
| // License: MIT | |
| import fetch from 'node-fetch' | |
| import mapLimit from 'async/mapLimit' |
This cheat sheet provides a detailed overview of the exposed lifecycle events and available commands (and entrypoints) of the Serverless framework, that can be hooked by plugins (internal and external ones). The document is structured by the commands invoked by the user.
Lifecycle events are shown as the globally available outer events (all providers) and sub lifecycle events that are provider specific in the called order. Currently only the AWS provider is shown. If you have information about the other provider,
| SYNTAX | |
| print ("Hello World") | |
| # This is a comment | |
| VARIABLE | |
| carname = "Volvo" | |
| x=5 | |
| y = 10 | |
| print(x+y) |
| // βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ‘ | |
| const http = require('http') | |
| const { StaticPool } = require('node-worker-threads-pool') | |
| const numCPUs = require('os').cpus().length | |
| // βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ‘ | |
| const host = '192.168.0.14' | |
| const port = 8080 |
Nx is a suite of powerful, extensible dev tools to help you architect, test, and build at any scale β integrating seamlessly with modern technologies and libraries while providing a robust CLI, caching, dependency management, and more.
It has first-class support for many frontend and backend technologies, so its documentation comes in multiple flavours.