Skip to content

Instantly share code, notes, and snippets.

Avatar
:electron:
Hacking

Che-Wei Lin John-Lin

:electron:
Hacking
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am John-Lin on github.
  • I am johnlin_ (https://keybase.io/johnlin_) on keybase.
  • I have a public key whose fingerprint is 0412 942F AFE5 6937 4EF2 F245 F729 570C C1A6 E7BE

To claim this, I am signing this object:

View alacritty.yml
# Configuration for Alacritty, the GPU enhanced terminal emulator.
# Any items in the `env` entry below will be added as
# environment variables. Some entries may override variables
# set by alacritty itself.
#env:
# TERM variable
#
# This value is used to set the `$TERM` environment variable for
# each instance of Alacritty. If it is not present, alacritty will
@John-Lin
John-Lin / Kubeflow.md
Last active Jan 20, 2020
Kubeflow on Minikube
View Kubeflow.md

Deploy Kubeflow on Minikube

Install minikube

Please see How to Minikube

Running a minikube with 4CPUs and 8GB memory

$ minikube start --cpus 4 --memory 8192
View Minikube.md

Minikube

Installation

$ curl -Lo minikube https://storage.googleapis.com/minikube/releases/v0.24.0/minikube-darwin-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/

Quickstart

@John-Lin
John-Lin / nswitch.py
Created Sep 8, 2017
SDN application for NORMAL action
View nswitch.py
from ryu.base import app_manager
from ryu.controller import ofp_event
from ryu.controller.handler import CONFIG_DISPATCHER
from ryu.controller.handler import set_ev_cls
from ryu.ofproto import ofproto_v1_3
class Switch(app_manager.RyuApp):
OFP_VERSIONS = [ofproto_v1_3.OFP_VERSION]
@John-Lin
John-Lin / benchmark.md
Last active Oct 25, 2017
Performance loss with VXLAN in OVS
View benchmark.md

Network performance testing tool

iperf

HOST to HOST

iperf -c 10.240.0.2 -p 12345 -i 1 -t 10 -w 20K

iperf -s -p 12345 -i 1 -M
@John-Lin
John-Lin / ovs
Created May 14, 2017
An overview of Open vSwitch implementation
View ovs
+---------+ +-----------+
|ovs-ofctl| |sFlow Trend|
+----^----+ +-----^-----+
| | Remote
+-----------------------------------------------------------------------------------------------+
| |
| sFlow |
| | +---------+ +----------+ +---------+ +------------+
| | |ovs-dpctl| |ovs-appctl| |ovs-vsctl| |ovsdb-client|
| | +----+----+ +------^---+ +-----+---+ +-------^----+
@John-Lin
John-Lin / Vagrantfile
Created May 2, 2017
OVS with Docker Networking (GUI)
View Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/xenial64"
config.vm.provider "virtualbox" do |vb|
vb.gui = true
vb.customize ['modifyvm', :id, '--nictype1', 'Am79C973']
vb.customize ['modifyvm', :id, '--nicpromisc1', 'allow-all']
end
config.vm.provision :shell, path: "bootstrap.sh"
@John-Lin
John-Lin / Vagrantfile
Created May 2, 2017
OVS with Docker Networking
View Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/xenial64"
config.vm.provider "virtualbox" do |vb|
vb.customize ['modifyvm', :id, '--nictype1', 'Am79C973']
vb.customize ['modifyvm', :id, '--nicpromisc1', 'allow-all']
end
config.vm.provision :shell, path: "bootstrap.sh"
end
@John-Lin
John-Lin / Jakefile
Last active May 30, 2016
iperf command alias
View Jakefile
namespace('iperf', function () {
desc('Iperf server receiving 64 byte');
task('s64', { async: true }, function () {
var cmds = ['iperf -s -u -l 64 -i 1'];
jake.exec(cmds, { interactive: true }, function () {
complete();
});
});
desc('Iperf server receiving 128 byte');