Skip to content

Instantly share code, notes, and snippets.

View r3code's full-sized avatar

Dmitriy S. Sinyavskiy r3code

View GitHub Profile
@r3code
r3code / kid-training-1.go
Last active May 26, 2022 17:16
Go Kids Training
package main
func main() {
var in string := "ACBBBCAACBBAAAC"
// 1. Определить длину строки in
// 2. Вывести на экран определенную длину строки
println( )
@r3code
r3code / kubectl-android-install.md
Last active February 6, 2022 10:30
How to install and use kubectl on Android

gcloud/kubectl with termux on Android

  1. Install the termux app for Android

  2. Open Termux

  3. Install google-cloud-sdk by

    # install dependencies
    pkg install python2 curl
package config
import (
"net/http"
"regexp"
"strings"
)
// idPatterns describes patterns of IDs in URLs. These patterns are matched
// against an entire URL. These patterns are used as given without any
@r3code
r3code / kubectl-snippets.md
Last active August 12, 2022 08:57
Kubernetes kubectl полезные команды

Kubernetes kubectl полезные команды

CronJob в Kubernetes

Поиск

**Найти под по IP адресу **

kubectl get pods -o custom-columns=:metadata.name --no-headers=true --field-selector status.podIP=

@r3code
r3code / log-trace-connector.go
Last active December 16, 2021 13:59
log-trace-connector demo
package main
// live https://goplay.space/#qUqusVmj8oV
import (
"context"
"fmt"
)
func NewService(l *Logger) *Service {
return &Service{
@r3code
r3code / go-kit-log-pairs.go
Created May 20, 2021 13:48
Predefined pairs for go-kit/log
// try https://goplay.space/#P8MtNeGIX69
import (
"os"
"github.com/go-kit/kit/log"
)
func Msg(s string) []interface{} {
return []interface{}{
"msg",
@r3code
r3code / distributed-monolith-vs-microservices-ru.md
Last active May 6, 2025 04:29
Распределенный монолит и микросервисы (чеклист)

Чеклист "Мои микросервисы - это распределенный монолит?"

Из статьи You're not actually building microservices

Проверка на симптомы

Итак, вы создаете микросервисы?
Взгляните на некоторые из этих симптомов и проставьте галочки, где вы согласны:

  • Изменение одного микросервиса часто требует изменений в других микросервисах (сильная связанность)

Russian version here

So, are you building microservices? Take a look at a few of these symptoms, and decide for yourself:

  • A change to one microservice often requires changes to other microservices
  • Deploying one microservice requires other microservices to be deployed at the same time
  • Your microservices are overly chatty
  • The same developers work across a large number of microservices
@r3code
r3code / README.md
Last active April 20, 2021 14:07 — forked from vporoshok/README.md
Snippet of README file for RDD (Readme driven development)
@r3code
r3code / version.go
Created April 16, 2021 11:15
Stub for runtime versioning for GoLang programs
package version
import (
"bytes"
"fmt"
"runtime"
"strings"
"github.com/prometheus/client_golang/prometheus"
)