Skip to content

Instantly share code, notes, and snippets.

View liubin's full-sized avatar

Bin Liu liubin

View GitHub Profile
@liubin
liubin / nc-tcp-forward.sh
Created February 9, 2023 07:06 — forked from holly/nc-tcp-forward.sh
easy tcp port forwarding by netcat
#!/usr/bin/env bash
set -e
if [ $# != 3 ]; then
echo 'Usage: nc-tcp-forward.sh $FRONTPORT $BACKHOST $BACKPORT' >&2
exit 1
fi
@liubin
liubin / qemu-networking.md
Created December 6, 2022 08:32 — forked from extremecoders-re/qemu-networking.md
Setting up Qemu with a tap interface

Setting up Qemu with a tap interface

There are two parts to networking within QEMU:

  • The virtual network device that is provided to the guest (e.g. a PCI network card).
  • The network backend that interacts with the emulated NIC (e.g. puts packets onto the host's network).

Example: User mode network

@liubin
liubin / mecab_cabocha.ipynb
Created October 24, 2022 03:18 — forked from tomowarkar/mecab_cabocha.ipynb
How to use MeCab and CaboCha in Google Colaboratory! you can also see here: https://tomowarkar.github.io/blog/posts/colab_mecab/
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@liubin
liubin / latest-protobuf-ubuntu-18-04.md
Created April 26, 2020 12:39 — forked from diegopacheco/latest-protobuf-ubuntu-18-04.md
How to Install Latest Protobuf on Ubuntu 18.04
sudo apt-get install autoconf automake libtool curl make g++ unzip -y
git clone https://github.com/google/protobuf.git
cd protobuf
git submodule update --init --recursive
./autogen.sh
./configure
make
make check
sudo make install
@liubin
liubin / gist:92545beded509864af824022bc948d7c
Created August 2, 2018 10:11 — forked from tsuri/gist:ddcffce68e7737ce506172cd823bd5af
mixed normal and preemtible kubernetes cluster
# Kubernetes clusters using preemtible instances
## Motivation
People experimenting with kubernetes clusters on the GKE not
necessarily have money to keep a full cluster on at all time. GKE
clusters can be easily resized, but this still incurs in the full
instance cost when the cluster is up.
Google has added preemptible instances that are ideal for many
@liubin
liubin / k8s-csr-approve.sh
Last active July 19, 2018 03:49 — forked from aojea/k8s-csr-approve.sh
online kubernetes certificate auto approval
for i in $(kubectl get csr | grep Pending | awk '{ print $1 }' ) ; do kubectl certificate approve $i; sleep 1; done
@liubin
liubin / main.go
Created April 18, 2018 08:47 — forked from hnakamur/main.go
A go example to stop a worker goroutine when Ctrl-C is pressed (MIT License)
package main
import (
"fmt"
"os"
"os/signal"
"time"
"golang.org/x/net/context"
)
@liubin
liubin / env.init.sh
Last active February 28, 2018 12:49
# install Docker
apt-get update
apt-get remove docker docker-engine docker.io
apt-get install \
apt-transport-https \
ca-certificates \
curl \
software-properties-common make g++ mercurial
@liubin
liubin / PV_PVC.yaml
Last active February 28, 2020 10:38
CKA
apiVersion: v1
kind: PersistentVolume
metadata:
name: pv-001
spec:
capacity:
storage: 100Mi
accessModes:
- ReadWriteOnce
- ReadWriteMany

When Istio Meets Jaeger - An Example of End-to-end Distributed Tracing

Kubernetes is great! It helps many engineering teams to realize the dream of SOA (Service Oriented Architecture). For the longest time, we build our applications around the concept of monolith mindset, which is essentially having a large computational instance running all services provided in an application. Things like account management, billing, report generation are all running from a shared resource. This worked pretty well until SOA came along and promised us a much brighter future. By breaking down applications to smaller components, and having them to talk to each other using REST or gRPC. We hope expect things will only get better from there but only to realize a new set of challenges awaits. How about cross services communication? How about observability between microservices such as logging or tracing? This post demonstrates how to set up OpenTracing inside a Kubernetes cluster that enables end-to-end tracing between serv