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
  • 18:01 (UTC +02:00)
  • LinkedIn in/yermulnik
View GitHub Profile
@yermulnik
yermulnik / My list of Terraform-related CLI tools.md
Last active February 25, 2026 21:31
My list of Terraform-related CLI tools
@yermulnik
yermulnik / tf_vars_sort.awk
Last active February 2, 2026 18:12
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; yermulnik@gmail.com, 2021-2024
{
# skip blank lines at the beginning of file
if (!resource_type && length($0) == 0) next
@yermulnik
yermulnik / My list of CLI tools for AWS SSM Session Manager.md
Last active September 11, 2025 01:45
My list of CLI tools for AWS SSM Session Manager

My list of CLI tools for AWS SSM Session Manager

Name Description
aws-gate Better AWS SSM Session manager CLI client
aws-ssm-tools Handy tools for AWS Systems Manager - ssm-session, ecs-session, ssm-ssh and ssm-tunnel
gossm 💻Interactive CLI tool that you can connect to ec2 using commands same as start-session, ssh in AWS SSM Session Manager
quick_ssm Quickly connect to AWS servers from the cli. No GUI or ssh needed.
ssm-helpers Help manage AWS systems manager with helpers
@yermulnik
yermulnik / youtube-subs-to-opml.py
Last active July 25, 2025 15:01 — forked from jeosadn/.gitignore
Convert YouTube subscriptions exported via Google Takeout into OPML
# youtube-subs-to-opml.py -- Convert YouTube subscriptions exported
# via Google Takeout into OPML
#
# See <https://www.reddit.com/r/youtube/comments/jqlks2/where_did_opml_export_go/gcdii2n/>.
# 1. Go to youtube homepage
# 2. Click top right icon, "Your Data in Youtube"
# 3. Click "Show More"
# 4. Click "Download Youtube data"
# 5. This takes you to a similar screen as the other google takeout one, but only for youtube data. The subscription info here is more up to date.
#
@yermulnik
yermulnik / config.yml
Last active April 14, 2025 02:05
GH CLI multi-account switch
git_protocol: ssh
aliases:
personal: '!cp ~/.config/gh/hosts.yml.personal ~/.config/gh/hosts.yml && gh auth status'
work: '!cp ~/.config/gh/hosts.yml.work ~/.config/gh/hosts.yml && gh auth status'
@yermulnik
yermulnik / http-request-debug.py
Last active April 6, 2025 14:57
Python: debug output for `requests`/`urllib3`
import requests
import logging
try:
import http.client as http_client
except ImportError:
# Python 2
import httplib as http_client
http_client.HTTPConnection.debuglevel = 1
@yermulnik
yermulnik / getAwsRegionCodeFromName
Last active October 15, 2024 22:54
AWS Region Code from Name
# HCL (Terraform >= 0.12.20)
locals {
combined_cardinal_directions = {
northeast = "ne",
northwest = "nw",
southeast = "se",
southwest = "sw",
}
aws_region_array = split("-", lower(var.aws_region_name))
@yermulnik
yermulnik / tfe2tfvars_readme.md
Created September 16, 2024 14:18 — forked from cristim/tfe2tfvars_readme.md
Dump Terraform Cloud Workspace variables into a terraform.auto.tfvars file

Getting Started

Virtualenv setup

pip install virtualenvwrapper
mkvirtualenv tfe2tfvars
workon tfe2tfvars
pip install -r requirements.txt
@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 / Dockerfile
Created January 19, 2024 23:38 — forked from adtac/Dockerfile
#!/usr/bin/env docker run
#!/usr/bin/env -S bash -c "docker run -p 8080:8080 -it --rm \$(docker build --progress plain -f \$0 . 2>&1 | tee /dev/stderr | grep -oP 'sha256:[0-9a-f]*')"
# syntax = docker/dockerfile:1.4.0
FROM node:20
WORKDIR /root
RUN npm install sqlite3