This is somes personnals documentation build all long my career. You will find it only in the english version.

Sections

POO 1# Convert your json in object and put it in variable 2$a = Get-Content 'D:\temp\mytest.json' -raw | ConvertFrom-Json 3$a.update | % {if($_.name -eq 'test1'){$_.version=3.0}} 4 5$a | ConvertTo-Json -depth 32| set-content 'D:\temp\mytestBis.json' Example updating a XML 1#The file we want to change 2$xmlFilePath =...

S3cmd 1# install 2sudo pip install s3cmd 3 4# config 5s3cmd --configure 6 7# Create if does not already exist 8s3cmd info s3://terraform-backend-test || s3cmd mb s3://terraform-backend-test -v -d 9 10# Delete bucket 11s3cmd rb s3://terraform-backend-github-test --recursive 12 13# Get size of the bucket 14s3cmd du...

Register your session Usefull to keep a track or document and share what have been done. script : save all commandes and result in a “typescript” file. script -a : append to an existing “typescript” file (otherwise erase previous one). exit : to stop session. asciinema : save the terminal session in video. For RHEL -...

Troubleshooting 1sudo realm list 2authselect current 3sssctl domain-list 4sssctl config-check 5getent -s files passwd 6getent -s sss passwd user 7getent passwd 8dig -t SRV _ldap._tcp.example.com 9sssctl user-checks toto -s sshd -a auth SSSD process config to link to AD Prerequisites : Need port 369 and 3268 for RHEL8...

Tmux git clone https://github.com/tmux-plugins/tmux-logging.git Commandes line tmux new -s ma_session : Create new session. tmux attach : Attach to the last used session. tmux attach -t X : Attach to ymux sessions with X number. tmux ls : List active tmux sessions. tmux split-window -dh "!!" : Run command in separate...

Unicode with With echo echo $’\xae’ = “®” Digraphs in VIM Vim has a special shorthand for entering characters with diacritical marks. If you need some familiar variant of a Latin alphabet character you’ll be able to input it with the digraph system. Digraph input is started in insert or command mode (but not normal...

Plugins 1# HCL 2mkdir -p ~/.vim/pack/jvirtanen/start 3cd ~/.vim/pack/jvirtanen/start 4git clone https://github.com/jvirtanen/vim-hcl.git 5 6# Justfile 7mkdir -p ~/.vim/pack/vendor/start 8cd ~/.vim/pack/vendor/start 9git clone https://github.com/NoahTheDuke/vim-just.git Fun Facts trigger a vim tutorial vimtutor the...

Glab CLI https://glab.readthedocs.io/en/latest/intro.html 1# add token 2glab auth login --hostname mygitlab.example.com 3# view fork of dep installer 4glab repo view mygitlab.example.com/copain/project 5# clone fork of dep installer 6glab repo clone mygitlab.example.com/copain/project Install 1Optimization...