Skip to content

Instantly share code, notes, and snippets.

@egeneralov
egeneralov / linux.sh
Last active January 18, 2024 04:04
linux to mikrotik ip tunnel
ip tunnel add ipip local ${linux_ip} remote ${mikrotik_ip} mode ipip
ip link set ipip up
ip addr add 192.168.3.1/30 dev ipip
iptables -t mangle -A POSTROUTING -o ipip -p tcp -m tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu
iptables -t nat -A POSTROUTING -s 192.168.3.0/30 -o ${linux_output_iface} -j MASQUERADE

enable ldap auth

vault auth enable ldap

write ldap configuration

vault write auth/ldap/config \

#!/usr/bin/env python3
import sys
import argparse
import subprocess
import yaml
def main(path, name, namespace, options):
command = "helm template"
@SashaMkrt
SashaMkrt / README.md
Last active January 17, 2024 19:22
Installing allegro/ralph version 3 on Alpine Linux (docker environment) from scratch
  1. Download and boot from ISO (Alpine Linux Virt)
  2. login 'root'
  3. run setup-alpine
  4. answer questions
  5. enable 'testing' and 'community' repos in /etc/apk/repositories
  6. run apk update
  7. run apk add docker
  8. run rc-update add docker boot # add docker service to system start-up
  9. run service docker start # manually start docker service
  10. run apk add docker-compose
@superboum
superboum / LICENCE.txt
Last active May 29, 2024 19:09
Install Debian with Debootstrap + Grub EFI
MIT LICENSE
Copyright 2018 Quentin Dufour
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR TH
@voluntas
voluntas / sysctl.conf
Created October 14, 2017 13:07 — forked from techgaun/sysctl.conf
Sysctl configuration for high performance
### KERNEL TUNING ###
# Increase size of file handles and inode cache
fs.file-max = 2097152
# Do less swapping
vm.swappiness = 10
vm.dirty_ratio = 60
vm.dirty_background_ratio = 2
@locked
locked / gist:b066aa1ddeb2b28e855e
Created March 6, 2016 16:44
Go AES CBC Examples
package main
import (
"crypto/aes"
"crypto/cipher"
"fmt"
"crypto/rand"
"io"
"encoding/base64"
"encoding/hex"
@jkreps
jkreps / benchmark-commands.txt
Last active January 21, 2024 11:02
Kafka Benchmark Commands
Producer
Setup
bin/kafka-topics.sh --zookeeper esv4-hcl197.grid.linkedin.com:2181 --create --topic test-rep-one --partitions 6 --replication-factor 1
bin/kafka-topics.sh --zookeeper esv4-hcl197.grid.linkedin.com:2181 --create --topic test --partitions 6 --replication-factor 3
Single thread, no replication
bin/kafka-run-class.sh org.apache.kafka.clients.tools.ProducerPerformance test7 50000000 100 -1 acks=1 bootstrap.servers=esv4-hcl198.grid.linkedin.com:9092 buffer.memory=67108864 batch.size=8196