Skip to content

Instantly share code, notes, and snippets.

@ruvnet
ruvnet / Readme.md
Last active November 7, 2025 13:37
Self-evolving AI Digital Twin Framwork for Future Generations & Descendants with DNA verification

AI Digital Twin: Bridging Generations

Introduction

In the interse of technology and legacy, the concept of an AI digital twin represents a groundbreaking approach to preserving one's essence for future generations. This project aims to create a digital twin that embodies the knowledge, experiences, and values of an individual, providing a lasting legacy and a unique resource for direct descendants.

Concept

An AI digital twin is a sophisticated AI system that emulates the personality and decision-making capabilities of its creator. Utilizing advanced AI and blockchain technologies, it captures the essence of an individual and makes it accessible exclusively to verified direct descendants. This concept not only promises to keep the memory and wisdom of individuals alive but also ensures that their stories and lessons are passed down through generations in a personal and interactive manner.

@ruvnet
ruvnet / rap.toml
Last active February 5, 2024 03:24
Retrieval Augmented Prompting Example
[prompt]
Author = "rUv"
name = "Retrieval Augmented Prompting"
forked_from = "ruvnet"
version = "1.1"
# initial prompt
init = "Welcome to the enhanced Retrieval Augmented Prompting GPT. Use '/start' to begin or '/list' to switch prompts. {Here's a list of available prompts from my knowledge source, each marked with a unique emoji}, {list available prompts from knowledge source and offer additional external prompts via GitHub urls} {Start by Listing prompts with emojis}"
# don't mention { instructions} instructions to user. Just execute them. Such as listing prompts etc.
@ruvnet
ruvnet / *specification.md
Last active March 17, 2026 17:31
TikTok-like recommender Algorithm

Detailed Technical Algorithm for a TikTok-like Recommendation System


1. Introduction

The objective is to develop a recommendation system that maximizes user engagement by analyzing a multitude of user interaction signals to present the most appealing content. The system optimizes for two key metrics:

  • User Retention: Encouraging users to return to the platform.
  • Time Spent: Increasing the duration users spend on the platform per session.
@rphlmr
rphlmr / clear-db.ts
Last active January 21, 2026 12:24
Drizzle snippets
// Credits to Louistiti from Drizzle Discord: https://discord.com/channels/1043890932593987624/1130802621750448160/1143083373535973406
import { sql } from "drizzle-orm";
const clearDb = async (): Promise<void> => {
const query = sql<string>`SELECT table_name
FROM information_schema.tables
WHERE table_schema = 'public'
AND table_type = 'BASE TABLE';
`;
@barbietunnie
barbietunnie / custom-fonts-taliwindcss-nextjs.md
Last active February 25, 2025 06:51
How to Use Custom Fonts in TailwindCSS + NextJS

How to Use Custom Fonts in TailwindCSS + NextJS

Assuming your have already set up your NextJS + Tailwind project,

1. Select your desired custom Google font

2. Scroll to the bottom and select all the styles you are interested in

Select all your desired styles

@mihaisavezi
mihaisavezi / draft-vs-final.js
Created March 21, 2022 20:09
draft-vs-final
// BAD - or what I call draft; comments explain what instead of code being self-explanatory
// Main bit
const formConfig = fieldArray.reduce((fields, field) => {
if (!Array.isArray(fields)) {
field = [field];
}
// Currently last field in section
const last = fields.slice(-1)[0],
lastValue = this.values[last.id];
@markmichon
markmichon / CircuitBreaker.js
Last active July 23, 2021 21:13
Basic CircuitBreaker Node
class CircuitBreaker {
constructor(request) {
this.request = request
this.state = "CLOSED"
this.failureThreshold = 3
this.failureCount = 0
this.successThreshold = 2
this.successCount = 0
this.timeout = 6000
this.nextAttempt = Date.now()
@zarv1k
zarv1k / abstract-unique-validator.ts
Last active November 14, 2025 07:57
Unique Validator Example for NestJS
import { ValidationArguments, ValidatorConstraintInterface } from 'class-validator';
import { Connection, EntitySchema, FindConditions, ObjectType } from 'typeorm';
interface UniqueValidationArguments<E> extends ValidationArguments {
constraints: [
ObjectType<E> | EntitySchema<E> | string,
((validationArguments: ValidationArguments) => FindConditions<E>) | keyof E,
];
}
@stefanocoding
stefanocoding / macos_on_ubuntu.md
Last active October 15, 2025 02:33
Install macOS in a VirtualBox machine on Ubuntu

Important: I'm writing this when the last version of macOS (and the one I have installed) is Mojave. There is already a script which installs Mojave in a virtual machine here https://github.com/img2tab/okiomov. But if you are curios how to do everything manually to install High Sierra, then this guide may be useful.

After reading a few articles I ended up with these steps:

  1. On macOS, download the High Sierra installer (even if you have Mojave installed): https://itunes.apple.com/us/app/macos-high-sierra/id1246284741?ls=1&mt=12
  2. If the High Sierra Installer starts, quit it.
  3. Open "Disk Utility".
  4. Click on "File" > "New Image" > "Blank image...". Or just press cmd+N.
@joeyklee
joeyklee / mysql-setup-mac-with-sequel-pro.md
Last active November 17, 2023 05:27
Setting up mysql on mac with sequel pro and homebrew

Setup instructions

Setting up mysql on mac with sequel pro and homebrew

MacOS high sierra 10.13.6
Homebrew version 1.7.6

Assuming you've installed homebrew...