Skip to content

Instantly share code, notes, and snippets.

View szhilkin's full-sized avatar
💭
Making ppl happy!

Sergey Zhilkin szhilkin

💭
Making ppl happy!
View GitHub Profile
@szhilkin
szhilkin / main.go
Created January 11, 2024 02:44
Тинькофф SRE задача с сайта
package main
import (
"fmt"
)
func encode(s string) string {
var res = ""
count := 1
chars := []rune(s)
apt -y install realmd sssd sssd-tools libnss-sss libpam-sss adcli samba-common-bin oddjob oddjob-mkhomedir packagekit
vi /etc/netplan/01-netcfg.yaml
nameservers:
addresses: [10.0.0.100]
netplan apply
realm discover
realm join
vi /etc/pam.d/common-session
session optional pam_mkhomedir.so skel=/etc/skel umask=077

Keybase proof

I hereby claim:

  • I am szhilkin on github.
  • I am szhilkin (https://keybase.io/szhilkin) on keybase.
  • I have a public key ASCQFCKLA_PApFBqo6Gfu0axRAb3kzWWB03Rd3BazHCycAo

To claim this, I am signing this object:

@szhilkin
szhilkin / node_exporter.default
Created June 30, 2017 06:27 — forked from eloo/node_exporter.default
Init.d script for prometheus node exporter
# Set the command-line arguments to pass to the server.
ARGS='-web.listen-address=:9100 -collector.diskstats.ignored-devices="^(ram|loop|fd)\\d+$"'
# Prometheus-node-exporter supports the following options:
# -collector.diskstats.ignored-devices="^(ram|loop|fd|(h|s|v|xv)d[a-z])\\d+$": Regexp of devices to ignore for diskstats.
# -collector.filesystem.ignored-mount-points="^/(sys|proc|dev)($|/)": Regexp of mount points to ignore for filesystem collector.
# -collector.ipvs.procfs="/proc": procfs mountpoint.
# -collector.megacli.command="megacli": Command to run megacli.
# -collector.ntp.server="": NTP server to use for ntp collector.
# -collector.textfile.directory="": Directory to read text files with metrics from.