Bash – substitute substring in a string

Bash – substitute substring in a string

Today I came across interesting issue – how to remove part of the string containing slash. Full string:

The desired goal is to extract releases/10 from the string. Code:

And here we go:

Git push failed inside pipeline [Azure DevOps]

Git push failed inside pipeline [Azure DevOps]

Las day I was struggling with the git error inside the pipeline. The pipeline code was simple, it should change branch into the existing one, add one file there and push it into git

However, this error occurred every time

I tried many multiple things, changing git switch to git branch, tried to use git rebase – no success! But then I tried to modify pull to pure git pull – and it worked!!! Working code:

Včera jsem zažil opravdu zvláštní situaci…

Včera jsem zažil opravdu zvláštní situaci…

Mou vlastní hloupostí jsem si přivodil poranění prstu na noze. Do rána krásná modřina, bolest na dotyk a přítomnost tří zdravotníků na chatě ústila v jediné – návštěva “pohotovosti”. Ono se tedy vlastně se zlomeným prstem na noze stejně nedá moc dělat (fixuje se k jinému prstu páskou), nicméně pro budoucí chování (omezení pohybu, sport atd.) se vcelku hodí mít aspoň RTG. Tak tedy kolem šesté přicházím v doprovodu (po koupeli, v žabkách, abych sloužícímu lékaři co nejvíce zpříjemnil práci)…

Read More Read More

Why I hate MacBook and macOS

Why I hate MacBook and macOS

I use MacBook for a few months I have to respond to questions “Why do you like MacBook” quite often. But to be honest, there are some things I really hate! Note: I am using Macbook Air 2019, 13″, i5 1.6 GHz, 16 GB RAM and 128 GB SSD 1. Everybody claims how perfect it is But it is not. I have plenty of GUI/system/HW bugs caught on video and this can happen. But “the community” is always saying how…

Read More Read More

Why I like MacBook and macOS

Why I like MacBook and macOS

DISCALIMER: This post will be updated during time I use MacBook for a few months I have to respond to questions “Why do you hate MacBook” quite often. But to be honest, there are some things I really like! Note: I am using Macbook Air 2019, 13″, i5 1.6 GHz, 16 GB RAM and 128 GB SSD 1. Terminal I am working as a developer/DevOps so I have wide experience with Linux (8+ year) so I was missing Terminal on…

Read More Read More

Using Gmail with Custom Domain at No Cost

Using Gmail with Custom Domain at No Cost

I like Gmail, but sometimes I have to use the email under the different domain and I do not want to integrate my domain with google ecosystem (G-Suite). I tried to use SMTP + POP3 integration but after some DDoS attacks to smaller mail servers some of Google IPs were blacklisted and I was unable to use this integration more. So I found another way how to fix this. -1. Create Gmail of you do not have one I assume…

Read More Read More

Python dependencies on project level

Python dependencies on project level

Since I started work with Python, I struggled with dependencies on a project level. I was aware of requirements.txt file, but handling it became very difficult for multiple projects. Fortunately I found very handy tool called pipreqs which generages a project level requirements.txt file using one command. Installation

Usage Just go into your project directory and run

and install inside target environment

Sometimes it does on work on 100 %, but it can save a lot of…

Read More Read More

ls -la output explanation

ls -la output explanation

Show files ls Will provide basic overview of files and folders present in the directory

Show files with details ls -l With file / folder details

Show hidden files ls -la Will show hidden files with . prefix

Output exmplanation

Bonus Running this command will add alias ll to run ls -la where this shortcut is not present yet.

Connecting the Raspberry Pi Zero W/WH to WiFi

Connecting the Raspberry Pi Zero W/WH to WiFi

Recently I bought a Raspberry Pi Zero WH, and I wanted to connect it to my WiFi, but first 5 guides from Google were not working well, so I wanted to share the approach I used using raspi-config. 0. Get ready Raspbian on the Pi And connect to it using ethernet or plug in the monitor to it via HDMI. 1. Get ready SSH You can do this using sudo raspi-config (5. Interfacing options/P2 SSH) or using

Default credentials…

Read More Read More

Vermikompostování a “Good First Issue”

Vermikompostování a “Good First Issue”

Popravdě bych vůbec nečekal, že někdy podobný typ článků někdy napíšu (:D), Žížaly, what? DISCLAIMER: Jedná se o žížaly kalifornské, nikoliv ty, které se běžně vyskytují v půdě Musím se přiznat, že mi nápad dobrovolně si doma něco kompostovat a ještě k tomu za žížalí pomoci přišel poněkud uhozený. Na druhou stranu jsem si však dal množství odpadu, který každý den zbytečně skončí v popelnici a tak nakonec mne “chování” žižal začalo docela zajímat. Plán byl koupit vermikompostér po…

Read More Read More