- veth device from CNI/CNM plugin: eth0
- tap device that connects to the VM: tap0
tc qdisc add dev eth0 ingress
tc filter add dev eth0 parent ffff: protocol all u32 match u8 0 0 action mirred egress redirect dev tap0
| package bigetc | |
| import ( | |
| "database/sql" | |
| "time" | |
| "github.com/c4pt0r/log" | |
| _ "github.com/go-sql-driver/mysql" | |
| ) |
| dns upgrade | |
| # https://centos.pkgs.org/7/epel-x86_64/tinyproxy-1.8.3-2.el7.x86_64.rpm.html | |
| curl -O https://download-ib01.fedoraproject.org/pub/epel/7/x86_64/Packages/t/tinyproxy-1.8.3-2.el7.x86_64.rpm | |
| yum --nogpgcheck localinstall tinyproxy-1.8.3-2.el7.x86_64.rpm | |
| dnf install ncurses |
| #!/bin/bash | |
| # Referenced and tweaked from http://stackoverflow.com/questions/6174220/parse-url-in-shell-script#6174447 | |
| proto="$(echo $1 | grep :// | sed -e's,^\(.*://\).*,\1,g')" | |
| # remove the protocol | |
| url="$(echo ${1/$proto/})" | |
| # extract the user (if any) | |
| userpass="$(echo $url | grep @ | cut -d@ -f1)" | |
| pass="$(echo $userpass | grep : | cut -d: -f2)" | |
| if [ -n "$pass" ]; then |
| # Local: | |
| # https://stackoverflow.com/questions/21151178/shell-script-to-check-if-specified-git-branch-exists | |
| # test if the branch is in the local repository. | |
| # return 1 if the branch exists in the local, or 0 if not. | |
| function is_in_local() { | |
| local branch=${1} | |
| local existed_in_local=$(git branch --list ${branch}) | |
| if [[ -z ${existed_in_local} ]]; then | |
| echo 0 |
| USE sys; | |
| DELIMITER $$ | |
| CREATE FUNCTION IFZERO(a INT, b INT) | |
| RETURNS INT | |
| DETERMINISTIC | |
| RETURN IF(a = 0, b, a)$$ | |
| CREATE FUNCTION LOCATE2(needle TEXT(10000), haystack TEXT(10000), offset INT) |
In absolutely no order
In order of first appearance in The Morning Paper.
In a terminal start a server.
$ python -m SimpleHTTPServer 8000In another terminal set up the cgroups freezer.