Skip to content

Instantly share code, notes, and snippets.

View chmouel's full-sized avatar
🤨
Kuberneting

Chmouel Boudjnah chmouel

🤨
Kuberneting
View GitHub Profile
@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 <[email protected]>
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;)
@chmouel
chmouel / doloop.zsh
Created April 23, 2025 13:03
doloop function again and again
doloop () {
local timeout label
label="Press any key to continue"
[[ $1 == -t* ]] && {
timeout="-t${1#-t}"
label="Waiting for ${1} seconds, or press any key to continue"
shift
}
[[ ${1} == "-n" ]] && {
shift

I am going to copy you a jira template, and I will be copying to you a bunch of discussions and context after that, can you help me make the jira issue and provide a title for it? Make sure to output as jira formatting and make it easy to copy and paste directly on the jira textbox

Jira Template


h1. Story (Required)