Skip to content

Instantly share code, notes, and snippets.

View chmouel's full-sized avatar
🚀

Chmouel Boudjnah chmouel

🚀
View GitHub Profile
#!/usr/bin/env bash
#
# Reproduce the resolver goroutine leak fixed by tektoncd/pipeline#10098.
#
# The default mode creates many PipelineRuns whose TaskRef is resolved by the
# git resolver against an in-cluster HTTP server that accepts requests and never
# replies. With a short git resolver fetch-timeout, the resolver reconciler's
# timeout case wins, then the worker goroutine blocks forever while sending on
# an unbuffered result channel in vulnerable builds.
#
#!/usr/bin/env -S uv run --script
# /// script
# dependencies = ["psycopg2-binary"]
# ///
"""Migrate atuin server.db (SQLite) -> PostgreSQL."""
import sqlite3
import sys
import uuid
import psycopg2

Title Implement GraphQL batch fetching for .tekton files

Type Feature

Description Introduce support for fetching multiple .tekton directory files using the GitHub GraphQL API instead of individual REST API calls. This change enables batching of file retrieval into a single request, reducing API usage and improving performance.

Acceptance Criteria

Phase 1 Migration: openshift-pipelines → tektoncd — Next Steps

Completed (code changes)

  • hack/generate-releaseyaml.sh lines 4–6: Updated TARGET_REPO_CONTROLLER, TARGET_REPO_WATCHER, TARGET_REPO_WEBHOOK defaults to ghcr.io/tektoncd/...
  • hack/second-controller.py lines 52 & 91: Updated help text and --controller-image default to ghcr.io/tektoncd/...

GitHub Admin (manual, one-time)

Using Gemini CLI for Large Codebase Analysis

When analyzing large codebases or multiple files that might exceed context limits, use the Gemini CLI with its massive context window. Use gemini -p to leverage Google Gemini's large context capacity.

File and Directory Inclusion Syntax

Use the @ syntax to include files and directories in your Gemini prompts. The paths should be relative to WHERE you run the gemini command:

@chmouel
chmouel / jump-zellij-session-fzf-zsh-completion.zsh
Created January 10, 2026 09:29
Jump to zellij session with fzf and zsh completion
function z() {
if [[ -n ${1} ]]; then
zellij attach -c ${1}
else
local session
nmb=$(zellij list-sessions -n|grep -cv EXITED)
[[ ${nmb} == 0 ]] && return
(( nmb += 2 ))
session=$(zellij list-sessions -r|grep -v EXITED | fzf --ghost "Zellij Session" --ansi -0 --height=${nmb} || return)
[[ -n ${session} ]] && zellij attach -c "${session%% *}"

Investigation Plan: E2E Test Failure - TestGithubPushRequestGitOpsCommentCancel

Problem Summary

The E2E test TestGithubPushRequestGitOpsCommentCancel is failing after 111.40 seconds. The test exercises the GitOps comment-based cancellation feature for push events.

Failure Timeline

  • 05:54:58 - /test comment triggers third PipelineRun creation
  • 05:55:00 - Third PipelineRun created (pipelinerun-on-push-wlddg)
#!/usr/bin/env -S uv --quiet run --script
# /// script
# requires-python = ">=3.12"
# dependencies = [
# "numpy>=1.24",
# "pillow>=9.0"
# ]
# ///
"""
Five-Iteration Bezel Trimmer
@chmouel
chmouel / make-claude-code-ctrl-v-on-linux-works.md
Last active January 4, 2026 11:31
paste image from clipboard

Work with Claude Code / Gemini / Codex CLI

Enable Ctrl+V image pasting for AI agents (for example, Claude Code) on Linux and macOS so the agent can access the currently copied image.

Assume a tmp/ directory at the repository root (or it will fallback to /tmp) that is listed in .gitignore.

Add the following shell function to .zshrc or .bashrc. Ensure wl-paste, wtype, and notify-send are installed (typically available on standard Linux distributions).

Then add the corresponding configuration to Kitty.

#!/usr/bin/env bash
set -eufo pipefail
namespace=gosmee
savedir=/tmp/save
targetdir=/tmp
if ! kubectl get ns ${namespace} >/dev/null 2>/dev/null; then
namespace=pipelines-as-code
if ! kubectl get ns ${namespace} >/dev/null 2>/dev/null; then
namespace=openshift-pipelines