Using Files as a Flag in the Golang Command Line Interface (CLI)

Using Files as a Flag in the Golang Command Line Interface (CLI)

Introduction In this post, we will see how to use files as a flag in the Golang Command Line Interface (CLI). This is useful when you want to pass a file (not the file name, but an object of file type) as a flag to your CLI application. Use the file name as a flag is straightforward, you can use the flag.String or flag.StringVar function to get the file name and then do the necessary checks to validate if this exist, create it, clean it, etc....

April 7, 2024 · 6 min · 1147 words · Christian González Di Antonio
Building and Debugging a C Project in Visual Studio Code with a Makefile

Building and Debugging a C Project in Visual Studio Code with a Makefile

Introduction I have been using Visual Studio Code (vscode) for my C language projects until I’m re-learning this powerful programming language. One of the features that I like about vscode is the ability to build and debug C language projects using a Makefile. In this post, I will show you how to build and debug a C project in vscode using a Makefile. also, I built a GitHub repository template for this project called c-library-template, where you can use it to create a new C project with the following features:...

March 31, 2024 · 15 min · 3118 words · Christian González Di Antonio

Migrated from WordPress to Hugo and GitHub Pages

Introduction I have been using WordPress for a long time to host slashdevops.com blog site. I had been looking for a way to migrate this blog from WordPress to a static site generator and during the research I found Hugo and I can say I am very happy with it. Hugo allows me to write this blog posts in Markdown and it is very fast and easy to use. I have also been using GitHub Pages for other of my personal jobs and I decided to migrate this blog GitHub Pages as well....

March 31, 2024 · 15 min · 3114 words · Christian González Di Antonio

Secure and Easy AWS Connection Assuming a Role With Jenkins Shared Library

The Problem Surely and like me, you are trying to be more secure when connecting Jenkins with your AWS Accounts assuming a role. If you are asking What is that? , please read this: https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_cross-account-with-roles.html Of course, there are many different options to use, but the problem always surrounds us, if you use a plugin then the maintainability and security when talking about Jenkins plugins for sure decrease. I particularly hate Jenkins, from my point of view this is an obsolete tool trying to survive in the modern world, and if you are concerned about security (and maintainability) sure understand my point....

December 3, 2022 · 5 min · 1048 words · Christian González Di Antonio

My custom MacBook Pro [m1|m2] Provisioning

Operating System Install Rosetta 1 /usr/sbin/softwareupdate --install-rosetta --agree-to-license Install Xcode 1 xcode-select --install Package Manager Install Homebrew 1 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" Add Homebrew to your PATH -> /Users/<user home>/.zprofile 1 2 echo 'eval $(/opt/homebrew/bin/brew shellenv)' >> /Users/$USER/.zprofile eval $(/opt/homebrew/bin/brew shellenv) (OPTIONAL) Update/upgrade Homebrew 1 brew update && brew upgrade Terminal and Mods Install iterm2 1 brew install --cask iterm2 WARNING: After this step close the default term and open iterm2...

September 17, 2022 · 4 min · 691 words · Christian González Di Antonio

Managing the Lifecycle of your Elasticsearch Indices

Managing the Lifecycle of your Elasticsearch Indices Just like me, you are probably storing your [Applications | Infrastructure | IoT ] Logs / Traces (as a time series) into Elasticsearch or at least considering doing it. If that is the case, you might be wondering how to efficiently manage index lifecycles in an automated and clean manner, then this post is for you! What’s happening? Basically, this means that your log management/aggregator applications are storing the logs in Elasticsearch using the timestamp (of capture, processing, or another one) for every record of data and grouping, using a pattern for every group....

May 13, 2020 · 8 min · 1663 words · Christian González Di Antonio