Skip to content

Instantly share code, notes, and snippets.

View jonathasgouv's full-sized avatar

Jônathas Gouveia jonathasgouv

View GitHub Profile
@jonathasgouv
jonathasgouv / vtex.custom-component.md
Created March 18, 2024 14:52 — forked from rcapeto/vtex.custom-component.md
VTEX Custom-Component Documentation.

⚛️ Custom Component Documentation

Creating a Custom Component

  1. First create a file in /react/components/{filename}
@jonathasgouv
jonathasgouv / yt-downloader.js
Last active May 5, 2024 15:10
Download array of youtube videos as MP3
const fs = require('fs');
const ytdl = require('ytdl-core');
const sanitize = require("sanitize-filename");
async function downloadVideos(urls) {
try {
for (const url of urls) {
const info = await ytdl.getInfo(url);
const title = info.videoDetails.title;
const filename = sanitize(`${title}.mp3`);