| #!/bin/bash | |
| #curl https://gist.githubusercontent.com/katakumby/466f3ae800609abcdaede60bc2e26c0f/raw/f95a24a53a9d87f01551ef7c03c535e2c6ce173c/installer.sh | bash | |
| #This script will automatically install basic pentesting software like kali linux tools, wpscan, metasploit etc. | |
| sudo apt-get update | |
| sudo apt-get upgrade -y | |
| sudo apt-get dist-upgrade -y |
| # The following command works for downloading when using Git for Windows: | |
| # curl -LOf http://gist.githubusercontent.com/kmorcinek/2710267/raw/.gitignore | |
| # | |
| # Download this file using PowerShell v3 under Windows with the following comand: | |
| # Invoke-WebRequest https://gist.githubusercontent.com/kmorcinek/2710267/raw/ -OutFile .gitignore | |
| # | |
| # or wget: | |
| # wget --no-check-certificate http://gist.githubusercontent.com/kmorcinek/2710267/raw/.gitignore | |
| # User-specific files |
| //javascript | |
| function telephoneCheck(str) { | |
| if (!balancedParens(str)){ | |
| return false; | |
| } | |
| //remove whitespace | |
| var newStr = str.replace(/\s/g, ''); | |
| function convertToRoman(num) { | |
| let roman = ''; | |
| let roman1 = ''; | |
| let roman10 = ''; | |
| let roman100 = ''; | |
| let roman1000 = ''; | |
| let numStr = '' + num; | |
| if(num<10){ | |
| switch(numStr[0]){ | |
| case '1': roman1 = 'I'; break; |
Composition of <Route> elements in React Router is changing in v6 from how it worked in v4/5 and in Reach Router. React Router v6 is the successor of both React Router v5 and Reach Router.
This document explains our rationale for making the change as well as a pattern you will want to avoid in v6 and a note on how you can start preparing your v5 app for v6 today.
In React Router v5, we had an example of how you could create a element](https://github.com/remix-run/react-router/blob/320be7afe44249d5c025659bc00c3276a19f0af9/packages/react-router-dom/examples/Auth.js#L50-L52) to restrict access to certain routes on the page. This element was a simple [wrapper around an actual element that made a simple decision: is the user authenticated or not? If so, ren