Skip to content

Instantly share code, notes, and snippets.

Collection of Linux tools to deal with network issues

@vkroz
vkroz / Python frequent stuff.md
Last active June 14, 2021 12:09
Examples of mocking python unit tests

Virtual environments with Anaconda

List virtual environments

conda info --envs

Create virtual environment

conda create -n yourenvname python=x.x
@vkroz
vkroz / Git cheatsheet.md
Last active October 17, 2019 19:42
GIT cheatsheet

Reset remote origin/master to a commit

git checkout master
git reset --hard e3f1e37
git push --force origin master
# Reset remote to a current HEAD
git reset --hard HEAD
@vkroz
vkroz / tmux cheatsheet.md
Last active July 6, 2021 15:21 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux for humans

How to get

If tmux is not installed, then install it or buid from sources.

Installing

  • MacOS: brew install tmux
  • CentOS family: yum install tmux
@vkroz
vkroz / Kafka commands.md
Last active January 21, 2024 12:12
Kafka frequent commands

Kafka frequent commands

Assuming that the following environment variables are set:

  • KAFKA_HOME where Kafka is installed on local machine (e.g. /opt/kafka)
  • ZK_HOSTS identifies running zookeeper ensemble, e.g. ZK_HOSTS=192.168.0.99:2181
  • KAFKA_BROKERS identifies running Kafka brokers, e.g. KAFKA_BROKERS=192.168.0.99:9092

Server

Start Zookepper and Kafka servers

@vkroz
vkroz / - Linux stuff (SSH, tools etc)
Last active January 30, 2023 03:03
SSH helpful stuff
Collection of tips and tricks for Linux
  • Gradle
  • Maven
  • SBT
  • Make
  • CMake
  • Bazel
@vkroz
vkroz / Kubernetes cheatsheet.md
Last active January 30, 2023 02:59
Kubernetes cheatsheet
@vkroz
vkroz / Docker cheatsheet.md
Last active September 30, 2019 20:42
Docker cheatsheet

Docker playground: https://labs.play-with-docker.com/

Build image

tag coud be enything, it should help to identify application and its version, e.g.

# Build image, can use multiple tags
docker build . -t ${tag1} -t ${tag2} ${buildArgs}
@vkroz
vkroz / Makefile
Last active September 13, 2019 08:42 — forked from mpneuried/Makefile
Simple Makefile to build, run, tag and publish a docker containier to AWS-ECR
# import config.
# You can change the default config with `make cnf="config_special.env" build`
cnf ?= config.env
include $(cnf)
export $(shell sed 's/=.*//' $(cnf))
# import deploy config
# You can change the default deploy config with `make cnf="deploy_special.env" release`
dpl ?= deploy.env
include $(dpl)