Skip to content

Instantly share code, notes, and snippets.

View chmouel's full-sized avatar
🚀

Chmouel Boudjnah chmouel

🚀
View GitHub Profile

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
@chmouel
chmouel / updgeminicli.sh
Last active August 10, 2025 09:17
update gemini-cli aur/arch package with latest, showing changelog betwee latest version
#!/usr/bin/env bash
# Author: Chmouel Boudjnah <chmouel@chmouel.com>
set -eufo pipefail
GITHUB_TOKEN="${GITHUB_TOKEN:-$(pass show github/chmouel-token)}"
latest=$(curl -H "Authorization: ${GITHUB_TOKEN}" -s https://api.github.com/repos/google-gemini/gemini-cli/releases | jq -r '[.[] | select(.prerelease == false and (.tag_name | contains("nightly") | not))][0].tag_name')
latest=${latest#v}
pkgversion=$(grep '^pkgver=' PKGBUILD)
pkgversion=${pkgversion#pkgver=}
@chmouel
chmouel / jira-pr.py
Last active September 7, 2025 17:41
#!/usr/bin/env -S uv run
# /// script
# requires-python = ">=3.12"
# dependencies = [
# "PyGithub",
# "jira",
# "requests",
# ]
# ///
#
@chmouel
chmouel / strava-route-elevation-stick-ubo-filter.js
Created May 12, 2025 09:56
Make strava route map and elevation sticky when scrolling down and looking at the segment... using ublockFilter
! — stick Strava’s elevation panel to the top
strava.com##[class^="MapAndElevationChart_mapContainer"]:style(position:sticky!important;top:0!important;background:#fff!important;z-index:10000!important;)
strava.com##[class^="MapAndElevationChart_chartContainer"]:style(position:sticky!important;top:0!important;background:#fff!important;z-index:10000!important;)
strava.com##[class^="SegmentsList_tableContainer"] thead:style(position:sticky!important;top:250px!important;background:#fff!important;z-index:9999!important;)