[Photo by Antony Trivet](https://www.pexels.com/photo/herd-of-blue-wildebeest-walking-in-savanna-6053000/)

How I stopped worrying and loved the GNU Make and Makefiles

First contact with make When I was invited for my first job interview in the IT, I鈥檝e been asked such question: How would you typically build a program from sources, what commands will you use? I answered: It鈥檚 obvious: ./configure make make install Those times belong to the past now and not many programmers use GNU Make1 today. Try asking this question and you will see disgust or be called a moron 馃槂...

2024-02-16 路 8 min 路 timor
AI generated

How to run x86-64 Docker images on Apple's MacBook with M1/M2/M3 CPU

Working with Docker environments amid diverse architectures, like Apple鈥檚 arm64 and x86-64/AMD64, presents challenges. I鈥檝e encountered the clash between my Mac鈥檚 M1 arm64 architecture and my x86-centric server workloads. The solution? Just use DOCKER_DEFAULT_PLATFORM 1 2. Just run in the terminal: Enforce platform for all commands export DOCKER_DEFAULT_PLATFORM=linux/amd64 With this command, Docker enforces x86 architecture by default on commands supporting --platform parameter, streamlining workflows and sparing the need for repetitive --platform specifications....

2024-02-06 路 1 min 路 timor

My pre-commit config for Hugo blog

I love blogging with Hugo 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鈥檛 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鈥檚 a set of aliases I rely on daily and they鈥檙e 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鈥檚 anyway a lot of typing鈥 and I鈥檓 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 Lu Li from Pexels](https://www.pexels.com/photo/men-in-horses-raising-cattles-8916937/)

Change configuration of Docker daemon in Rancher Desktop

I switched recently from Docker Desktop on my MacBook to Rancher Desktop. The most important reason for me to do it, was possibility to gently switch between docker and containerd runtimes. There鈥檚 still one feature that I miss on Rancher Desktop - possibility to change Docker daemon configuration. I used to enable experimental features1 and BuildKit2. Sadly, there鈥檚 no easy way to do it on Rancher鈥 But there鈥檚 a magical way3....

2023-03-23 路 1 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鈥檛 know how it is in your company, but in mine it鈥檚 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鈥檛 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鈥檚 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 鈥搊ut param, it will overwrite images in place!...

2021-11-07 路 2 min 路 timor

Homebrew - uninstall formula with dependencies

I use brew extensively on MacOS. It鈥檚 just as convenient as many Linux package managers. What I don鈥檛 like, it leaves dependencies after removal of formula. There鈥檚 simple way to clean it up by running one command 1. Uninstall with dependencies brew uninstall FORMULA brew autoremove Info In my case running brew autoremove actually removed few packages I really wanted to have. Check the output carefully! https://stackoverflow.com/questions/7323261/uninstall-remove-a-homebrew-package-including-all-its-dependencies聽鈫╋笌

2021-11-05 路 1 min 路 timor
[Photo by Paul IJsendoorn from Pexels](https://www.pexels.com/photo/antelope-canyon-33041/)

Moving from Linux to MacOS 鈥 first steps

Few years ago I moved from Linux desktop to MacOS for my business, day to day work. There were 2 main reasons for that: Corporations don鈥檛 like Linux - they can鈥檛 manage it, they can鈥檛 support it, so they blocked it with 鈥淪ecurity policy鈥, ISO20001, or other nonsense. Actually they鈥檙e partially right but in different place - many business collaboration applications don鈥檛 work well on LInux (or they don鈥檛 work at all) Skype for Business - there鈥檚 open source alternative but to get full support you have to pay for additional codecs (as far as I remember) - it鈥檚 not working stable even in paid version Outlook and calendar support - I love Thunderbird and I use it for years, but calendar invitations didn鈥檛 work nice (honestly, they didn鈥檛 work nice even between different Outlook versions鈥) Corporate VPN apps - Christ, I always was able to get it working eventually, but鈥 why bother I鈥檓 older, maybe lazier, maybe smarter - I don鈥檛 like to spend my time resolving problems that don鈥檛 give me any value....

2020-01-04 路 8 min 路 timor