Skip to content

Instantly share code, notes, and snippets.

@rebane2001
rebane2001 / glass-with-controls.html
Last active July 10, 2025 05:34
glass effect test css/svg thing (messy) - demo: https://codepen.io/rebane2001/details/OPVQXMv
<div style="position:absolute;top:-999px;left:-999px">
<svg
id="effectSvg"
width="200"
height="200"
viewBox="0 0 200 200"
xmlns="http://www.w3.org/2000/svg">
<filter id="displacementFilter4">
You are PLAN, an AI strategist operating inside Cursor.
Mode: PLAN (read-only, no code changes). Your primary function is to meticulously analyze the user's request and the existing codebase to formulate a detailed, step-by-step action plan. You MUST follow the phases outlined below, rigorously adhering to the explicit exploration requirements to prevent premature planning based on assumptions.
# Mission
## Phase 1: Contextual Exploration & Analysis (Mandatory First Step – No Assumptions)
**Objective:** To deeply and accurately understand the relevant parts of the codebase *before* proposing any plan. You MUST actively use your available tools. The thoroughness of this phase is paramount to the success of the plan. While the following actions are prescribed, adapt their depth to the task's complexity and scope, ensuring the *spirit* of each exploration area is covered and a minimum of **two distinct tool call types** (e.g., `read_file` and `codebase_search`) are utilized before concluding this phase.
**Co

Parser Resolution Plan for Interface Support

After analyzing the failing tests and parser errors, I've identified several issues with interface method declarations and type handling. This document outlines a detailed plan to fix the parser to properly support interfaces.

Issues Identified

  1. Method Declaration Syntax: Parser fails to handle both dot notation (Person.greet()) and colon notation (Person:greet()).

  2. Interface Method Signatures: Fails to parse method signatures like greet() tea; in interface definitions.

@jlia0
jlia0 / agent loop
Last active July 18, 2025 20:40
Manus tools and prompts
You are Manus, an AI agent created by the Manus team.
You excel at the following tasks:
1. Information gathering, fact-checking, and documentation
2. Data processing, analysis, and visualization
3. Writing multi-chapter articles and in-depth research reports
4. Creating websites, applications, and tools
5. Using programming to solve various problems beyond development
6. Various tasks that can be accomplished using computers and the internet
@echohive42
echohive42 / latent_researcher.txt
Last active March 4, 2025 10:13
latent researcher
import os
import json
from anthropic import AsyncAnthropic
from termcolor import colored
import asyncio
from datetime import datetime
import shutil
import re
# CONSTANTS
@t3dotgg
t3dotgg / try-catch.ts
Last active July 18, 2025 10:01
Theo's preferred way of handling try/catch in TypeScript
// Types for the result object with discriminated union
type Success<T> = {
data: T;
error: null;
};
type Failure<E> = {
data: null;
error: E;
};
@t3dotgg
t3dotgg / model-prices.csv
Last active July 18, 2025 23:04
Rough list of popular AI models and the cost to use them (cost is per 1m tokens)
Name Input Output
Gemini 2.0 Flash-Lite $0.075 $0.30
Mistral 3.1 Small $0.10 $0.30
Gemini 2.0 Flash $0.10 $0.40
ChatGPT 4.1-nano $0.10 $0.40
DeepSeek v3 (old) $0.14 $0.28
ChatGPT 4o-mini $0.15 $0.60
Gemini 2.5 Flash $0.15 $0.60
DeepSeek v3 $0.27 $1.10
Grok 3-mini $0.30 $0.50
@cmackenzie1
cmackenzie1 / updated_at.sql
Created January 31, 2025 16:16
PostgreSQL Updated at column trigger
-- Function to automatically update the updated_at column
CREATE OR REPLACE FUNCTION update_updated_at_column()
RETURNS TRIGGER AS $$
BEGIN
NEW.updated_at = NOW();
RETURN NEW;
END;
$$ LANGUAGE plpgsql;
-- Apply the trigger to all tables with an updated_at column
@N8python
N8python / pretrain.py
Created January 15, 2025 23:41
Simple character-level pretraining in MLX. Gets a roughly billion tokens/day for an 18M parameter model on one M3 Max.
import json
import random
import mlx.optimizers as optim
import mlx.core as mx
import mlx.nn as nn
import numpy as np
from tqdm import tqdm
import time
from datetime import datetime
@deepfates
deepfates / convert_archive.py
Created November 17, 2024 19:33
Convert your twitter archive into a training dataset and markdown files
import argparse
import json
import logging
import os
import re
import shutil
from concurrent.futures import ProcessPoolExecutor, as_completed
from dataclasses import dataclass
from datetime import datetime
from typing import Any, Callable, Dict, List, Literal, Optional, Tuple