Skip to content

Instantly share code, notes, and snippets.

View Voronenko's full-sized avatar
turning coffee into code since late 90s

Vyacheslav Voronenko

turning coffee into code since late 90s
View GitHub Profile
@Voronenko
Voronenko / .env1
Last active May 2, 2023 13:18
traefik behind traefik
MY_DOMAIN1=<domain for Traefik1's dashboard>
TRAEFIK1_NET=traefik1_net
CF_API_EMAIL=<your CF API email>
CF_ZONE_API_TOKEN=<your Zone API Token>
CF_DNS_API_TOKEN=-<your DNS token>
TRAEFIK2_DNS_MAPPER=traefik2:<static ip of traefik2 in NET1>
TAEAFIK2_HOST_SNI=`traefik.<Traefik2's dashboard domain>`
TRAEFIK2_NET1_ADDRESS=traefik2:443
ufw allow from 192.168.3.0/24 proto tcp to any port 2376
ufw allow from 192.168.3.0/24 proto tcp to any port 2377
ufw allow from 192.168.3.0/24 proto tcp to any port 7946
ufw allow from 192.168.3.0/24 proto udp to any port 7946
ufw allow from 192.168.3.0/24 proto udp to any port 4789
@Voronenko
Voronenko / aws_cli_v1_dirty.sh
Created January 18, 2023 14:58
dummy snippet to dirty get aws cli v1 in python container
#!/bin/bash
curl -O https://bootstrap.pypa.io/get-pip.py
python3 get-pip.py --user
echo "export PATH=~/.local/bin:$PATH" > ~/.bash_profile
source ~/.bash_profile
pip3 install awscli --upgrade --user
#!/bin/bash
for user in $(aws iam list-users --query 'Users[*].UserName' --output text); do
echo $user;
echo "======================";
aws iam list-access-keys --user $user --query "AccessKeyMetadata[].AccessKeyId" --output text
done
theme night
transition slide
highlightTheme monokai
logoImg logo.png
slideNumber false
title VSCode Reveal intro

::: block

@Voronenko
Voronenko / github_actions_stub_2022_11.yml
Created November 21, 2022 12:54
github actions stub nov
- name: Check out code
uses: actions/checkout@v3
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1-node16
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowUserToSeeBucketListInTheConsole",
"Action": [
"s3:ListAllMyBuckets",
"s3:GetBucketLocation"
],
"Effect": "Allow",
__timestamp(){
date "+%Y%m%dT%H%M%S"
}
__log(){
log_level="$1"
message="$2"
echo '{}' | \
jq --monochrome-output \
--compact-output \
--raw-output \
@Voronenko
Voronenko / export-node-stats.md
Created October 30, 2022 21:58 — forked from ScriptingSquirrel/export-node-stats.md
Setup prometheus-node-exporter and push stats to Pushgateway with cron job

(Assuming a Debian 8-like system)

  • Install prometheus-node-exporter

    $ sudo apt update && sudo apt install prometheus-node-exporter
  • Configure prometheus-node-exporter to expose metrics only to localhost, not on to all networks. Modify file /etc/default/prometheus-node-exporter:

    # Set the command-line arguments to pass to the server.
@Voronenko
Voronenko / circle_ci_launch_pipeline.sh
Created October 21, 2022 09:38
Basic staff on cross repo launching the pipelines
- run:
name: Launch pipeline
command: |
curl --location --request POST 'https://circleci.com/api/v2/project/(vcs)/(org)/(project)/pipeline' \
--header 'Content-Type: application/json' \
-u "${CIRCLE_CI_API_TOKEN}:"