Skip to content

Instantly share code, notes, and snippets.

View loncarales's full-sized avatar

Aleš Lončar loncarales

View GitHub Profile
{
"basics": {
"name": "Ales Loncar",
"image": "https://resume.loncar.net/picture.png",
"label": "Senior Cloud & DevOps Engineer | Automation Specialist",
"summary": "Accomplished freelance Cloud and DevOps Engineer with 20+ years of experience delivering production-grade, cloud-native, containerized, and automated solutions. Specializes in infrastructure as code, CI/CD pipelines, platform engineering, and DevSecOps practices to streamline deployment, enhance security, and improve developer experience. Combines a software engineering mindset with deep DevOps expertise to architect and implement scalable, secure, and resilient platforms. Passionate about automation, continuous improvement, and mentoring teams in modern engineering practices.",
"headline": "Freelance Cloud & DevOps Engineer | Platform Engineer | Kubernetes | CI/CD | DevSecOps",
"keywords": [
"Cloud",
"DevOps",
@loncarales
loncarales / angular-cli-node-js-typescript-compatiblity-matrix.csv
Created April 6, 2021 08:52 — forked from LayZeeDK/angular-cli-node-js-typescript-rxjs-compatiblity-matrix.csv
Angular CLI, Angular, Node.js, and TypeScript compatibility matrix. Based on changelogs, metadata, and hands-on experience.
Angular CLI version Angular version Node.js version TypeScript version
- 2.x 6.0.x or later minor version 2.0.x
1.0.6 4.0.x/4.1.x 6.9.x or later minor version 2.2.x
1.1.3 4.0.x/4.1.x 6.9.x or later minor version 2.3.x
1.2.7 4.0.x/4.1.x 6.9.x or later minor version 2.3.x
1.3.2 4.2.x/4.3.x/4.4.x 6.9.x or later minor version 2.4.x
1.4.10 4.2.x/4.3.x/4.4.x 6.9.x/8.9.x or later minor version 2.4.x
1.5.6 5.0.x/5.1.x 6.9.x/8.9.x or later minor version 2.4.x/2.5.x
1.6.7 5.2.x 6.9.x/8.9.x or later minor version 2.5.x
1.7.4 5.2.x 6.9.x/8.9.x or later minor version 2.5.x
@loncarales
loncarales / Ansible way
Last active July 8, 2020 17:18
Let's look at a simple example. Let's say we would like to test if some set of packages were installed within the role.
---
- name: Verify
hosts: all
tasks:
- name: Gather the package manager facts
package_facts:
manager: auto
@loncarales
loncarales / ansible-summary.md
Created June 28, 2020 09:51 — forked from andreicristianpetcu/ansible-summary.md
This is an ANSIBLE Cheat Sheet from Jon Warbrick

An Ansible summary

Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)

Configuration file

intro_configuration.html

First one found from of

@loncarales
loncarales / Configure .npmrc with authentication token.groovy
Last active November 3, 2023 20:01
Jenkins: configure .npmrc with authentication token to access the private npm Registry on Nexus
stage('NPM: Config') {
withCredentials([usernamePassword(credentialsId: nexusCredentialsId, passwordVariable: 'NEXUS_PASSWORD', usernameVariable: 'NEXUS_USERNAME')]) {
def token = sh(returnStdout: true, script: "set +x && curl -s -k -H \"Accept: application/json\" -H \"Content-Type:application/json\" -X PUT --data '{\"name\": \"$NEXUS_USERNAME\", \"password\": \"$NEXUS_PASSWORD\"}' https://nexus-repository.net:8088/repository/my-npm/-/user/org.couchdb.user:$NEXUS_USERNAME 2>&1 | grep -Po '(?<=\"token\":\")[^\"]*'")
sh "set +x && echo \"//nexus-repository.net:8088/repository/my-npm/:_authToken=$token\" >> .npmrc"
}
}
@loncarales
loncarales / Using Apache Maven Deploy Plugin.sh
Last active July 7, 2020 11:38
Manually upload Maven artefacts to Artifactory the easy way
# Upload the package
mvn -s user-settings.xml deploy:deploy-file \
-Durl=https://artifactory.hostname.com/maven-release \
-DrepositoryId=central \
-Dfile="my-package-1.0.0.zip" \
-DgroupId=com.package.my \
-DartifactId=my-package \
-Dversion=1.0.0 \
-Dpackaging=zip \
-DgeneratePom=false
@loncarales
loncarales / HOWTO.md
Created May 26, 2020 21:36
Ansible Inventory Grapher

Getting started

$ pip install ansible-inventory-grapher

# DOT files are stored in ./graphs folder
$ ansible-inventory-grapher -i hosts.ini -d graphs -o loncar_net.dot --visible-vars=ansible_host --visible-vars=ansible_user loncar_net

# The resulting graphs can then be converted to pngs using this command. Assuming the DOT files are stored in graphs folder
$ for f in graphs/*.dot ; do dot -Tpng -o graphs/`basename $f .dot`.png $f; done
@loncarales
loncarales / ANALYSIS.md
Last active July 7, 2020 11:53
The Challenge: Create a minimalistic environment on Kuberntes to run a small Web application

Analysis

Handling sensitive data

Currently sensitive information, such as passwords, server IP addresses, ... are hard-coded and stored in plain text. If sensitive data must be saved, it must be encrypted first. The best option would be to use a tool for securely managing secrets and encrypting, for example, HashiCorp Vault.

Automation

Artefact building and method of deployment are done manually as described in README.md file. The whole process (configuration, software provisioning and application deployment) can be fully automated. To solve the problem of environment drifting in release pipeline Infrastructure as Code (IaC) approach should be used. Continuous configuration automation (CCA) tools can be thought of as an extension of traditional IaC frameworks. Notable CCA tools: Ansible, SaltStack, Terraform.

@loncarales
loncarales / create-merge-conflict.sh
Created May 26, 2020 21:29
Git: Creating a merge conflict
#!/bin/bash
mkdir git-merge-test
cd git-merge-test
git init
touch merge.txt
git add merge.txt
echo "this is some content to mess with" > merge.txt
git commit -am 'we are commiting the inital content'
git checkout -b new_branch_to_merge_later
@loncarales
loncarales / .gitconfig
Last active April 9, 2024 11:57
A bunch of essential snippets for Git
[user]
name = user_name
email = user_email
[apply]
# Detect whitespace errors when applying a patch
whitespace = fix
[core]
editor = nvim
autocrlf = input
safecrlf = true