Skip to content

Instantly share code, notes, and snippets.

View Savemech's full-sized avatar

Anton Strukov Savemech

View GitHub Profile
@fjudith
fjudith / kubernetes_service_session_affinity.md
Last active February 6, 2025 12:15
Enable Session Affinity (a.k.a Sticky Session) to Kubernetes service
@vadikgo
vadikgo / pull.yml
Last active March 26, 2018 20:31
Pull Kubespray images
---
- hosts: localhost
connection: local
tasks:
- name: Load containers tags
include_vars: "{{ item }}"
with_items:
- ../kubespray/roles/download/defaults/main.yml
- ../kubespray/roles/kubernetes-apps/ansible/defaults/main.yml
- ../var/images.yml
const i = 'gfudi';
const k = s => s.split('').map(c => String.fromCharCode(c.charCodeAt() - 1)).join('');
self[k(i)](urlWithYourPreciousData);

Meltdown fix impact on Redis performances in virtualized environments

UPDATE: apparently kernel difference may have a serious impact, so I'll redo the test from scratch.

Test performed with AOF enabled, fsync policy 1 second, allowing the rewrites to be triggered.

Command lines used:

@WoZ
WoZ / README.md
Last active January 6, 2020 10:52
Strace reads and writes analyzer

Usage: node strace_log_analyzer.js strace.log /tmp

This scripts parses input file that must contain strace log from a single thread. Then script calculates:

  • execution time of read/write syscall for each file descriptor and summarize execution time for each 1 sec period,
  • calulates amount of read/write syscalls for each file descriptor

strace log must be collcted with -t -T -f options.

@JuneKelly
JuneKelly / BaselineTest.txt
Created December 12, 2017 13:45
Full text of the Baseline Test from Blade Runner 2049
A blood black nothingness began to spin.
Began to spin.
Let's move on to system.
System.
Feel that in your body.
@treacher
treacher / main.go
Last active October 15, 2017 20:11
kubernetes-namespace-rolebinding-operator-main
func main() {
// Set logging output to standard console out
log.SetOutput(os.Stdout)
sigs := make(chan os.Signal, 1) // Create channel to receive OS signals
stop := make(chan struct{}) // Create channel to receive stop signal
signal.Notify(sigs, os.Interrupt, syscall.SIGTERM, syscall.SIGINT) // Register the sigs channel to receieve SIGTERM
wg := &sync.WaitGroup{} // Goroutines can add themselves to this to be waited on so that they finish
@dm0-
dm0- / coreos-docker-update.sh
Last active April 6, 2020 17:12
Update Docker on CoreOS using torcx
#!/bin/bash -e
# Select which Docker version to use on CoreOS with torcx.
# Specify the available Docker version to enable.
version=17.09
# Create modifiable torcx paths if they don't exist already.
mkdir -p /etc/torcx/profiles /var/lib/torcx/store
# Download the torcx manifest file for the currently running OS version.
@kylejohnson
kylejohnson / freebsd_bhyve.md
Last active July 7, 2018 21:16
Quick instructions for setting up an Ubuntu VM on a FreeBSD host with the bhyve hypervisor using the vm-bhyve tool.
  1. Edit /etc/rc.conf
cloned_interfaces="bridge0 tap0 tap1 tap2 lagg0"
ifconfig_bridge0="addm lagg0 addm tap0 addm tap1 addm tap2"
vm_list="unifi zm1 grafana"
  1. Create a tap for grafana, and add it to the bridge.
ifconfig tap2 create
@tamas-molnar
tamas-molnar / kubectl-shortcuts.sh
Last active May 12, 2025 20:54
aliases and shortcuts for kubectl
alias kc='kubectl'
alias kclf='kubectl logs --tail=200 -f'
alias kcgs='kubectl get service -o wide'
alias kcgd='kubectl get deployment -o wide'
alias kcgp='kubectl get pod -o wide'
alias kcgn='kubectl get node -o wide'
alias kcdp='kubectl describe pod'
alias kcds='kubectl describe service'
alias kcdd='kubectl describe deployment'
alias kcdf='kubectl delete -f'