I recently had the problem that I was accidentally working on a local branch that was tracking a protected remote branch. In simple words: I was working on the main branch but was not allowed to push to origin/main. This is a good thing because I see the main branch as stable and I would… Continue reading Migrating commits to open branch
Fix ssh Git connection against Azure DevOps
I recently had the issue against my on premise Azure DevOps server, that the clone via ssh would fail with the message: The error can look different depending on if you already have a configuration file for SSH or not. But in any case, if a error is thrown, it is likely that the keys… Continue reading Fix ssh Git connection against Azure DevOps
Easy PDF form parsing and data handling
Recently I got a employee registration form in “docx” format and I can only assume that after I wrote all my information into the form HR copied it from there into the corresponding system. I thought to myself: That could be done easier. So I wrote a SpringBoot application, that offers a downloadable PDF form… Continue reading Easy PDF form parsing and data handling
Apply changes to multiple development branches
Let’s assume you have a simplified agile development process like this one: During planing the version numbers are specified and during development branches (like “release/1.5.10”) are used to collect all changes developed in development branches (like “bugfix/reference/1.5.10” where “reference” stands for a ticket number, a short description or any other reference to a in depth… Continue reading Apply changes to multiple development branches
Using quotes in remote commands
In my previous tutorial I showed how to escape quotes in Bash and PowerShell commands. So far so good. Now what if you want to execute a Bash command via SSH from a PowerShell instance? Let’s start with the plain Bash command we want to execute: This executed on Bash includes a single quote in… Continue reading Using quotes in remote commands
Escaping in shells
First things first: A string with spaces is enclosed in either single quotes ‘ or double quotes “. The difference you ask? Single quotes are treated “as is”: No variable replacement, no parsing, just a string. If you want to embed a variable value, you have to concatenate the string. Period. Double quotes allow dynamic… Continue reading Escaping in shells
Check if remote database exists
Escaping in PowerShell or in any other scripting language is not that much fun to begin with. So if you have quotes in quotes on different shells in different systems it becomes really funny. So trust me, I am more than surprised that I just found a neat way to check, if a database exists… Continue reading Check if remote database exists
Unify line endings
Let’s assume you have a software project and the line endings of the files are inconsistent. Meaning, that git commits and pushes without proper configuration will result in a merge disaster because the merge tools recognize the whole file as changed and not just the lines actually changed. When working on Windows or on a… Continue reading Unify line endings
How to keep a clean local development environment
As a developer I have to work with a lot of tools, development environments and frameworks and I want to keep them in the same spot, know what I work with, especially with which version, keep old versions for compatibility reasons and have a simple way of updating stuff without the need to change a… Continue reading How to keep a clean local development environment
Archive, compress and send
You want to archive (tar), compress (gzip) and send (scp) a directory in one command? With Linux, it is possible: What does it do? tar cf – yourdir creates a uncompressed archive and writes it to standard out (stdout). gzip -9 -c reads from standard in (stdin), compresses and writes to standard out. ssh -l… Continue reading Archive, compress and send