Skip to content

Instantly share code, notes, and snippets.

View zidenis's full-sized avatar

Denis Albuquerque zidenis

View GitHub Profile
@zidenis
zidenis / terraform_module_development_environment_setup.md
Last active January 22, 2025 11:46
A step-by-step guide to setting up a complete Terraform development environment

TLDR: This tutorial provides a step-by-step guide to setting up a complete Terraform development environment, including version management (tenv), documentation generation (terraform-docs), linting (TFLint), security scanning (Trivy, Checkov), pre-commit hooks, and others. We use a cookbook-style approach for easy understanding, but if you just want the command script to set up the environment, you can get it here.

Terraform Cookbook: Development Environment Recipe

A quick and easy recipe to set up a killer development environment for writing Terraform modules. Tested on Linux Ubuntu 24.04.1 LTS for x86_64 architecture (should work on other debian-based systems. For other Linux distributions, some tweaks are required).

Building robust and secure infrastructure with Terraform requires more than just the terraform CLI. A well-equipped development environment is crucial for maximizing productivity, ensuring code qu

@zidenis
zidenis / 5_steps_for_creating_templates_and_vms_on_proxmox_using_linux_distros_cloud_images.md
Last active May 11, 2025 13:38
Creating Templates and Virtual Machines on Proxmox using cloud images from various Linux distributions.

5 Steps for Creating Templates and Virtual Machines on Proxmox using Linux Distro's Cloud Images

This tutorial guides you through the process of creating Templates and Virtual Machines on Proxmox using cloud-based images from various Linux distributions. We provide clear instructions for Alma Linux 9, Amazon Linux 2, CentOS 9, Fedora 38, Oracle Linux 9, RHEL 9, Rocky Linux 9, and Ubuntu 23.04 Lynx Lobster.

Note: The instructions have been tested on Proxmox 8.0.4.

Let's begin by choosing the cloud-based image. If you already have your preferred Linux distribution, skip to the 1st step.

To assist in making informed choices when selecting a Linux distribution for your virtual machines, we've compiled a table showcasing key characteristics of each cloud image. This table provides a snapshot of important attributes, including kernel version, Python version, number of processes initialized after boot, number of packages installed, free memory after boot, VM disk size, root partition disk size, used size on t

@zidenis
zidenis / proxmox_web_gui_api_lets_encrypts_acme_alias_mode_duck_dns-english.md
Last active October 27, 2024 19:51
Step-by-step guide to configure Proxmox Web GUI/API with Let’s Encrypt certificate and automatic validation using the ACME protocol in DNS alias mode with DNS TXT validation redirection to Duck DNS.

Step-by-step guide to configure Proxmox Web GUI/API with Let’s Encrypt certificate and automatic validation using the ACME protocol in DNS alias mode with DNS TXT validation redirection to Duck DNS.


Objective

We want to use a certificate in Proxmox GUI/API issued for free by a Certificate Authority trusted by default in browsers and operating systems. The chosen Certificate Authority will be Let's Encrypt [1]. Since the issued certificates are valid for only 90 days, automating the certificate renewal process is crucial. For this purpose, the Automatic Certificate Management Environment (ACME, RFC8555) protocol will be used [2].


@zidenis
zidenis / OCI_Architect_Associate-Reading_List.md
Created February 8, 2022 11:15
Reading list to prepare for OCI Architect Associate Certificate Exam
void main() {
var prettyFunc = new PrettyPrint();
print(prettyFunc is Function); // true
prettyFunc.call("A", "Dart is cool", "B"); // A Dart is cool B
prettyFunc("C", "Dart is cool", "D"); // C Dart is cool D
var args = ["E", "Dart is cool", "F"]; // E Dart is cool F
Function.apply(prettyFunc, args);
}
@zidenis
zidenis / runtimeType.dart
Last active May 9, 2017 21:02
runtimeType behaviour
void main() {
String s = "Dart";
print(s is String); // true
print(s.runtimeType); // String
Dart d = new Dart();
NotDart nd = new NotDart();
print(d is Dart); // true
print(nd is Dart); // false
print(nd is NotDart); // true
@zidenis
zidenis / conditional_access.dart
Created April 30, 2017 19:47
Conditional Member Access
List<String> lst;
lst?.add("Java");
lst = [];
lst?.add("Dart");
lst?.add("C");
print(lst); // [Dart, C]
@zidenis
zidenis / null-aware_assignment.dart
Created April 30, 2017 19:31
null aware assignment
var languageA = "Dart";
var languageB = null;
languageA ??= "not Dart";
languageB ??= "not Dart";
print(languageA); // "Dart"
print(languageB); // "not Dart"
@zidenis
zidenis / if-null_operator.dart
Last active April 30, 2017 19:00
if-null operator
// As funções whatLangA, whatLangB e whatLangC implementam a mesma funcionalidade.
var language = "Dart";
whatLangA() => language ?? "not Dart";
whatLangB() => language == null ? "not Dart" : language;
whatLangC() {
if (language==null) return "not Dart";
else return language;
}
@zidenis
zidenis / var_initialization.dart
Last active April 30, 2017 17:48
Dart inicializa toda nova variável alocada para null
int variavelA = null;
String variavelB;
if (variavelA == variavelB)
print("Dart inicializa toda nova variável alocada para null");