Skip to content

Instantly share code, notes, and snippets.

View yermulnik's full-sized avatar
🇺🇦
Yz

George L. Yermulnik yermulnik

🇺🇦
Yz
  • Earth, Europe, Ukraine, Kyiv
  • 11:22 (UTC +03:00)
  • LinkedIn in/yermulnik
View GitHub Profile
@yermulnik
yermulnik / My list of Terraform-related CLI tools.md
Last active March 10, 2025 16:42
My list of Terraform-related CLI tools
@yermulnik
yermulnik / .gitignore
Created November 9, 2024 16:38 — forked from jeosadn/.gitignore
Convert YouTube subscriptions exported via Google Takeout into OPML
*~
@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 / 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
@yermulnik
yermulnik / Telegram.yz.md
Last active November 12, 2023 21:59
Telegram Desktop (messenger) v4.10+ using Glibc 2.29 on Linux Mint 19.3 (Tricia) [Ubuntu 18.04 LTS (Bionic Beaver)]

ℹ️ GH Gist: yermulnik/Telegram.yz.md

👉 Update this gist:

gh gist edit https://gist.github.com/yermulnik/5b1d412ca01630af4d06c2c1fadddc53 -f Telegram.yz.md README.md

Starting with v4.10.0 Telegram has stopped supporting Linux platforms with glibc (GNU C Library) less than 2.29 (2.28?):

@yermulnik
yermulnik / aws_assume_role.py
Created November 2, 2022 11:28 — forked from benkehoe/aws_assume_role.py
Assumed role session chaining (with credential refreshing) for boto3
# This is now a proper library, see https://github.com/benkehoe/aws-assume-role-lib
# pip install aws-assume-role-lib
# Copyright 2020 Ben Kehoe
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
@yermulnik
yermulnik / config.yml
Last active February 24, 2025 19:33
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 / tf_vars_sort.awk
Last active February 5, 2025 05:35
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]"