Skip to content

Instantly share code, notes, and snippets.

View serboox's full-sized avatar
👨‍💻
Who we are is but a stepping stone to what we can become.

Sergei serboox

👨‍💻
Who we are is but a stepping stone to what we can become.
  • @investing.com
  • Kyrgyzstan, Bishkek
View GitHub Profile
@SomeCallMeTom
SomeCallMeTom / install_mysql_client.sh
Last active May 17, 2024 08:49 — forked from sshymko/install_mysql_client.sh
Install MySQL 8.0 client on Amazon Linux 2
#!/bin/sh
sudo yum install -y https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm
sudo yum install -y mysql-community-client
@croisillon
croisillon / Golang_prometheus.md
Last active March 14, 2024 10:54
Golang Prometheus metrics

Prometheus

Для сбора метрик с использованием Golang используются библиотеки из репозитория prometheus

// библиотека со всеми наборами метрик
import "github.com/prometheus/client_golang/prometheus"
  • Counter (счетчик) - хранит значения, которые увеличиваются с течением времени
@tomekbielaszewski
tomekbielaszewski / main.go
Last active August 17, 2023 19:22
Example of RabbitMQ reconnect feature. Including recovering already registered consumers.
package main
import (
"fmt"
"log"
"time"
)
func main() {
queue := NewQueue("amqp://guest:guest@localhost:5672/", "hello")
@varemenos
varemenos / 1.README.md
Last active April 21, 2024 23:21
Git log in JSON format

Get Git log in JSON format

git log --pretty=format:'{%n  "commit": "%H",%n  "abbreviated_commit": "%h",%n  "tree": "%T",%n  "abbreviated_tree": "%t",%n  "parent": "%P",%n  "abbreviated_parent": "%p",%n  "refs": "%D",%n  "encoding": "%e",%n  "subject": "%s",%n  "sanitized_subject_line": "%f",%n  "body": "%b",%n  "commit_notes": "%N",%n  "verification_flag": "%G?",%n  "signer": "%GS",%n  "signer_key": "%GK",%n  "author": {%n    "name": "%aN",%n    "email": "%aE",%n    "date": "%aD"%n  },%n  "commiter": {%n    "name": "%cN",%n    "email": "%cE",%n    "date": "%cD"%n  }%n},'

The only information that aren't fetched are:

  • %B: raw body (unwrapped subject and body)
  • %GG: raw verification message from GPG for a signed commit
@shaykalyan
shaykalyan / ohmyzsh-theme-guide.md
Last active April 5, 2024 00:51
Oh My Zsh theme with Powerline font guide