Skip to content

Instantly share code, notes, and snippets.

View adeleke5140's full-sized avatar
💭
crafting software

Kenny adeleke5140

💭
crafting software
View GitHub Profile
@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);
@adeleke5140
adeleke5140 / reademe.md
Last active October 31, 2023 12:49
Dependency Injection in React

Dependency Injection in ReactJS

This is a conversation on the DI pattern in ReactJS.

This article from the folks at 8th Light is great. The author explains how it makes component very easy to test. It encourages unit testing rather than integration testing.

In essence:

It also allows for substitution of a dependency with a mock, or fake, during testing.