[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
[Cloudflare Pages](https://pages.cloudflare.com) and [Hugo](https://gohugo.io)

Optimizing Hugo static site redirects with Cloudflare Pages

I used to utilize GitHub Pages to serve static content for my blog. I secured it behind Cloudflare to employ a custom domain and automate HTTPS certificate management. Additionally, I utilized a few Page Rules to implement redirects: From www.* to non-www, From HTTP to HTTPS, And for some SEO renaming. Unfortunately, in the Free plan from Cloudflare, you are limited to: 3 Page Rules (with simple glob matching), 10 Transformation Rules (no regex rules), 10 Redirect Rules (no regex)....

2024-03-04 · 3 min · timor
[Photo by Miguel Á. Padriñán](https://www.pexels.com/photo/close-up-shot-of-keys-on-a-red-surface-2882652/)

SEO kicks my stats

Towards the end of the year, I received a notification reminding me to renew the domain for my blog. The domain in question was timor.site. This was the first invoice I had received from GoDaddy since they acquired Uniregistry, and to my dismay, it was significantly more expensive than what I had been accustomed to paying. With the year drawing to a close, I was reluctant to invest too much time or money into the renewal process....

2024-03-03 · 2 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

Błękitna kropka

Błękitna kropkaCzłowiek i jego przyszłość w kosmosie Author: Carl Sagan empik.comamazon.de I love science and I’m passionate about cosmos since I was 5. One of my favourite books from the childhood was the one about Universe - with color pictures. This one is a sweet reminder of those ancient times and have even better pictures! There is an interesting reference to the deities and their relation to the planets. Their impact on humanities history, then a swift dive into the place of the God in “our” universe....

2024-03-01 · 1 min · timor

Ślepowidzenie

ŚlepowidzenieAuthor: Peter Watts amazon.plempik.com Still reading…

2024-03-01 · 1 min · timor
[Mermaid](https://mermaid.js.org)

Adding Mermaid diagrams to Hugo

I used Chart.js charts on one of my Hugo blogs for few years already. Recently I needed to add few diagrams and I started glueing them in Chart.js but then I found that Hugo supports GoAT and Mermaid diagrams  external link . They’re not working out of the box, but it’s easy to extend. Much easier than my custom shortcodes. I tried to follow up the instruction1 but failed. After few minutes I found slightly simpler solution....

2024-02-25 · 2 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
[xkcd.com](https://xkcd.com/349/)

Best practices for patching and deprecating images

Intro One of the biggest benefits of Docker images is their immutability. Once they’re built, they don’t change. Built once, would work forever… That’s how nightmares of security guys starts 🤣 We have then two contradictory concepts: flowchart LR id1(Keep it stable) <---> id2(Keep is up to date and secure) For day to day work, usually first concept wins. You want your builds stable and try to avoid tempting distractions of upgrading log4j to latest version… Who knows what might break....

2024-02-09 · 7 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’s arm64 and x86-64/AMD64, presents challenges. I’ve encountered the clash between my Mac’s 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