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 fs from 'fs' | |
import { pipeline } from '@xenova/transformers' | |
import { WaveFile } from 'wavefile'; | |
const options = { //Xenova/whisper-small configurations | |
chunk_length_s: 30, | |
stride_length_s: 5, | |
language: 'portuguese', | |
task: 'transcribe', | |
} |
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 React, { useEffect } from 'react'; | |
import styled from 'styled-components/native'; | |
import Animated, { | |
cancelAnimation, | |
Easing, | |
useAnimatedStyle, | |
useSharedValue, | |
withRepeat, | |
withTiming, | |
} from 'react-native-reanimated'; |
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 async function generateMetadata( | |
{ params }: { params: { slug: string } }): Promise<Metadata> { | |
const data: PostFullProps = await getData(params.slug); | |
return { | |
title: 'title of your page', | |
metadataBase: new URL("YOUR_BASE_URL"), | |
description: 'page description', | |
keywords: [], | |
authors: [{ name: 'YOUR NAME' }], |
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 crypto from "crypto"; | |
const algorithm = "aes-256-cbc"; //Using AES encryption | |
const Securitykey = crypto.randomBytes(32); | |
const initVector = crypto.randomBytes(16); | |
export const encryptMessage = (message: string) => { | |
const cipher = crypto.createCipheriv(algorithm, Securitykey, initVector); | |
let encryptedData = cipher.update(message, "utf-8", "hex"); | |
encryptedData += cipher.final("hex"); |
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 React, { useState } from 'react' | |
type ScrollProps = { | |
layoutMeasurement: { | |
height: number | |
} | |
contentOffset: { | |
y: number | |
} | |
contentSize: { |