Skip to content

Instantly share code, notes, and snippets.

View karampok's full-sized avatar

Konstantinos Karampogias karampok

View GitHub Profile
@mcastelino
mcastelino / kcgroups.md
Last active April 12, 2024 08:58
Kubernetes and cgroups Resource Management/Static cpuManagerPolicy/Memory and Resource Isolation & Scheduling

Overview

The goal of this document to cover all aspects of Kubernetes management, including how resources are expressed, constrained and accounted for. This started a way to ensure that alternate container runtime implementation like Kata containers will behave from a resource accounting and consumption point of view in the same manner as runc.

Location of the latest version of this document: https://gist.github.com/mcastelino/b8ce9a70b00ee56036dadd70ded53e9f

If you do not understand cgroups please refer to a quick primer at the bottom of this document. This will help you understand how the resource enforcement actually works.

Kubernetes Resource Management

@dwallraff
dwallraff / env.bosh.password.sh
Last active July 26, 2018 11:06
Generate salted hash for env.bosh.password
echo c1oudc0w | mkpasswd --method=sha-512 --salt='4gDD3aV0rdqlrKC' -s
# echo <password> | mkpasswd --method=sha-512 --salt='<salt for hash>' -s
@vasanthk
vasanthk / System Design.md
Last active May 12, 2024 03:33
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@lestoni
lestoni / gist:8c74da455cce3d36eb68
Last active April 12, 2024 18:15
vim folding cheatsheet

via (https://www.linux.com/learn/tutorials/442438-vim-tips-folding-fun)

  • zf#j creates a fold from the cursor down # lines.
  • zf/string creates a fold from the cursor to string .
  • zj moves the cursor to the next fold.
  • zk moves the cursor to the previous fold.
  • zo opens a fold at the cursor.
  • zO opens all folds at the cursor.
  • zm increases the foldlevel by one.
  • zM closes all open folds.
@noteed
noteed / docker-ovs.md
Last active December 29, 2023 07:07
Docker - Open vSwitch setup
@scottslowe
scottslowe / lxc-ovsup
Created January 22, 2014 23:14
This script can be used to automatically attach LXC instances to Open vSwitch (OVS) on startup. You'll need to call this script from the container's configuration using the "lxc.network.script.up" configuration parameter.
#!/bin/bash
BRIDGE="br-int"
ovs-vsctl --may-exist add-br $BRIDGE
ovs-vsctl --if-exists del-port $BRIDGE $5
ovs-vsctl --may-exist add-port $BRIDGE $5
@rca
rca / openldap_passwd.py
Last active January 21, 2022 14:00
Python hashing and test functions for user passwords stored in OpenLDAP.
#!/usr/bin/env python
"""
http://www.openldap.org/faq/data/cache/347.html
As seen working on Ubuntu 12.04 with OpenLDAP 2.4.28-1.1ubuntu4
Author: Roberto Aguilar <roberto@baremetal.io>
"""
import hashlib
import os