What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-10-23 23:00:06
express rate limit redis
import { Request, Response, NextFunction } from 'express' import IORedis from 'ioredis' import ip from 'request-ip' let io = new IORedis({ host: process.env.REDIS_HOST || 'localhost', port: parseInt(process.env.REDIS_PORT || '') }) export async functi... Add solution -
Javascript 2021-10-07 07:32:02
write test code javascript
// create directory // npm init -y // npm install tape // create a file example: filename.js // create a function in it and export as module.exports = functionName // create a test file example: filename.test.js // import the exported function as const ... Add solution -
Javascript 2021-10-03 18:33:05
react native cognito passwordless
export function sendAuthCode(email) { const loginDetails = new AuthenticationDetails({ Username: email }); const preAuthCognitoUser = createCognitoUser(email); preAuthCognitoUser.setAuthenticationFlowType("CUSTOM_AUTH"); return new Prom... Add solution -
Javascript 2021-10-01 17:10:01
google script email spreadsheet as pdf
function sendSheetToPdfwithA1MailAdress(){ // this is the function to call var ss = SpreadsheetApp.getActiveSpreadsheet(); var sh = ss.getSheets()[0]; // it will send sheet 0 wich is the first sheet in the spreadsheet. // if you change the number, c... Add solution -
Javascript 2021-09-24 11:40:02
how to convert react component to image
import { exportComponentAsJPEG, exportComponentAsPDF, exportComponentAsPNG } from 'react-component-export-image'; import React from 'react'; class ComponentToPrint extends React.Component { render() { return <div>Hello World</div>; } } e... Add solution
Best helpers
Ranking is empty