Angular style url "whitelist" pattern. I found this snippet while reading Preventing XSS in React. The snippet is sournced from Angular which has an "MIT style" license.
The following command searching for folders named client within the pwd traversing to a max depth of 2. Then it executes npm i react-scripts@latest
in each found directory.
find . -maxdepth 2 -type d -name client -exec bash -c "cd '{}' && npm i react-scripts@latest" \;
Use the following command to print the directories before excuting a command with the following:
find . -maxdepth 2 -type d -name client -exec bash -c "cd '{}' && pwd" \;
bierner.markdown-preview-github-styles | |
dbaeumer.vscode-eslint | |
esbenp.prettier-vscode | |
ms-vscode-remote.remote-wsl | |
streetsidesoftware.code-spell-checker | |
techer.open-in-browser | |
yzhang.markdown-all-in-one |
Generate a new ssh key: ssh-keygen -t rsa -b 4096 -C "[email protected]"
Ensure agent is running: eval $(ssh-agent -s)
Add key to ssh agent: ssh-add ~/.ssh/id_rsa
Copy key to clipboard on windows: clip < ~/.ssh/id_rsa.pub
This is a simple app shell for a PWA. It includes a navbar, two "screens" or "pages", and inlined styles to create a horizontal scrolling effect that snaps to each screen. A loader is also included. Each page initially renders a loader.
This is based on an app shell exercies from Building Performant Progressive Web Apps from Scratch by Jad Joubran.
/* | |
Simple, no frills, debounce function. | |
*/ | |
const debounce = (func, waitMs) => { | |
let timeout; | |
return () => { | |
if (timeout) { | |
clearTimeout(timeout); | |
} |
From this post on the IntelliPaat forum.
This guide assumes that MongoDB Community was installed on macOS Catalina using brew install [email protected]
. Refer to MongoDB Manual: Install on MacOS for installation instructions.
{ | |
"react component": { | |
"description": "A functional react component file template.", | |
"prefix": ["re", "rc", "react-comp", "comp"], | |
"body": [ | |
"import React from \"react\"", | |
"", | |
"const ${1:ComponentName} = () => <div>${1:ComponentName} Component</div>", | |
"", | |
"export default ${1:ComponentName}", |