Skip to content

Instantly share code, notes, and snippets.

@cablej
cablej / default.md
Created June 21, 2025 18:46
Cluely System prompt

<core_identity> You are an assistant called Cluely, developed and created by Cluely, whose sole purpose is to analyze and solve problems asked by the user or shown on the screen. Your responses must be specific, accurate, and actionable. </core_identity>

<general_guidelines>

  • NEVER use meta-phrases (e.g., "let me help you", "I can see that").
  • NEVER summarize unless explicitly requested.
  • NEVER provide unsolicited advice.
  • NEVER refer to "screenshot" or "image" - refer to it as "the screen" if needed.
  • ALWAYS be specific, detailed, and accurate.
@tomsiwik
tomsiwik / README.md
Last active May 6, 2025 23:44
How to proxy Cursor → OpenAPI → Python → Ollama

Make sure you run ollama serve (this is OpenAI-compatible http://localhost:11434)

Open cursor model settings and specify:

  • Specify http://localhost:8000/v1
  • Hit "Save" (no need to activate key)
  • Select gpt-4o and enjoy local model
uv venv
@dillionverma
dillionverma / lucide-react.d.ts
Last active July 3, 2025 11:57
How to stop @radix-ui, next/router and lucide-react auto-imports
declare module 'lucide-react' {
export * from 'lucide-react/dist/lucide-react.suffixed'
}
@danhollick
danhollick / tailwind-css-v4.mdc
Last active July 2, 2025 18:06
Cursor rules file for Tailwind CSS v4.0
// Update globs depending on your framework
---
name: tailwind_v4
description: Guide for using Tailwind CSS v4 instead of v3.x
globs: ["**/*.{js,ts,jsx,tsx,mdx,css}"]
tags:
- tailwind
- css
---
@t3dotgg
t3dotgg / try-catch.ts
Last active July 6, 2025 19:50
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;
};
@KristofferEriksson
KristofferEriksson / useTailwindBreakpoint.ts
Created February 2, 2024 10:55
React hook for triggering effects when layout changes due to Tailwind breakpoints
import { useEffect, useState } from "react";
import resolveConfig from "tailwindcss/resolveConfig";
// Update the path to your Tailwind config file
import tailwindConfig from "tailwind.config";
const useTailwindBreakpoint = ({
onBreakpointChange,
}: {
// eslint-disable-next-line no-unused-vars
@arunmmanoharan
arunmmanoharan / useFetcherWithReset.ts
Last active October 18, 2024 20:16
Remix Fetcher With Reset
import type { FetcherWithComponents } from "@remix-run/react";
import { useFetcher } from "@remix-run/react";
import { useEffect, useState } from "react";
import type { AppData } from "@remix-run/react/dist/data";
import type { SerializeFrom } from "@remix-run/server-runtime";
/**
* A higher-order function that creates a new FetcherWithComponentsReset instance, which extends the FetcherWithComponents interface.
* The new instance includes an additional method `reset` that can be used to reset the state of the fetcher.
*
@rphlmr
rphlmr / protect-routes.ts
Last active November 26, 2024 00:24
Protected routes middleware with HonoJS with Remix-Hono
import { getSession, session } from "remix-hono/session";
import { pathToRegexp } from "path-to-regexp";
/**
* Add protected routes middleware
*
*/
app.use(
protect({
@ramarivera
ramarivera / DynamicColorModule2.kt
Created January 14, 2023 08:50
React Native Kotlin module for reading Android system colors
package com.roxasroottoolbox
import android.content.res.Resources
import android.os.Build
import android.util.Log
import androidx.annotation.RequiresApi
import com.facebook.react.bridge.*
class DynamicColorModule2(reactContext: ReactApplicationContext) : ReactContextBaseJavaModule(reactContext) {
override fun getName() = "DynamicColorModule"
@andrelandgraf
andrelandgraf / createSitemap.ts
Last active January 30, 2025 12:03
sitemap.xml generator for remix.run
import childProcess from 'child_process';
import fs from 'fs';
import dotenv from 'dotenv';
import prettier from 'prettier';
const rootDir = process.cwd();
dotenv.config({
path: `${rootDir}/.env.production`,
});