Prometheus Cheat Sheet
There are some amazing resources available to learn about Prometheus. This post is a cheat sheet with examples that serve as a quick reference and record of interesting things.
There are some amazing resources available to learn about Prometheus. This post is a cheat sheet with examples that serve as a quick reference and record of interesting things.
I needed to install qemu-user-static on podman running on macOS to enable
multiarch build of
Docker images. Assuming you already have brew install podman
and
podman machine start
, how do you install a package?
As of December 2, 2022, there were no rpm packages for NGINX Prometheus Exporter which could be easily installed in Alma Linux 9 (or other RHEL clones). I built a package for my needs and thanks to Open Build Service (OBS) made it available to others.
Let's talk about Go channels and Goroutines and how we can get started with them using a semi-practical example.
In our case we will calculate all prime numbers from 2 to 500,000. The reason for picking this example is that determining a number is prime takes CPU time and it's an independent enough task that we can use threads to concurrently process multiple numbers. By using channels to distribute the work to Goroutines we get a well rounded way to learn about these concepts.
At the end, we will implement the same thing in Python. We will compare the implementation differences between Go and Python and how long it takes to run equivalent programs. Spoiler alert: Go is much better suited for this task.
We need to use GOPROXY and/or GOPRIVATE when working with private-only Go modules or a mix of private and public modules.
I like to setup macOS my way. A companion git repo, new-mac, helps me automate the process to some extent.
I was trying to run go get
on a git repository hosted on a private GitLab
instance. This repository was stored under a sub-group. I was working from a
non-default branch. Since it is a monorepo the module/package was in a
subdirectory. So a combination of four factors complicated matters for me.
These Frequently Asked Questions are for those starting to learn Swift. As I start my journey I have a lot of questions. I'm documenting those here from the perspective of someone who has been programming for a long time in Python and has worked in other languages when needed (e.g. bash, Groovy, Go, PowerShell, etc.).
Are you like me and forget all the awesome things you learn about FreeBSD? My solution is to write this post and collect those commands and tricks in a single place.
I always wanted to spend more time learning Go. After a long break I finally got a chance to take it up seriously. The best lesson for me was to not learn it from scratch like I did with my first programming language. I learned a few basics first from the official documentation and Learn Go Programming - Golang Tutorial for Beginners. Since I'm already well experienced in writing good sized code bases in Python, I decided to dive right in and implement a project on top of Azure SDK. One big advantage of this approach was that I could learn from working examples in Azure documentation and build my knowledge over time. The second advantage was that I was building something useful right away that kept my motivation up; I wasn't building some abstract thing where I also needed to conjure a problem and solution.