What do you want to save?
Add Code snippet
New code examples
-
Shell/Bash 2021-11-06 04:32:14
puppet install on centos 7
curl -sL https://rpm.nodesource.com/setup_10.x | sudo -E bash - yum install nodejs 1 2 3 4 5 6 7 curl -sL https://rpm.nodesource.com/setup_10.x | sudo -E bash - yum install nodejs Step 2 :- Install Puppeteer In CentOS 7 npm i pupeteer 1 npm... Add solution -
Other 2021-11-05 09:04:22
simple jest test cases for array of objects
import pizzas from '../data'; // very basic test to notify the user if our pizza data has changed test('the pizza data is correct', () => { expect(pizzas).toMatchSnapshot(); expect(pizzas).toHaveLength(4); expect(pizzas.map(pizza => pizza.nam... Add solution -
ActionScript 2021-11-03 17:55:07
Error: Forbidden testing strapi
const request = require("supertest") const { grantPrivilege } = require("./../helpers/strapi"); beforeAll(async () => { await grantPrivilege(2, "permissions.application.controllers.hello.index"); // Gives Public access... Add solution -
Javascript 2021-10-25 05:24:11
Manually Parsing PDF in Node.js
/* This code comes from Vincent Lab And it has a video version linked here: https://www.youtube.com/watch?v=b2dLDqmYT4I */ // Import dependencies const fs = require("fs"); const PDFParser = require("pdf2json"); // Get all the... Add solution -
Javascript 2021-10-24 20:15:15
ask for expo token and save to firebase
registerForPushNotifications = async () =>{//Get the current users id So you can post the token to the user in your databaseconst currentUser = firebase.auth().currentUser.uidconst { status: existingStatus } = await Permissions.getAsync(Permissions.NO... Add solution -
Javascript 2021-10-23 00:23:07
React Custom Hook to load data using API
const useDataFetching = () => { const [data, setData] = useState({ hits: [] }); const [url, setUrl] = useState( 'https://hn.algolia.com/api/v1/search?query=redux', ); const [isLoading, setIsLoading] = useState(false); const [isError, setI... Add solution -
Javascript 2021-10-22 19:59:15
discord.js package
const Discord = require ('discord.js') const bot = new Discord.Client() bot.on("ready", async () => { console.log("the bot is ready") }) client.on('message', msg => { if (msg.content === '!ping') msg.reply( &quo... Add solution