Skip to content

Instantly share code, notes, and snippets.

CI has gotten too slow and it's blocking our PRs. Figure out what jobs are run on PRs and then determine why it's slow. Use subagents to investigate whether there are language specific things we can do to speed things up (such as running tests in parallel, increasing threads, etc.).
Now, it's important that everything you present as an improvement is fully data driven. Push a PR and then push commits to test various things you think will speed it up. Feel free to push temporary workflows to test theories, if needed. You should also look into Blacksmith-specific optimizations. Just make sure you don't use deprecated actions, and make sure you check whether blacksmith has automatic caching before you reach for things like Sticky Disk.
Sometimes a small refactor can significantly speed up CI, so try wacky things if you think it might have a big impact, but be sure to present any implications the change has (but be concise).
One pitfall we see a lot is running on too small of runners and thinking increasing ru
@jahands
jahands / README.md
Last active September 27, 2026 11:45
axiom-grafana#141 before/after screenshots
@jahands
jahands / glob.ts
Last active May 3, 2026 11:41
slop-fork of opencode glob/grep tools to allow multiple patterns
import { realpathSync } from 'node:fs'
import path from 'node:path'
import { tool } from '@opencode-ai/plugin'
import { Effect, Option } from 'effect'
import * as Stream from 'effect/Stream'
import type { ToolContext } from '@opencode-ai/plugin'
const GLOB_DESCRIPTION = `- Fast file pattern matching tool that works with any codebase size
- Supports glob patterns like "**/*.js", "src/**/*.ts", "!foo/**"
import { getCloudflareAccountId } from '@repo/alchemy-helpers/cloudflare'
import { postgresql, pulumi } from '@repo/pulumi'
import * as planetscale from '@repo/pulumi-planetscale' // added via `pulumi package add terraform-provider planetscale/planetscale`
import { HyperdriveConfig } from '@pulumi/cloudflare'
import { validateResourceName } from '../lib/schema.ts'
import type { CloudflareAccountId } from '@repo/alchemy-helpers/cloudflare'
import type { HyperdriveConfigArgs } from '@pulumi/cloudflare'
@jahands
jahands / prompt-shortcuts.ts
Created April 10, 2026 13:10
opencode prompt shortcuts plugin
import { fmt } from 'llm-tools'
import type { Plugin } from '@opencode-ai/plugin'
const PROMPT_SHORTCUTS = {
'#explore': fmt.oneLine(`
Use explore agents to get a better understanding of
relevant systems before you dive into the details yourself.
`),
'#plan': fmt.oneLine(`
@jahands
jahands / script_dir.sh
Created October 13, 2025 09:48
Resolve absolute path to script dir
#!/bin/sh
set -eu
# Returns the absolute directory of this script, resolving file-level symlinks.
# Usage:
# script_dir="$(get_script_dir)" || exit 1
# printf 'script_dir=%s\n' "$script_dir"
get_script_dir() {
# Ensure readlink exists (portable use; no -f).
@jahands
jahands / zoxide-wrapper.sh
Last active September 9, 2025 10:27
zoxide wrapper to prevent leaving current repo (add to .zshrc)
# alias to jump to repo root
alias zz='cd $(git rev-parse --show-toplevel)'
# global cache for repo root
typeset -A _ZO_REPO_CACHE
# custom zoxide wrapper to prevent leaving the repo
function z() {
# special cases: use regular zoxide behavior
# "-" = jump to previous dir, $HOME = unlikely to be a git repo
@jahands
jahands / context.ts
Last active October 30, 2024 21:13
Workflows auto capture to Sentry inside step.do() callback
import { NonRetryableError } from 'cloudflare:workflows'
import { initWorkflowSentry } from '../helpers/sentry'
import type { WorkflowEvent, WorkflowStep, WorkflowStepConfig } from 'cloudflare:workers'
import type { Toucan } from 'toucan-js'
import type { Bindings } from '../types'
/** Workflow context (similar to Hono context) */
export class WorkflowContext<Params = unknown> {
@jahands
jahands / Earthfile
Created February 14, 2024 14:57
Go multiplatform docker builds
VERSION 0.8
PROJECT jahands/docker
# Local targets:
tidy:
LOCALLY
RUN go mod tidy
build-local:
LOCALLY
@jahands
jahands / repeat.ts
Last active January 8, 2023 17:08
Repeat.dev to Notion Dashboard https://repeat.dev
import { Client as NotionClient } from '@notionhq/client';
import formatISO from 'date-fns/formatISO'
import { utcToZonedTime } from 'date-fns-tz'
import { ThrottledQueue, auth } from '@jahands/msc-utils';
let notion: NotionClient;
function setup(env: Repeat.Env) {
if (!notion) {
notion = new NotionClient({