Python: Apply a decorator to a class instance and static methods
Use Python metaclass to automatically apply a decorator to a class instance and static methods.
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:
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.
A straightforward way to use parameters in a Bash script is to execute the script with the parameters values listed after the script file name and to use these values in the script via ${1}..${n}
variables, where n is the number of the parameters.
An example of how to prevent a Docker container from exiting with return code 0 immediately after creation.