Skip to content

Instantly share code, notes, and snippets.

View kborovik's full-sized avatar

Konstantin Borovik kborovik

View GitHub Profile
.EXPORT_ALL_VARIABLES:
.ONESHELL:
.SILENT:
MAKEFLAGS += --no-builtin-rules --no-builtin-variables
PATH := $(abspath .venv)/bin:$(PATH)
python_packages := streamlit pandas
###############################################################################
# Google Project IAM Members
# Single stanza for all IAM bindings
###############################################################################
locals {
google_project = "example-project"
users = toset([
"user:[email protected]",
"user:[email protected]",
.EXPORT_ALL_VARIABLES:
.ONESHELL:
.SILENT:
MAKEFLAGS += --no-builtin-rules --no-builtin-variables
###############################################################################
# Variables
###############################################################################
.ONESHELL:
.SILENT:
.EXPORT_ALL_VARIABLES:
MAKEFLAGS += --no-builtin-rules --no-builtin-variables
###############################################################################
# Settings
###############################################################################
#!/usr/bin/awk -f
# Print target name and description of Makefile
# The script expect:
# - 'make -qp' as input
# - '$(info ### description ###)' as one of the target's commands
BEGIN {
FS=":"
print "Targets:"
@kborovik
kborovik / docker-compose.yml
Last active January 20, 2024 14:09
Docker Compose for ElasticSearch + Kibana + SSL certs
# The following code will configure SSL certificates for ElasticSearch + Kibana and enable auto-starting.
# Execute the commands below before launching the ElasticSearch + Kibana docker-compose:
#
# > export ELASTIC_PASSWORD=MyBigPass1
# > docker volume create elastic && docker volume create kibana && docker volume create certs
# > docker container run --name=elastic-init --user=root --tty --interactive --rm --volume=certs:/usr/share/elasticsearch/config/certs docker.elastic.co/elasticsearch/elasticsearch:${ELASTIC_VERSION:-8.12.0} /bin/bash -c "elasticsearch-certutil ca --pem --pass=elastic-1 --out config/certs/ca.zip && unzip -j config/certs/ca.zip -d config/certs && elasticsearch-certutil cert --pem --ip=127.0.0.1 --dns='elastic-1,localhost' --ca-cert=config/certs/ca.crt --ca-key=config/certs/ca.key --ca-pass=elastic-1 --pass=elastic-1 --out config/certs/instance.zip && unzip -j config/certs/instance.zip -d config/certs && rm config/certs/*.zip && openssl rsa -passin pass:elastic-1 -in config/certs/ca.key
@kborovik
kborovik / How to use a GPG key for SSH authentication
Created October 8, 2020 12:28
How to use a GPG key for SSH authentication
# How to use a GPG key for SSH authentication
# Tested on Ubuntu 20.04 LTS
# Enable SSH support in gpg-agent:
echo enable-ssh-support > ~/.gnupg/gpg-agent.conf
# Cache GPG & SSH passwords for 24 hours (the reboot will clear the password cache)
echo max-cache-ttl 86440 >> ~/.gnupg/gpg-agent.conf
echo max-cache-ttl-ssh 86440 86440 >> ~/.gnupg/gpg-agent.conf
echo default-cache-ttl 86440 >> ~/.gnupg/gpg-agent.conf