This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from __future__ import print_function | |
import sys | |
from collections import Counter | |
def get_order(head): | |
h = head.split() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from __future__ import print_function | |
import re | |
import shlex | |
import sys | |
import subprocess | |
from collections import Counter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from __future__ import print_function | |
import subprocess | |
import time | |
def perf_record(sys_threshold, interval, count): | |
while True: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | |
#include <linux/module.h> | |
#include <linux/slab.h> | |
static u64 read_tsc(void) | |
{ | |
return (u64)rdtsc_ordered(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/sbin/modprobe pktgen | |
neigh_ip=$1 | |
ping -c 1 ${neigh_ip} | |
DST=${neigh_ip} | |
DST_MAC=$(ip neigh | grep ${neigh_ip} | awk '{print $5}') | |
# DEVICE=$(ip neigh | grep ${neigh_ip} | awk '{print $3}') | |
DEVICE=eth0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global: | |
scrape_interval: 15s | |
scrape_timeout: 10s | |
evaluation_interval: 15s | |
rule_files: | |
- /prometheus.rules | |
scrape_configs: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
SESSIONNAME="MidoNet" | |
tmux has-session -t $SESSIONNAME &> /dev/null | |
if [ $? != 0 ] | |
then | |
tmux new-session -s $SESSIONNAME -n script -d | |
tmux send-keys -t $SESSIONNAME "tailf /var/log/midolman/midolman.log" C-m | |
tmux new-window -t $SESSIONNAME '/bin/bash' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
/usr/bin/echo '/usr/sbin/pm-suspend' | /usr/bin/at 8pm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
---------------------------- MODULE DivideByThree ---------------------------- | |
EXTENDS Integers | |
VARIABLES x, y | |
vars == <<x, y>> | |
Init == /\ x \in 1..9 | |
/\ y \in 0..9 | |
Next == \//\ x' = x + 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-------------------------------- MODULE GCD -------------------------------- | |
EXTENDS Integers | |
Divides(p, n) == | |
\E q \in -n..n : n = q * p | |
DivisorsOf(n) == {p \in -n..n : Divides(p, n)} | |
SetMax(S) == | |
CHOOSE i \in S : \A j \in S : i >= j |
NewerOlder