Skip to content

Instantly share code, notes, and snippets.

View marijus-ravickas's full-sized avatar
🌴

Marijus Ravickas marijus-ravickas

🌴
  • Vilnius, Lithuania
View GitHub Profile
@marijus-ravickas
marijus-ravickas / macosx_docker_lima.md
Last active May 5, 2023 13:38
Docker VM on osx using lima support

Docker VM on osx using lima support

Docker tooling preparation

# Install necessary docker related tooling using brew
brew install docker # install docker command line tools
brew install docker-compose # install docker-compose plugin 
brew install docker-buildx # install docker-buildx plugin (for multi-arch builds)

Building Kafka from the Hardware - up

  • Higher Message Retention ? - Increase disk size
  • Higher Message Throughput ? - Increase network capacity
  • Higher Producer Performance ? - Increase Disk I/O speed
  • Higher Consumer Performance ? - Increase Memory

Critical Configurations (Consumer)

  • queued.min.messages
  • fetch.wait.max.ms
  • socket.blocking.max.ms
@marijus-ravickas
marijus-ravickas / sysctl_cookbook_migration.md
Last active February 2, 2022 09:25
Possible migration from sysctl cookbook

sysctl cookbok is deprecated but still widely used. Chef core already has sysctl resource

Below is the short example how could we migrate from sysctl cookbook, without changing attributes structure.

# Code taken from https://github.com/Sous-Chefs-Boneyard/sysctl/blob/v0.6.2/libraries/sysctl.rb and a bit modified

def compile_attr(prefix, v)
  case v
  when Array

To update all commiters in whole repo use this document

#!/bin/sh

git filter-branch --env-filter '

CORRECT_NAME="vvv"
CORRECT_EMAIL="[email protected]"

export GIT_COMMITTER_NAME="$CORRECT_NAME"

@marijus-ravickas
marijus-ravickas / k8s.md
Last active October 28, 2019 14:18
k8s 1.16.2 install with containerd on Centos7

Prepare OS

yum update -y && yum install -y unzip tar btrfs-progs libseccomp socat util-linux curl wget

install containerd and runc

wget https://github.com/containerd/containerd/releases/download/v1.3.0/containerd-1.3.0.linux-amd64.tar.gz && tar xf containerd-1.3.0.linux-amd64.tar.gz -C /usr/local

``wget -O /usr/local/sbin/runc https://github.com/opencontainers/runc/releases/download/v1.0.0-rc8/runc.amd64 &&

Installation

curl -L https://raw.githubusercontent.com/aelsabbahy/goss/master/extras/dgoss/dgoss -o /usr/local/bin/dgoss

curl -L https://github.com/aelsabbahy/goss/releases/download/v0.3.7/goss-linux-amd64 -o ~/Downloads/goss-linux-amd64

export GOSS_PATH=~/Downloads/goss-linux-amd64

removing images

docker image rm $(docker images | grep with-db-certs | awk '{ print $1":"$2}')

removing untaged images

docker images | egrep '<none>' | awk '{print $3}' | xargs -I {} docker image rm {}

removing all containers

docker rm $(docker ps -a | grep -v "CONTAINER" | awk '{ print $1}')

running dgoss on specific images from local repo

@marijus-ravickas
marijus-ravickas / woodworking_tools_beginer.md
Created January 26, 2019 12:14
Sąrašas įrankių pradžiai dailydės

Matavimo prietaisai

  • pieštukai 2H
  • žymeklis - geleštės gabalas
  • kampainis metalinis šaltkalvio
  • kampainis metalinis šaltkalvio T formos
  • liniuotės metalinės trumpos 15,30,100 cm
  • slankmatis
  • brėžtas (Marking gauge)

Rankiniai įrankiai

  • kaltai (bahco 434 sėrija)(pfeil uk)(IRWIN)(32, 8, 10, 6, 20(25), 16)