Skip to content

Instantly share code, notes, and snippets.

View golonzovsky's full-sized avatar
💭
📡🛰️🤖🦦👾

Alex Golonzovsky golonzovsky

💭
📡🛰️🤖🦦👾
View GitHub Profile
@golonzovsky
golonzovsky / annotateDeployment.sh
Created July 2, 2018 09:35
grafana annotation on deployment
#!/bin/bash
# this would create annotation in grafana with current date and tags: ["backend-deployment", "prod", "$1"]
# '$grafanaTokenPassword' is defined in CI - API token with EDIT permissions
# Command line:
# ./annotateDeployment.sh <project> <service/batch> <image-tag>
PROJECT_NAME=$1
DEPLOYMENT_TYPE=$2
IMAGE_TAG=$3
@golonzovsky
golonzovsky / jaeger-analytical-queries.md
Last active March 16, 2018 13:47
ES jaeger analytical queries

top services

POST http://{{es}}/jaeger-span-2018-03-15/_search

{
 "size": 0,
 "aggs": {
  "uniq_host": {
  "terms": {
sudo perf record -F 49 -a -g -- sleep 120
sudo perf record -F 99 -g -p 27817
http://www.brendangregg.com/perf.html
http://www.brendangregg.com/linuxperf.html
http://www.brendangregg.com/FlameGraphs/cpuflamegraphs.html#Linux
export TERM=xterm; export PS1="\\w\$ ";
apk --no-cache add curl tcpdump vim
{
"aggregations": {
"traceIDs": {
"aggregations": {
"startTime": {
"max": {
"field": "startTime"
}
}
},
@golonzovsky
golonzovsky / kafka_commands.md
Last active May 20, 2021 07:14
useful Kafka commands

TODO

  • kafkacat commands

some useful comands

start cluster locally with port forward or host network

docker run -d --name=landoop -p 127.0.0.1:8081-8083:8081-8083 -p 127.0.0.1:9581-9585:9581-9585 -p 127.0.0.1:9092:9092 -p 127.0.0.1:3030:3030 -p 127.0.0.1:2181:2181 -e ADV_HOST=127.0.0.1 landoop/fast-data-dev

@golonzovsky
golonzovsky / Dockerfile
Created November 25, 2017 13:12
cerebro
FROM openjdk:8u131-jdk-alpine
RUN apk --no-cache add openssl wget bash
ENV CEREBRO_VERSION 0.7.1
RUN mkdir /opt && cd /opt \
&& wget -O cerebro-${CEREBRO_VERSION}.tgz https://github.com/lmenezes/cerebro/releases/download/v${CEREBRO_VERSION}/cerebro-${CEREBRO_VERSION}.tgz \
&& tar zxvf cerebro-${CEREBRO_VERSION}.tgz \
&& rm cerebro-${CEREBRO_VERSION}.tgz \
@golonzovsky
golonzovsky / .tmux.conf
Last active February 2, 2018 09:05
tmux/zsh/vim conf
bind -n M-x setw synchronize-panes
#bind-key -T copy-mode C-Up send-keys -X scroll-up
#bind-key -T copy-mode C-Down send-keys -X scroll-down
# use current dir for new panex/windows
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
@golonzovsky
golonzovsky / tmux.md
Created August 6, 2017 20:07 — forked from andreyvit/tmux.md
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@golonzovsky
golonzovsky / README.md
Created July 29, 2017 21:47 — forked from leosuncin/README.md
Install Powerline on Debian/Ubuntu
  1. Install pip sudo apt-get install python-pip or wget https://bootstrap.pypa.io/get-pip.py && sudo python get-pip.py
  2. Install powerline sudo pip install powerline-status
  3. Download and install fonts git clone https://github.com/powerline/fonts.git && cd fonts && sh ./install.sh
  4. Add this lines to respective file
    .vimrc

set rtp+=/usr/local/lib/python2.7/dist-packages/powerline/bindings/vim/
> " Always show statusline

@golonzovsky
golonzovsky / Dockerfile.build
Last active December 19, 2018 07:48
build and run angular-cli app in docker nginx via volume sharing
FROM node:7
ENV REFRESHED_AT 2017-06-26
RUN yarn global add @angular/cli
RUN ng set --global packageManager=yarn
COPY . /build
WORKDIR /build