This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function traverseChildren(elem, tagname) { | |
if (elem.tagName === tagname) cl(elem, elem.tagName); | |
if (!elem.children.length) return; | |
Array.from(elem.children).forEach((child) => { | |
traverseChildren(child); | |
}); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function findNumInString(str) { | |
const arrMatches = str.match(/\d+/g); | |
const num = Number(arrMatches[0]); | |
return num ? num : 0; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
code --install-extension analytic-signal.preview-mp4 | |
code --install-extension Angular.ng-template | |
code --install-extension apollographql.vscode-apollo | |
code --install-extension bungcip.better-toml | |
code --install-extension dbaeumer.vscode-eslint | |
code --install-extension dsznajder.es7-react-js-snippets | |
code --install-extension eamodio.gitlens | |
code --install-extension ecmel.vscode-html-css | |
code --install-extension esbenp.prettier-vscode | |
code --install-extension formulahendry.auto-rename-tag |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const PhotoPreviewExcerpt = ({ | |
file, | |
setSelectedFiles, | |
}: { | |
file: File; | |
setSelectedFiles: React.Dispatch<React.SetStateAction<File[] | null | undefined>>; | |
}) => { | |
const fileReaderRef = React.useRef<FileReader>(); | |
const [photoSrc, setPhotoSrc] = React.useState<string>(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { CacheModule, Global, Module } from '@nestjs/common'; | |
import type { ClientOpts } from 'redis'; | |
import { ConfigModule, ConfigService } from '@nestjs/config'; | |
import redisStore from 'cache-manager-redis-store'; | |
@Global() | |
@Module({ | |
imports: [ | |
CacheModule.registerAsync<ClientOpts>({ | |
imports: [ConfigModule], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const messages = [ | |
{ | |
id: 1, | |
text: 'text 1', | |
userId: 1 | |
}, | |
{ | |
id: 2, | |
text: 'text 2', | |
userId: 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Open https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/tree/main | |
2. Open google colab for | |
https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI/blob/main/Retrieval_based_Voice_Conversion_WebUI_v2.ipynb | |
3. Change pip version to 22.2 | |
4. python -m pip install pip==22.2 | |
5. git clone https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI.git |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# !/bin/sh | |
# Check if Nginx is installed | |
if which nginx >/dev/null 2>&1; then | |
echo "Nginx is installed." | |
else | |
echo "Nginx is not installed." | |
echo "Installing Nginx" | |
# Install the prerequisites: |