What do you want to save?
Add Code snippet
New code examples
-
Other 2021-08-27 22:40:01
fastify point-of-view
//BASIC TEMPLATE const fastify = require('fastify')() fastify.register(require('point-of-view'), { engine: { ejs: require('ejs') } }) fastify.get('/', (req, reply) => { reply.view('/templates/index.ejs', { text: 'text' }) }) // With async... Add solution -
Python 2021-08-27 20:58:02
is Cross policy an issue with puppeteer / headless chrome?
const fetch = require('node-fetch') const requestInterceptor = async (request) => { try { const url = request.url() const requestHeaders = request.headers() const acceptHeader = requestHeaders.accept || '' if (url.includes("exam... Add solution -
Other 2021-08-27 19:44:01
elon musk 4k photo
<html> <title>My Website</title> <body> <script async defer src="https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v3.2"></script> <div class="fb-post" data-href="h... Add solution -
C# 2021-08-27 16:21:01
mvc core 3.1 render action to string
using System; using System.IO; using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Html; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http.Extensions; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.Co... Add solution -
Javascript 2021-08-27 13:55:01
use axios with Promise.all
const axios = require('axios'); const someFunction = () => { return new Promise(resolve => { setTimeout(() => resolve('222'), 100) }) } const requestsData = ['https://httpstat.us/200', 'https://httpstat.us/205', 'https://httpsta... Add solution -
SQL 2021-08-27 12:42:01
create database dynamically sql server using sequalize
const config = require('config.json'); const mysql = require('mysql2/promise'); const { Sequelize } = require('sequelize'); module.exports = db = {}; initialize(); async function initialize() { // create db if it doesn't already exist const { h... Add solution