Note book to help you and me remember some tricks

Author nicodevlog

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 →

How to empty a file with cmd or powershell? (equivalent of linux: cat /dev/null > pathtofile)

cmd version: The file is now 0 byte size, and occupies 0 byte on disk. powershell version: In this case, the properties of the file show us it’s now 2 bytes size then not completely empty. And the file uses… Continue Reading →

Why CRLF on Linux can sometimes be displayed as ^M with line feed?

Firstly, it’s good to remember these following points: CR is for Carriage Return LF is for Line Feed On windows line endings are represented by CRLF (CR+LF) On Linux line endings are represented by LF In a shell script you… 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 →

Equivalent of Linux tail -f inside windows powershell

-Wait signifies wait for new logs and display it -Tail 10 signifies display the last 10 lines from <my_log_file>

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 →

Hello world!

This my first post. Yet another dev/sysadmin blog?Not completely. This blog has two aims: be like my note book, and help me remember some tricks help you Then I’ll try to publish posts that fill these aims. Thank you for… Continue Reading →

Newer posts »

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

Up ↑