Skip to content

Instantly share code, notes, and snippets.

View mhristache's full-sized avatar

Maximilian Hristache mhristache

  • Göteborg, Sweden
View GitHub Profile

startup.vpp

trace add avf-input 50
pipe create
create interface avf 0000:86:02.0 name eth0
create interface avf 0000:86:0a.0 name eth1

ip table add 1
set int ip table eth1 1
@Brainiarc7
Brainiarc7 / C-states.md
Created July 14, 2018 00:20 — forked from wmealing/C-states.md
What are CPU "C-states" and how to disable them if needed?

To limit a CPU to a certain C-state, you can pass the processor.max_cstate=X option in the kernel line of /boot/grub/grub.conf.

Here we limit the system to only C-State 1:

    kernel /vmlinuz-2.6.18-371.1.2.el5 ... processor.max_cstate=1

On some systems, the kernel can override the BIOS setting, and the parameter intel_idle.max_cstate=0 may be required to ensure sleep states are not entered:

@kardeiz
kardeiz / main.rs
Created August 4, 2017 19:14
hyper async + mysql async
extern crate hyper;
extern crate mysql_async as my;
extern crate net2;
extern crate tokio_core;
extern crate futures;
use std::net::SocketAddr;
use hyper::server::Service;
use hyper::server::Http;
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: multus
namespace: kube-system
---
kind: ConfigMap
apiVersion: v1
metadata:

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@fladd
fladd / remarkjs.css
Last active August 23, 2018 14:23
CSS of the example slides on http://remarkjs.com
@import url(https://fonts.googleapis.com/css?family=Droid+Serif);
@import url(https://fonts.googleapis.com/css?family=Yanone+Kaffeesatz);
@import url(https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700,400italic);
body {
font-family: 'Droid Serif';
}
h1, h2, h3 {
font-family: 'Yanone Kaffeesatz';
font-weight: 400;

Modifying an Existing Docker Image

To install a custom package or modify an existing docker image we need to

  1. run a docker a container from the image we wish to modify
  2. modify the docker container
  3. commit the changes to the container as a docker image
  4. test changes made to image

1.) Running a docker container from an image

@pavel-odintsov
pavel-odintsov / pps.sh
Last active August 27, 2023 20:21
Simple script to print packet rate for interface
#!/bin/bash
# Interval of calculation in seconds
INTERVAL="1"
if [ -z "$1" ]; then
echo
echo usage: $0 [network-interface]
echo
echo e.g. $0 eth0