Skip to content

Instantly share code, notes, and snippets.

View steve-todorov's full-sized avatar

Steve Todorov steve-todorov

  • Carlspring Ltd.
  • Bulgaria
  • 12:16 (UTC +03:00)
View GitHub Profile
@steve-todorov
steve-todorov / awc_ecr_stats.sh
Created December 19, 2024 20:02 — forked from RafaelWO/awc_ecr_stats.sh
AWS: Calculate the size of all ECR repositories
repos=""
sizes=""
name_lens=""
# Check if user is logged in
if ! aws sts get-caller-identity &> /dev/null; then
echo "ERROR: Seems like your SSO session is invalid. Please run"
printf "\n $ aws sso login\n\n"
echo "before you run the script."
exit 1
@steve-todorov
steve-todorov / dovecot-10-auth.conf
Created October 21, 2024 10:51 — forked from barryo/dovecot-10-auth.conf
Configuration Files for ViMbAdmin on Ubuntu 13.10 with Dovecot and Postfix - referenced from https://github.com/opensolutions/ViMbAdmin3/wiki/Mail-System-Install-on-Ubuntu
auth_mechanisms = plain login
!include auth-sql.conf.ext
@steve-todorov
steve-todorov / transporter.py
Created October 3, 2024 23:53 — forked from keshav-space/transporter.py
Migrate GitHub project between accounts
#
# Copyright (c) nexB Inc. and others. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
# See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
# See https://aboutcode.org for more information about nexB OSS projects.
#
import getpass
from traceback import format_exc as traceback_format_exc
@steve-todorov
steve-todorov / 0_traefik_mirror_lab.md
Created April 16, 2024 09:48 — forked from neoakris/0_traefik_mirror_lab.md
Reproducible Demo of Traefik 2.0 Traffic Mirroring on EKS

Reproducible Demo of Traefik 2.0 Traffic Mirroring

Overview

What to expect in this doc:

  • Traefik 2.0 has traffic mirroring functionality that should work on generic Kubernetes, but there's no good how-to guides, let this be the first.
  • This is a how-to guide, that's optimized for understanding
@steve-todorov
steve-todorov / .gitignore
Created August 17, 2023 17:19 — forked from nicosingh/.gitignore
ECS using Terraform sample
*.tfbackup
.terraform/
*.tfstate
.terraform.tfstate.lock.info

README

After the 1948278201th time of having to apply this patch manually after a CSGO update I decided it's time for a script. In essense this script will:

  1. Detect the distribution
  2. Install the respective libtcmalloc via the disto's package manager.
  3. Search the lib paths to find the location of libtcmalloc_minimal.so.4
  4. Copy it into the GAMEROOT/bin/linux64 path.
@steve-todorov
steve-todorov / homebrew-gnubin.md
Created November 9, 2021 20:15 — forked from skyzyx/homebrew-gnubin.md
Using GNU command line tools in macOS instead of FreeBSD tools

macOS is a Unix, and not built on Linux.

I think most of us realize that macOS isn't a Linux OS, but what that also means is that instead of shipping with the GNU flavor of command line tools, it ships with the FreeBSD flavor. As such, writing shell scripts which can work across both platforms can sometimes be challenging.

Homebrew

Homebrew can be used to install the GNU versions of tools onto your Mac, but they are all prefixed with "g" by default.

All commands have been installed with the prefix "g". If you need to use these commands with their normal names, you can add a "gnubin" directory to your PATH from your bashrc.

@steve-todorov
steve-todorov / hfsc-shape.sh
Created September 26, 2021 13:09 — forked from eqhmcow/hfsc-shape.sh
HFSC - linux traffic shaping's best kept secret
#!/bin/bash
# As the "bufferbloat" folks have recently re-discovered and/or more widely
# publicized, congestion avoidance algorithms (such as those found in TCP) do
# a great job of allowing network endpoints to negotiate transfer rates that
# maximize a link's bandwidth usage without unduly penalizing any particular
# stream. This allows bulk transfer streams to use the maximum available
# bandwidth without affecting the latency of non-bulk (e.g. interactive)
# streams.

Simulate Bare-Metal IPMI for VMs in RHEL8 Libvirt

  • Install the Virtual BMC package in the machine to use as the vBMC server. Note1: When using OpenStack repos the python3-virtualbmc RPM might be available. These instrucctions do not use that package.
    pip3 install virtualbmc
    
    • The vBMC server can be running in any machine. When using a remote libvirt server it is recommended to have passwordless authentication from the vBMC server to the libvirt machines.
    • For this document the vBMC Server export vBMCServerIP=192.168.1.13
@steve-todorov
steve-todorov / KafkaProducerTest.java
Created April 28, 2021 22:15 — forked from itzg/KafkaProducerTest.java
Using embedded Kafka in Spring Boot unit test
import static org.junit.Assert.assertThat;
import static org.springframework.kafka.test.hamcrest.KafkaMatchers.hasKey;
import static org.springframework.kafka.test.hamcrest.KafkaMatchers.hasValue;
import static org.springframework.kafka.test.utils.KafkaTestUtils.getSingleRecord;
import java.util.Map;
import org.apache.kafka.clients.consumer.Consumer;
import org.apache.kafka.clients.consumer.ConsumerConfig;
import org.apache.kafka.clients.consumer.ConsumerRecord;
import org.apache.kafka.common.serialization.Deserializer;