Skip to content

Instantly share code, notes, and snippets.

View r3code's full-sized avatar

Dmitriy S. Sinyavskiy r3code

View GitHub Profile
@r3code
r3code / wsl-add-ssh-forwarding-enables-password-store.sh
Created February 1, 2023 11:49
WSL 2 Allow SSH password store and use
# https://1password.community/discussion/128023/ssh-agent-on-windows-subsystem-for-linux
# Script: Do not ask for SSH password in Git/GitLab
# or you will be receiving prompt or error
# USEAGE: adding this to your .bashrc or .zshrc, Restart the ubuntu terminal / resource the rc file (source .bashrc), Test with ssh-add -l Should see your ssh keys.
# Configure ssh forwarding
export SSH_AUTH_SOCK=$HOME/.ssh/agent.sock
# need `ps -ww` to get non-truncated command for matching
# use square brackets to generate a regex match for the process we want but that doesn't match the grep command running it!
ALREADY_RUNNING=$(ps -auxww | grep -q "[n]piperelay.exe -ei -s //./pipe/openssh-ssh-agent"; echo $?)
if [[ $ALREADY_RUNNING != "0" ]]; then
@r3code
r3code / sre-incident-management.md
Last active October 28, 2025 07:24
SRE incident management

SRE incident management

  1. https://response.pagerduty.com/before/severity_levels/ - уровни серьезности инцидентов (пример)
  2. https://www.blameless.com/blog/severity-levels - Severity Levels (What They Are & Why They Matter)
  3. https://www.atlassian.com/incident-management/kpis/severity-levels - Understanding incident severity levels
  4. https://rootly.com/blog/practical-guide-to-sre-incident-severity-levels - руководство по составлению классификации инцидентов
  5. https://www.blameless.com/blog/severity-vs-priority - Severity vs. Priority | Понимание разницы
  6. https://www.bmc.com/blogs/impact-urgency-priority/ Матрица влияния-срочность-приоритет
  7. https://www.blameless.com/blog/incident-priority-matrix Incident Priority Matrix (Understanding Impact and Urgency)
  8. https://www.blameless.com/blog/incident-management-best-practices - Best Practices for Effective Incident Management
@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=