Skip to content

Instantly share code, notes, and snippets.

View sergiycheck's full-sized avatar
🏠
Working from home

Serhii sergiycheck

🏠
Working from home
View GitHub Profile
# !/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:
@sergiycheck
sergiycheck / gist:056e98d6e37345a38f6dfd4e5a81406e
Created September 27, 2024 17:20
How to use Retrieval-based-Voice-Conversion-WebUI with google colab debug way
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
@sergiycheck
sergiycheck / users-messages-join.js
Created March 31, 2023 22:00
join with lookup tables on js
const messages = [
{
id: 1,
text: 'text 1',
userId: 1
},
{
id: 2,
text: 'text 2',
userId: 1
@sergiycheck
sergiycheck / cust-dynamic-redis-cache.module.ts
Created July 2, 2022 10:33
nest js redis cache dynamic global module
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],
@sergiycheck
sergiycheck / photoPreview.tsx
Created May 23, 2022 12:04
photo preview component with react, chakra and FileReader
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>();
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
@sergiycheck
sergiycheck / js
Created November 11, 2021 14:22
find num in string
function findNumInString(str) {
const arrMatches = str.match(/\d+/g);
const num = Number(arrMatches[0]);
return num ? num : 0;
}
@sergiycheck
sergiycheck / js
Last active November 11, 2021 14:22
traverse child elements dom
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);
});
}