Note book to help you and me remember some tricks

Category dev

Shell script special variables ordered by frequency of used

$n Where n is a positive integer and takes values from 1 to a greater value not restricted. n correspond to the position of an argument givent to a script or to a function $? Exit status of the last… Continue Reading →

Install ansible 5 inside a python virtual environment with python 3.10.4

Note: The following commands are for RockyLinux, RedHat, CentOS, on other distros it will be almost the same. I’ve made the choice to connect to a user called ansible, and inside his home directory I’ve created a directory called ansible,… Continue Reading →

Python and virtual environments on Linux OS

Install python 3.10.4 from source on Rocky Linux or CentOS The following commands are executed as a root user. Virtual Python environment You can install several virtual python environments on your Linux OS. It will allow you to deploy a… Continue Reading →

Chrome Refused to display ‘https://othersite.mydomain.com/’ in a frame because it set ‘X-Frame-Options’ to ‘deny’.

In the DevTool of your web browser you have this kind of message because you’ve been to the url https://mydomain.com (or a completely different domain like https://anotherdomain.com) that contains an HTML page which includes an iframe of https://othersite.mydomain.com This message… Continue Reading →

Send an email on Linux with CLI or shell script without installing anything (no ssmtp required)

Prerequisites Basic example without encoding headers Case of an existing SMTP server without authentication (smtpserver.nicodevlog.com can be replaced by the domain name of your smtp server or its IP address): At the end you can see “\nSubject: TEST send mail… Continue Reading →

Shell script – Variables evaluation : display line endings \n and don’t cut your parameter function

How to pass string with several words and line endings \n as a parameter to a function Solution : Second test rst test : $myvar will be replaced by it’s value that contains a lot of words with spaces and… Continue Reading →

Newer posts »

© 2024 Software engineer >> Sysadmin >> Devops >> SRE

Up ↑