Skip to content

Instantly share code, notes, and snippets.

View yermulnik's full-sized avatar
🇺🇦
Yz

George Yermulnik (Georgii Iermulnik) yermulnik

🇺🇦
Yz
  • Earth, Europe, Ukraine, Kyiv
  • 20:22 (UTC +03:00)
  • LinkedIn in/yermulnik
View GitHub Profile
@yermulnik
yermulnik / tf_vars_sort.awk
Last active June 9, 2025 02:43
Sort Terraform (HCL) file by Resource Block Names using GNU `awk`
#!/usr/bin/env -S awk -f
# https://gist.github.com/yermulnik/7e0cf991962680d406692e1db1b551e6
# Tested with GNU Awk 5.1.0, API: 3.0 (GNU MPFR 4.1.0, GNU MP 6.2.1)
# Usage: /path/to/tf_vars_sort.awk < variables.tf | tee sorted_variables.tf
# Note: "chmod +x /path/to/tf_vars_sort.awk" before use
# No licensing; [email protected], 2021-2024
{
# skip blank lines at the beginning of file
if (!resource_type && length($0) == 0) next
@yermulnik
yermulnik / multiple_ssh_setting.md
Created September 3, 2021 08:48 — forked from RichardBronosky/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "[email protected]"
repos:
#######
# ALL #
#######
- repo: git://github.com/pre-commit/pre-commit-hooks
rev: v2.5.0
hooks:
# Git style
- id: check-added-large-files
@yermulnik
yermulnik / buildNotifier.groovy
Last active June 9, 2024 13:34
Jenkins `buildNotifier.groovy`
@NonCPS
/*
* slackChannel = '#channel,@user' - Slack channel for notifications, space- or comma-separated list (leave empty to use global Jenkins settings)
* silentNotifyFor = ['STARTED'] - Silent notifications for certain buildStatuses. E.g.: silentNotifyFor = ['STARTED','SUCCESS','FAILURE','ABORTED']
*/
def notifyBuild(String buildStatus = 'FAILURE', String customMessage = null) {
// buildStatus of null means FAILURE
buildStatus = buildStatus ?: 'FAILURE'
// Default values
@yermulnik
yermulnik / README.md
Created February 10, 2017 15:44 — forked from hofmannsven/README.md
My simply Git Cheatsheet