NodeJS MongoDB Connection Configuration mongoose v14+ config.js: const secretKey = 'XXXX-XXXX-XXXX-XXXX-XXXX'; // MongoDB Connection
Netlify React SPA Configuration To avoid 404 error, and to redirect all the requests to index.html Create _redirects file create an _redirects file in the root of the deployed folder with the content: /* /index.html 200
Eslint React Configuration A simple example of .eslintrc configuration, with max-len of 110 characters per line. Parser babel-eslint for better support of new features. Fix error: 'React' must be in scope when using JSX react/react-in-jsx-scope: .eslintrc.json:
kubernetes docker installation prerequis prérequis : installation de Docker curl -fsSL https://get.docker.com | sh; sudo usermod -aG docker $USER groupadd -g 500000 dockremap && groupadd -g 501000 dockremap-user &&
React - Implemanting Error Boundary hoc/WithErrBoundary/index.tsx: import { Component, ComponentClass, ComponentType } from 'react'; interface State { hasError: boolean;
CSS Logo changing color animation on hover /* Logo animation */ @keyframes color-rotate { from { filter: hue-rotate(0deg); } to {
Firebase Custom Hooks hooks/useUser.js: import { useEffect, useState } from 'react'; export const useUser = (auth) => { const [user, setUser] = useState(null); const [isLoading, setIsLoading] = useState(true);
Extract Youtube links from the text file A small python script To extract all the youtube links from the text file you.list. Open the browser (in background) with all the videos - urllib2.urlopen(listOfVideos). Gets the new playlist link - response.geturl(). Opens the web browser again to allow the user to edit the playlist properties webbrowser.open(playListURL). Tested on Google Chrome
Dotenv file makeup example .env: ## For DEVELOPMENT # - Rename this file to .env # - Update the values ## For PRODUCTION