This file contains 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 { Loader } from "@chakra-ui/react"; | |
import { ReactNode, useEffect } from "react"; | |
import { useNavigate } from "react-router-dom"; | |
type Props = { | |
children?: ReactNode; | |
}; | |
export const ProtectedRoute = ({ children }: Props) => { | |
const navigate = useNavigate(); |
This file contains 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
.input { | |
display: flex; | |
flex-direction: column; | |
justify-content: center; | |
padding: 20px; | |
border-top: solid 1px; | |
border-bottom: solid 1px; | |
height: 75px; | |
box-sizing: border-box; | |
} |
This file contains 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
type Doc = { | |
_id: string; | |
} | |
type User = Doc & { | |
name: string; | |
age: number; | |
} | |
const user1: User = { |
This file contains 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
Show hidden characters
{ | |
"ts-node": { | |
"transpileOnly": false, | |
"require": ["tsconfig-paths/register"], | |
"files": true, | |
"compilerOptions": {} | |
}, | |
"compilerOptions": { | |
"baseUrl": ".", |
This file contains 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
{ | |
"name": "next-episode-server", | |
"version": "1.0.0", | |
"description": "", | |
"main": "server.ts", | |
"scripts": { | |
"start": "nodemon --legacy-watch --exec ts-node -r tsconfig-paths/register ./src/server.ts", | |
"build": "tsc --project tsconfig.json && tsc-alias -p tsconfig.json", | |
"serve": "node -r tsconfig-paths/register dist/server.js" | |
}, |
This file contains 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
require('dotenv').config(); | |
const express = require('express'); | |
const app = express(); | |
const { MongoClient } = require('mongodb'); | |
const { ObjectId } = require('mongodb'); | |
const port = process.env.PORT || 3000; | |
const mongoUri = process.env.MONGO_URI || 'mongodb+srv://new-user386:[email protected]/?retryWrites=true&w=majority&appName=Cluster0'; | |
const client = new MongoClient(mongoUri); | |
const cors = require('cors'); |
This file contains 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
#!/usr/bin/bash | |
# Файл для хранения найденных цветов | |
output_file="colors.txt" | |
# Очистим файл, если он уже существует | |
echo "" > $output_file | |
# Функция для поиска hex-цветов | |
find_hex_colors() { |
This file contains 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
# floating-moment.rb | |
# ambient soundscape for relaxing and meditation | |
# Created by Sven Wachsmuth | |
# https://gist.github.com/sven-wachsmuth/0cc06cc0d698d8932ceb142dcf5231ba | |
use_bpm 60 | |
laenge_in_takten = 229 # length of the track in beats - 300 means relax 5 minutes :-) | |
# possible notes out of a sounds-well-scale |
This file contains 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
samps = "C:/Program Files (x86)/Sonic Pi/etc/my-samples" | |
use_bpm 170 | |
live_loop :metro do | |
sleep 1 | |
cue :beat | |
sleep 7 | |
cue :ambient | |
end |
This file contains 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
# Ambient experiment for Sonic Pi (http://sonic-pi.net/) | |
# | |
# The piece consists of three long loops, each of which plays one of | |
# two randomly selected pitches. Each note has different attack, | |
# release and sleep values, so that they move in and out of phase | |
# with each other. This can play for quite awhile without | |
# repeating itself :) | |
live_loop :note1 do | |
use_synth :hollow |
NewerOlder