Skip to content

Instantly share code, notes, and snippets.

View abdennour's full-sized avatar
On vacation

abdennour abdennour

On vacation
View GitHub Profile
abdennour /
Last active January 9, 2024 08:00
Clean ACS Operator from SecuredCluster in Openshift
oc -n stackrox delete securedcluster --all
oc -n stackrox delete pvc --all
oc delete ns stackrox
oc get clusterrole,clusterrolebinding,role,rolebinding -o name | grep stackrox | xargs oc delete --wait
oc delete ValidatingWebhookConfiguration stackrox
oc delete scc -l ""
oc project rhacs-operator
oc delete sub rhacs-operator
abdennour /
Created January 6, 2023 05:12
In Parallel TAR Archive Subfolders - Bash
cd ${src}
for i in *
if [ -d "$i" ];then
tar czvf "${dest}/$i.tar.gz" -C "$i" .
echo skiping $i as it is not folder
abdennour /
Created July 2, 2022 21:58
Load Vault Keys / Fields into Filesystem Dynamically

usage secret/keys/tls/

abdennour /
Created June 26, 2022 07:00
PDF merge on WSL
sudo apt-get install poppler-utils -y
abdennour /
Created May 27, 2022 10:46
Redirect all HTTP to HTTPS - Ingress Traefik k3s
abdennour /
Created May 27, 2022 08:15
tmux cheat sheet
  • Ctrl+B, then % => split window vertifcally

  • Ctrl+B, then " => split window horiztionally

  • Ctrl+B, then o => Move cursor among panes

abdennour /
Created February 21, 2022 15:31
Get Cluster CIDR Range - Kubernetes
# Credit:
SVCRANGE=$(echo '{"apiVersion":"v1","kind":"Service","metadata":{"name":"tst"},"spec":{"clusterIP":"","ports":[{"port":443}]}}' | kubectl apply -f - 2>&1 | sed 's/.*valid IPs is //')
abdennour / Docerfile
Created November 10, 2021 17:36
Using Nginx Templates for building custom container images
FROM nginx:1.19-alpine-perl
COPY my-nginx.conf.template /etc/nginx/templates/
abdennour / Dockerfile
Created October 11, 2021 10:06
Dockerize VSCode codr-server
FROM centos:latest
# 初始化文件夹
RUN mkdir /www /www/server /www/wwwroot /www/env /www/bak /www/server/php74 /www/server/php56 /www/wwwroot/myapp \
&& yum update -y \
&& yum install -y nodejs zip unzip wget zsh vim make cmake gcc gcc-c++ libxml2 libxml2-devel git \
nodejs zip unzip sqlite-devel m4 autoconf nginx tree \
krb5-devel openssl openssl-devel curl curl-devel libjpeg \
libjpeg-devel libpng libpng-devel freetype freetype-devel \
pcre pcre-devel libxslt libxslt-devel bzip2 bzip2-devel \
AWSTemplateFormatVersion: "2010-09-09"
Description: Pipeline env setup
Description: "Email address to notify."
Type: String
Type: String