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:01 (UTC +03:00)
  • LinkedIn in/yermulnik
View GitHub Profile
@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 May 3, 2024 21:08
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 April 22, 2024 09:30
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.0.1, API: 2.0 (GNU MPFR 4.0.2, GNU MP 6.2.0)
# 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-2023
{
# 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 "your_email@youremail.com"
repos:
#######
# ALL #
#######
- repo: git://github.com/pre-commit/pre-commit-hooks
rev: v2.5.0
hooks:
# Git style
- id: check-added-large-files
@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