[Photo by Lukas](https://www.pexels.com/photo/blue-retractable-pen-574070/)

Fix 'Cannot Rebase Onto Multiple Branches' error once and for all

A Guide to using git pull --rebase effectively Using git pull --rebase as your default merge strategy offers several benefits, particularly in maintaining a clean and linear commit history, which can simplify collaboration and code review. However, users may occasionally encounter the error “Cannot rebase onto multiple branches”. This article explains why this happens and provides a solution to make git pull --rebase work seamlessly. Benefits of git pull --rebase Linear History: Rebasing applies your local commits on top of the upstream changes, creating a straight line of commits without unnecessary merge commits....

2024-05-27 · 2 min · timor
[Photo by @felipepelaquim](https://www.pexels.com/photo/electronic-book-subscription-in-an-electronic-gadget-8531176/)

Remove Password From PDF documents

I use a Pocketbook Touch HD first gen. to read ebooks and I bought it in 2017 (oh dear!). It’s a really good device, despite being terribly slow according to current standards and battery have probably only 20% capacity comparing to the day I bought it. Anyway, it outperformed any of my smartphones on it’s longevity. I don’t use it that often anymore but it happen to me to read some stuff that I find on the Internet....

2024-05-27 · 1 min · timor
[Photo by Pixabay](https://www.pexels.com/photo/orange-and-white-seashell-on-white-surface-33234/)

The power of extensive command history in Bash and Zsh

I rely heavily on shell usage. For over 15 years, I was a devoted user of Bash until I discovered Zsh and made the switch. One thing that remained constant throughout my transition was my configuration to maintain an extensive commands history. This setup is replicated across all my systems. When you spend a lot of time coding, you often find yourself repeating commands or running variations of them. Remembering all these commands can be challenging, but with resources like Google and ChatGPT, it’s not always necessary....

2024-03-05 · 3 min · timor
[Renovate Bot](https://github.com/renovatebot/renovate)

Automatic updates of Docker images with Renovate Bot

I’ve been writing recently about best practices for patching and deprecating Docker images , but today I want to show how to automate a huge part of this process. You might already hear about Dependabot1, it’s a Github’s way to notify developers about security vulnerabilities in their projects. Renovate2 is similar tool3, but doesn’t require Github. For my professional work I use Bitbucket, so Renovate feels more universal as can be used anywhere....

2024-03-01 · 4 min · timor
[Photo by Antony Trivet](https://www.pexels.com/photo/herd-of-blue-wildebeest-walking-in-savanna-6053000/)

How I stopped worrying and loved Makefiles

First contact with make When I was invited for my first job interview in the IT, I’ve been asked such question: How would you typically build a program from sources, what commands will you use? I answered: It’s obvious: ./configure make make install Those times belong to the past now and nowadays not many programmers use GNU Make1. Try asking this question and you will see disgust at best. For many it’s the fist contact with make and often the last one, but not for me 😉...

2024-02-16 · 9 min · timor
[pre-commit](https://pre-commit.com)

My pre-commit config for Hugo blog

I love blogging with Hugo  external link and I have two blogs already that use it. The good thing about static sites is that you have all the data in the files. You can optimize them locally, batch process, amend, etc. Powerful templating engine allows to quickly pre fill documents in the format I like. I have some steps in the Makefile for things like image optimization, but I often don’t remember to run them 😃...

2024-01-29 · 2 min · timor
[Generated by AI](https://www.bing.com/images/create/potrzebujc499-obrazek-dla-posta-na-blogu-o-temacie3a-g/1-65b520c6d817444ea0a5f4ed3dd8843a?id=QFgGAr6fEgEMEJSm0T45XQ%3d%3d&view=detailv2&idpp=genimg&FORM=GCRIDP&mode=overlay)

Git hacks - a set of my favorite git aliases

I use Git a lot, even writing this article i will commit text few times. There’s a set of aliases I rely on daily and they’re first I add in new place. Some Git commands are unnecessarily verbose. You can make your life much easier with bash-completions, but if you write it tens of times per day, it’s anyway a lot of typing… and I’m a lazy man 😄 Simple status/log checks git s s = status --short --branch --untracked-files Shows a short, branch-focused status with untracked files....

2024-01-27 · 6 min · timor
[Photo by RealToughCandy.com from Pexels](https://www.pexels.com/photo/a-person-holing-a-sticker-in-close-up-photography-11035380/)

The best way to get NVM working in CI/CD systems

TL;DR While reasoning is important, readers may not be interested in all the frustrations I experienced while figuring out how to get things done. If you’re looking for a quick solution, skip to the “What eventually worked?” section. However, if you’re interested in the thought process behind the solution, keep reading. Why? Some might bother why the hell I’d like to make my life so hard? 🤣 We used to use nodeenv  external link for that purpose....

2023-04-25 · 10 min · timor
[Photo by Christina Morillo from Pexels](https://www.pexels.com/photo/eyeglasses-in-front-of-laptop-computer-1181253/)

Automatically add ticket ID to every commit message in Git

I don’t know how it is in your company, but in mine it’s considered a good practice to add ticket numbers to commit messages. It allows to easily determine why something was changed, etc. Makes sense, but this also means, that I should be adding this ticket to every message… And this doesn’t make sense for me. I will accidentally avoid it from time to time or make a lot of typos....

2021-11-09 · 2 min · timor

Resize images from command line on MacOS

I was updating my blog and needed to generate few variants of images, in different resolution. Option 1 - sips There’s simple, builtin tool sips, that can be used for simple resizing 1: Resize single image sips -Z 36 orig.png --out static/favicon36x36.png -Z - maintain image aspect ratio 36 - maximum height and width It can be also used for batch image processing: Warning Beware, without –out param, it will overwrite images in place!...

2021-11-07 · 2 min · timor