Skip to content

Instantly share code, notes, and snippets.


Nadjmou BOINA boina-n

View GitHub Profile
boina-n /
Created Dec 17, 2018
ldap search for CN
cat /tmp/list.cuid.txt | while read line ; do echo $( echo "$line;"$(ldapsearch -H ldaps://$ldapserver -w $ldappassword -b "dc=domain,dc=exemple,dc=com" -D "CN="$cuid",OU=Utilisateurs,OU=France Telecom,DC=domain,DC=exemple,DC=com" -s sub "CN=$line" | grep "displayName:\|department:\|telephoneNumber:\|mail:" | awk -F ":" '{ $1 ~ "telephone ; print $2 }' | tr '\n' ';' ) ); done | tee /tmp/list.cuid.csv
View gist:5fa1013f84ce4fc2aa1ed278eb16a99c
# Get label of each nodes:
oc get nodes -o=json | jq '.items[] |, .metadata.labels'
boina-n / curl.txt
Last active Jun 24, 2020
Curl and openssl for verification of SSL certificat - CheatSheet
View curl.txt
$ hostname=app20-nadj2-test.apps.fr1.di-paas.domain
# If you are just interested in the code response with curl
$ curl -s -o /dev/null -vL $hostname 2>&1 | grep "<\|>"
> GET / HTTP/1.1
> Host: app20-nadj2-test.apps.fr1.di-paas.domain
> User-Agent: curl/7.64.1
> Accept: */*
boina-n / pvc-resizing.txt
Last active Jun 24, 2020
How to extend PVC. #Kubernetes #Openshift
View pvc-resizing.txt
## How to extend a PV:
# Deploy a test app
oc new-app --template=openshift/httpd-example --name=app01
# Create a PVC
View gist:a59efdcae5286e3896bf054f5e96ce9e
$ oc new-app --template=httpd-example -p name=$appname
boina-n /
Last active Jun 1, 2020
set proxy for apt in ubuntu
cat <<EOF > /etc/apt/apt.conf.d/01proxy
Acquire::http::Proxy ""; EOF
boina-n / shell-trick01.txt
Created Jun 7, 2017
How to find a file containing a text
View shell-trick01.txt
# The text in the file to be found: "83oMef5367"
find . -type f -exec grep -nH "83oMef5367" {} \;
boina-n /
Created Oct 22, 2017
Tshark a DNS Packet
$ wc -l ok.cleaning_center.pcap.20151201.19h01m17s-1448992877.645994-1448992920.921620.v.1.txt
8994730 ok.cleaning_center.pcap.20151201.19h01m17s-1448992877.645994-1448992920.921620.v.1.txt
From resperf source:
static char *qtypes[] = {"A", "NS", "MD", "MF", "CNAME", "SOA", "MB", "MG",
"MR", "NULL", "WKS", "PTR", "HINFO", "MINFO", "MX", "TXT",
"AAAA", "SRV", "NAPTR", "A6", "AXFR", "MAILB", "MAILA", "*", "ANY"};
boina-n /
Last active Jun 1, 2020 — forked from 3noch/
How to add a Keybase user to your repo using git-crypt
keybase track < user>
keybase pgp pull < user>
gpg --edit-key < user>
  > lsign
  > save
git-crypt add-gpg-user < user>
boina-n /
Created Jun 1, 2020
Send email with bash in in TLS, SSL or in plain text
subject="Subject of my email"
txtmessage="This is the message I want to send"
from_name='N BOINA'
rcpt_name='Nicolas Hulot'
You can’t perform that action at this time.