Skip to content

Instantly share code, notes, and snippets.

View adeleke5140's full-sized avatar
💭
crafting software

Kehinde adeleke5140

💭
crafting software
View GitHub Profile
@adeleke5140
adeleke5140 / compress-video.sh
Last active July 22, 2025 10:54
Script to compress video with ffmpeg
#!/bin/bash
DIR="${1:-.}"
CRF="${2:-28}"
if ! command -v ffmpeg &> /dev/null; then
echo "Error: ffmpeg is not installed or in PATH"
fi
if [ ! -d "$DIR" ]; then
@adeleke5140
adeleke5140 / en-vector-databases.mdx
Created May 2, 2025 21:24
The vector databases reference
title description
Storing Embeddings in A Vector Database | Mastra Docs
Guide on vector storage options in Mastra, including embedded and dedicated vector databases for similarity search.

import { Tabs } from "nextra/components";

Storing Embeddings in A Vector Database

After generating embeddings, you need to store them in a database that supports vector similarity search. Mastra provides a consistent interface for storing and querying embeddings across different vector databases.

---
title: "Storing Embeddings in A Vector Database | Mastra Docs"
description: Guide on vector storage options in Mastra, including embedded and dedicated vector databases for similarity search.
---
import { Tabs } from "nextra/components";
## Storing Embeddings in A Vector Database
After generating embeddings, you need to store them in a database that supports vector similarity search. Mastra provides a consistent interface for storing and querying embeddings across different vector databases.
---
title: "Storing Embeddings in A Vector Database | Mastra Docs"
description: Guide on vector storage options in Mastra, including embedded and dedicated vector databases for similarity search.
---
import { Tabs } from "nextra/components";
## Storing Embeddings in A Vector Database
After generating embeddings, you need to store them in a database that supports vector similarity search. Mastra provides a consistent interface for storing and querying embeddings across different vector databases.
@adeleke5140
adeleke5140 / vector-databases.ts
Created April 30, 2025 14:53
Comparing en to ja file
---
title: "Storing Embeddings in A Vector Database | Mastra Docs"
description: Guide on vector storage options in Mastra, including embedded and dedicated vector databases for similarity search.
---
import { Tabs } from "nextra/components";
## Storing Embeddings in A Vector Database
After generating embeddings, you need to store them in a database that supports vector similarity search. Mastra provides a consistent interface for storing and querying embeddings across different vector databases.
@adeleke5140
adeleke5140 / custom-vscode.css
Created April 19, 2024 22:44
vscode vtuber logo
.editor-group-watermark > .letterpress{
background-image: url("https://github.com/Aikoyori/ProgrammingVTuberLogos/blob/main/VSCode/VSCode.png?raw=true");
opacity: 0.9
}
@adeleke5140
adeleke5140 / index.ts
Last active December 27, 2023 22:09
Styling React Select
const MultiSelect = ({
options,
inputId,
name,
inputPlaceholder,
...rest
}: MultiSelectProps) => {
return (
<Select
{...rest}
@adeleke5140
adeleke5140 / example.jsx
Created December 7, 2023 23:49
Custom hook to get and use a container for React portals
const Notifications = () => {
const { container, ref } = useModalParent<HTMLDivElement>();
return (
<div ref={ref}>
// rest of code
<Popover.Portal container={container}>
// rest of code
</Popover/>
</div>
)
@adeleke5140
adeleke5140 / axios.ts
Last active November 8, 2023 13:30
Access and Refresh Token feature with Axios in NextJS
import axios, { CreateAxiosDefaults } from 'axios'
import { refreshToken as refreshTokenAdapter} from './session'
export const getJSONContentHeaders = () => {
"Content-Type": "application/json",
Accept: "application/json"
}
@adeleke5140
adeleke5140 / blob.ts
Created November 2, 2023 19:55
Conversion between js formats
const blob = b64toBlob(imageSrc.replace(/^data:image\/jpeg;base64,/, ""));
const file = new File([blob], "profile.jpeg", { type: "image/jpeg" });
const blobURl = URL.createObjectURL(file);