Skip to content

Instantly share code, notes, and snippets.

View r3code's full-sized avatar

Dmitriy S. Sinyavskiy r3code

View GitHub Profile
@r3code
r3code / github-to-gitflick-copy-repository.sh
Created December 8, 2022 12:18
Copy your gtihub repository to gitflick
Just use https://gitflic.ru/project/dbi471/git-switch
@r3code
r3code / 01_vps-vpn-setup.md
Last active August 23, 2024 16:27
Настройка VPS для VPN: IPSec/IKEv2 или Outline Server

Настройка VPS для VPN

Использую сервер на Ubuntu 20.04 LTS

Варианты для VPN

Тестировался на канале 100 Мбит/с (96/95 Мбит/с download/upload)

  • IKEv2 IPSec сервер - download: 9-10 Мбит/с, upload 29 Мбит/с
  • Outline VPN Server - download: 23-29 Мбит/с, upload 29-34 Мбит/с
  • Wireguard VPN server - download: 15-20 Мбит/с, upload 27-31 Мбит/с
@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",