Skip to content

Instantly share code, notes, and snippets.

View erikshestopal's full-sized avatar

Erik Shestopal erikshestopal

View GitHub Profile

DynamicInterval

Lightweight scheduler for running arbitrary work on a dynamic interval. Ideal for backoff retry loops, background autosaves, and heartbeat polling. Ensures runs never overlap and supports adaptive delays, jitter, and full lifecycle controls.

Features

  • Non-overlapping runs (no reentrancy) with automatic rescheduling after each run
  • Dynamic delay calculation via strategies (exponential, linear, constant, or custom)
  • Jitter support to avoid thundering herds (none, full, or bounded ±percentage)
  • Lifecycle controls: start, pause, resume, stop, runNow, resetBackoff

Beast Mode v3

Beast Mode is a custom chat mode for VS Code agent that adds an opinionated workflow to the agent, including use of a todo list, extensive internet research capabilities, planning, tool usage instructions and more. Designed to be used with 4.1, although it will work with any model.

Installation Instructions

  • Go to the "agent" dropdown in VS Code chat sidebar and select "Configure Modes".
  • Select "Create new custom chat mode file"
  • Select "User Data Folder"
  • Give it a name (Beast Mode)
@erikshestopal
erikshestopal / spec.md
Created July 17, 2025 00:29 — forked from CypherpunkSamurai/spec.md
Kiro AI System Prompt

System Prompt

Identity

You are Kiro, an AI assistant and IDE built to assist developers.

When users ask about Kiro, respond with information about yourself in first person.

You are managed by an autonomous process which takes your output, performs the actions you requested, and is supervised by a human user.

You talk like a human, not like a bot. You reflect the user's input style in your responses.

[
{
"tx_type": "charge",
"transaction_date": "2018-05-29 00:00:00",
"foreign_id": "charge:14508",
"amount": 8800,
"charge_id": null,
"description": "oral evaluation for a patient under three years of age and counseling with primary caregiver"
},
{
Directory structure:
└── powersync-ja-powersync-swift/
├── README.md
├── CHANGELOG.md
├── LICENSE
├── Package.resolved
├── Package.swift
├── Demo/
│ ├── README.md
│ └── PowerSyncExample/
@erikshestopal
erikshestopal / default.md
Created June 22, 2025 05:38 — forked from cablej/default.md
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.
import type { IO, IOTask, Json, RunTaskOptions } from '@trigger.dev/sdk';
import { Cause, Deferred, Effect, Exit } from 'effect';
export const runTask =
<T extends Json<T>, E = never>(
cacheKey: string,
effect: (task: IOTask, io: IO) => Effect.Effect<T, E, never>,
options?: RunTaskOptions & {
parseOutput?: (output: unknown) => T;
},
import * as Http from "@effect/platform/HttpClient"
import { Schema } from "@effect/schema"
import { Array, Config, Context, Data, Effect, Layer, flow } from "effect"
import { Inngest as Inngest_ } from "inngest"
class InngestRun extends Schema.Class<InngestRun>("InngestRun")({
run_id: Schema.String,
status: Schema.Literal("Running", "Completed", "Failed", "Cancelled"),
}) {
static decodeArray = Http.response.schemaBodyJsonScoped(
import * as Http from "@effect/platform/HttpClient"
import { Context, Effect, Layer, pipe } from "effect"
const headers = {
Accept:
"application/graphql-response+json; charset=utf-8, application/json; charset=utf-8",
"Content-Type": "application/json",
}
export class GraphQLClient extends Context.Tag("graphql-codegen/GraphQLClient")<
@erikshestopal
erikshestopal / README.md
Created October 28, 2023 03:41 — forked from mauron85/README.md
PM2 as a Windows Service under Local Service

PM2 as a Windows Service under Local Service

This is a PoC for running PM2 as a Windows Service under the Local Service account instead of the Local System account.

Prerequsites

  • Neither pm2 or pm2-windows-service installed yet. (The Powershell script will run npm i)
    • At the very least, you should run pm2-service-uninstall before running this script
  • npm and npm-cache global folders should be somewhere accessible to NT AUTHORITY\LocalService.