Adding context to errors in Go
This post compares how to enrich Go errors — both sentinel and typed — with additional context using github.com/ygrebnov/errorc.With
versus the standard fmt.Errorf
approach.
This post compares how to enrich Go errors — both sentinel and typed — with additional context using github.com/ygrebnov/errorc.With
versus the standard fmt.Errorf
approach.
Use Python metaclass to automatically apply a decorator to a class instance and static methods.
This blog post shows how to use a registry to manage services in a Python application.
Examples of shell scripts to delete old Jenkins builds based on dates, size, and excluded filters.
Python enum
package allows to utilise very powerful functionality in terms of managing constants and configuration entities. These entities are very compact and in many cases are more convenient to use than dictionaries or configuration files in any format. In a set of examples below, we will demonstrate how to use enums in Python applications as well as the benefits of such usage.
In this post we will discuss in detail five different examples of how to use constants in Python applications:
This post presents examples of how to use macros to construct strings in definitions in C.
In this post, I would like to share an idea of a solution of an interesting task concerning manipulating multiple bash scripts running in background via prompts from another bash script. I will show you an example of a script implementing such solution. The example is simplified, but it fully illustrates the idea.
This post shows an example of a bash script which creates a Docker container, copies a bash script to it, executes that script from the host, and saves its output on the host machine.
Examples of how to check if a Docker container with a given name exists and get its status in bash scripts.