Skip to content

Instantly share code, notes, and snippets.

@sashagusev
sashagusev / sibling_admixture.R
Created September 18, 2025 12:55
Simulation of within-sibling admixture analysis for a diverging trait
set.seed(42)
options(digits=3)
# --- Parameters
# sibling pairs
N = 100e3
# unadmixed individuals (for population estimate)
N_unadmixed = 10e3
# number of variants
M = 100
@0xdevalias
0xdevalias / web-scraping-browser-rendering.md
Last active January 15, 2026 13:55
Some notes on techniques for extracting and rendering web content, including approaches to automation, limitations, and emerging service models.
@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.
@t3dotgg
t3dotgg / try-catch.ts
Last active January 24, 2026 23:09
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;
};
@sikanhe
sikanhe / ReactCompilerPlugin.ts
Last active January 6, 2026 12:38
React Compiler plugin for ESBuild
import { readFileSync } from "node:fs"
import * as babel from "@babel/core"
import BabelPluginReactCompiler from "babel-plugin-react-compiler"
import type { Plugin } from "esbuild"
import QuickLRU from "quick-lru"
export function ReactCompilerEsbuildPlugin({
filter,
sourceMaps,
runtimeModulePath,
@chrisgherbert
chrisgherbert / chat-gpt-cliches.md
Last active July 29, 2025 14:58
ChatGPT Overused Words & Phrases

Chat GPT Cliches

Chat GPT has certain words and phrases that it uses way too much. Here's a rolling list of them. You can ask Chat GPT to avoid them by including custom instructions in the "Customize ChatGPT" menu.

  • A testament to
  • Additionally
  • Akin
  • Arguably
  • At the end of the day
  • Beacon
@bdsqqq
bdsqqq / vesper-dark.json
Last active October 29, 2025 18:45
Vesper theme for zed.dev
{
"$schema": "https://zed.dev/schema/themes/v0.1.0.json",
"name": "Vesper",
"author": "Rauno Freiberg",
"themes": [
{
"name": "Vesper",
"appearance": "dark",
"style": {
"border": "#101010",
@0xdevalias
0xdevalias / reverse-engineered-webpack-tailwind-styled-component.md
Last active January 14, 2026 18:22
Deep Dive into reverse engineering how some webpacked code relates to the styled-components / Tailwind-Styled-Component libs

Reverse Engineered Webpack Tailwind-Styled-Component

Deep Dive into reverse engineering how some webpacked code relates to the styled-components / Tailwind-Styled-Component libs.

Table of Contents

@rishi-raj-jain
rishi-raj-jain / index.ts
Last active December 29, 2025 02:40
Google OAuth 2.0 on the Edge with Hono and Cloudflare Workers
// Do enable nodejs_compat
// https://developers.cloudflare.com/workers/runtime-apis/nodejs/
import crypto from 'node:crypto'
import { Context, Hono } from 'hono'
const app = new Hono()
function generateJWT(payload, secret, expiresIn) {
const header = { alg: 'HS256', typ: 'JWT' }
const encodedHeader = base64UrlEncode(JSON.stringify(header))