This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @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'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type TimerHandle = NodeJS.Timeout | NodeJS.Immediate; | |
interface TimerEntry { | |
id: TimerHandle; | |
type: 'timeout' | 'interval' | 'immediate'; | |
created: number; | |
callback: () => void; | |
} | |
export class TimerManager { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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. | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'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, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { | |
// @ts-nocheck | |
FetchHttpClient, | |
HttpClient, | |
HttpClientRequest, | |
} from "@effect/platform" | |
import { Effect, Schedule, Duration, pipe } from "effect" | |
declare const EMPTY = '' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 { |
NewerOlder