Skip to content

Instantly share code, notes, and snippets.

View WomB0ComB0's full-sized avatar
⚔️
Veni, vidi, vici

Mike Odnis WomB0ComB0

⚔️
Veni, vidi, vici
View GitHub Profile
@WomB0ComB0
WomB0ComB0 / iframe-remover.ts
Created July 21, 2025 22:34
iframe-remover.ts and related files - with AI-generated descriptions
/**
* @name Playwright Iframe Remover
* @description This script uses Playwright to open a website and inject a script
* that removes/hides all iframes, effectively blocking many types of ads
* and pop-ups. It's designed to work on sites that block developer tools.
* @author Gemini
*/
import { execSync } from 'node:child_process';
import type { Browser, Page } from 'playwright';
@WomB0ComB0
WomB0ComB0 / time-manager.ts
Created July 10, 2025 21:46
time-manager.ts and related files - with AI-generated descriptions
type TimerHandle = NodeJS.Timeout | NodeJS.Immediate;
interface TimerEntry {
id: TimerHandle;
type: 'timeout' | 'interval' | 'immediate';
created: number;
callback: () => void;
}
export class TimerManager {
@WomB0ComB0
WomB0ComB0 / file-doc-gen.ts
Last active July 8, 2025 05:40
file-doc-gen.ts and related files - with AI-generated descriptions
#!/usr/bin/env bun
import { GoogleGenAI } from "@google/genai";
import { writeFile, readdir, stat } from "fs/promises";
import { join, extname, basename } from "path";
import { execSync } from "child_process";
/**
* @interface GenerationConfig
* @description Configuration options for the AI text generation model.
*/
@WomB0ComB0
WomB0ComB0 / effect-data-loader.tsx
Created July 5, 2025 16:59
effect-data-loader.tsx and related files - with AI-generated descriptions
'use client';
import { ClientError } from './client-error.tsx';
import { Loader } from './loader.tsx';
import { fetcher, FetcherError, get, type QueryParams, type FetcherOptions } from './effect-fetcher.ts';
import { parseCodePath } from './util/utils.ts';
import {
useSuspenseQuery,
useQueryClient,
@WomB0ComB0
WomB0ComB0 / effect-fetch.ts
Last active July 5, 2025 17:56
effect-fetch.ts and related files - with AI-generated descriptions
import {
// @ts-nocheck
FetchHttpClient,
HttpClient,
HttpClientRequest,
} from "@effect/platform"
import { Effect, Schedule, Duration, pipe } from "effect"
declare const EMPTY = ''
@WomB0ComB0
WomB0ComB0 / elysia-starter-advanced.ts
Last active June 28, 2025 20:40
elysia-starter-advanced.ts and related files - with AI-generated descriptions
import { Elysia } from "elysia";
import { cors } from '@elysiajs/cors';
import { serverTiming } from '@elysiajs/server-timing';
import type { SocketAddress } from "bun";
import { rateLimit, DefaultContext, type Generator } from 'elysia-rate-limit';
import { ip } from 'elysia-ip';
import { opentelemetry } from '@elysiajs/opentelemetry'
import { record } from '@elysiajs/opentelemetry';
import { BatchSpanProcessor } from '@opentelemetry/sdk-trace-node'
import { OTLPTraceExporter } from '@opentelemetry/exporter-trace-otlp-proto'
@WomB0ComB0
WomB0ComB0 / elysia-starter.ts
Last active June 27, 2025 08:23
elysia-starter.ts and related files - with AI-generated descriptions
import { Elysia } from "elysia";
import { cors } from '@elysiajs/cors';
import { serverTiming } from '@elysiajs/server-timing';
import type { SocketAddress } from "bun";
import { rateLimit, DefaultContext, type Generator } from 'elysia-rate-limit';
import { ip } from 'elysia-ip';
const Stringify = (o: object) => JSON.stringify(o, null, 2)
const ipGenerator: Generator<{ ip: SocketAddress }> = (_req, _serv, { ip }) => ip?.address ?? 'unknown'
@WomB0ComB0
WomB0ComB0 / gitcontent
Created June 22, 2025 06:12
gitcontent and related files - with AI-generated descriptions
#!/usr/bin/env bun
import { $ } from "bun";
// Function to fetch contents from GitHub API
// It now takes a 'depth' and 'currentDepth' for intelligent display and control
async function fetchContents(owner, repo, path = "", options = { maxDepth: Infinity, currentDepth: 0 }) {
const url = `https://api.github.com/repos/${owner}/${repo}/contents/${path}`;
const indent = " ".repeat(options.currentDepth); // For visual indentation
@WomB0ComB0
WomB0ComB0 / webp.py
Last active June 22, 2025 06:38
webp.py and related files - with AI-generated descriptions
#!/usr/bin/env python3
import os
import subprocess
from pathlib import Path
from concurrent.futures import Future, ThreadPoolExecutor, as_completed
from time import perf_counter
import shutil
import logging
from typing import List, Set
@WomB0ComB0
WomB0ComB0 / sponsor.ts
Created June 2, 2025 23:43
sponsor.ts and related files - with AI-generated descriptions
import { Octokit } from '@octokit/rest';
import { env, argv } from 'bun';
function selfExecute<T extends { new(...args: any[]): {} }>(constructor: T): T {
new constructor();
return constructor;
}
@selfExecute
class Main {