Skip to content

Instantly share code, notes, and snippets.

Chmouel Boudjnah chmouel

Block or report user

Report or block chmouel

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
chmouel /
Last active Jun 5, 2019
Choose branch with FZF including preview diff with bat
chosen=$(git branch --sort=-committerdate --format '%(refname:short)' -l|grep -v heads/|fzf --border --preview "git log --no-merges --patch-with-stat {}|bat --language=diff --color=always" --bind CTRL-P:preview-up,CTRL-N:preview-down,CTRL-SPACE:preview-page-down --preview-window=up:80%)
[[ $1 == -n ]] && { echo $chosen ; return ;}
git checkout ${chosen}
View *vc-diff*.diff
diff --git a/ b/
index 4979654..ee0185d 100644
--- a/
+++ b/
@@ -4,17 +4,17 @@ Author: Vincent Demeester <>
Date: June 6 2019
## Objective
-Propose to mark knative/build as deprecated and drive user to the Tekton project for building their image. This doc should be used as a forum for external comment and questions, to resolve any concerns before the Steering Committee decides whether to adopt the proposal.
set -e
choosef() {
[[ -n $2 ]] && label="${2}"
[[ -n $3 ]] && jqb=$3 || jqb='.items[]'
kubectl get ${type} ${label} -o json|jq -r $jqb | fzf -1
PIPELINE=$(choosef pipeline)
set -e
SED=sed;type -p gsed >/dev/null 2>/dev/null && SED=gsed #osx blah
JOB_URL=$(hub ci-status -v| sed -n "/${JOB_NAME}/ { s/.*https/https/;p;}")
rm -f /tmp/.prjtlogs${JOB_NAME}.* # Cleanups
TMP=$(mktemp /tmp/.prjtlogs${JOB_NAME}.XXXXXX)
View *vc-diff*.diff
diff --git a/test/pipelinerun_test.go b/test/pipelinerun_test.go
index 97f170f1..df5963b3 100644
--- a/test/pipelinerun_test.go
+++ b/test/pipelinerun_test.go
@@ -27,6 +27,7 @@ import (
+ ""
chmouel / tekton-pull-from-ci-push-to-release.bash
Last active May 4, 2019
docker pull image from openshift ci and push to quay openshift-pipeline
View tekton-pull-from-ci-push-to-release.bash
set -ex
[[ -z ${v} ]] && {
echo "You need a release number i.e: 0.3.1"
for p in bash controller creds-init entrypoint git-init kubeconfigwriter nop webhook;do
docker pull${p}
docker tag${p}$p:v${v}
chmouel /
Created Apr 24, 2019
Convert yaml to json via the command line
#!/usr/bin/env bash
[[ -n $1 ]] && from=$1 || from=/dev/stdin
python3 -c 'import sys, yaml, json; json.dump(yaml.load(sys.stdin), sys.stdout, indent=4);print()' < ${from} | jq '.'
chmouel / os4-install.bash
Last active Apr 25, 2019
install openshift 4 in loop
View os4-install.bash
#!/usr/bin/env bash
# set -x
set -e
SD=$(readlink -f $(dirname $0))
IC=$(readlink -f $(dirname $0)/install-config.yaml )
function recreate() {
View os4-download-binary.bash
#!/usr/bin/env bash
# Chmouel Boudjnah <>
set -e
READLINK=readlink;type -p greadlink >/dev/null 2>/dev/null && READLINK=greadlink #osx brew readlink detection
SED=sed;type -p gsed >/dev/null 2>/dev/null && SED=gsed #osx brew sed detection
SD=$($READLINK -f $(dirname $0))
View pr-tektoncd-openshift.bash
PERSONAL_GIT_REMOTE=chmouel # usually your github username
RELEASE_VERSION=${1:-v0.2.0} # Tekton latest release from where you are going to release from
# detect current branch
currentb=$(git rev-parse --abbrev-ref HEAD)
# Push current branch to your user
git push ${PERSONAL_GIT_REMOTE} -u ${currentb}
You can’t perform that action at this time.