Skip to content

Instantly share code, notes, and snippets.

I may be slow to respond.

Kyle Bai kairen

I may be slow to respond.
View GitHub Profile
View sr-iov-cni.yml
apiVersion: v1
config.json: |
"mode" : "sriov",
"pfNetdevices": ["ib0"]
kind: ConfigMap
name: rdma-devices
kairen / gist:0be0cb8232ced0a6623ce6172d37ee8b
Created Dec 30, 2018 — forked from mtigas/gist:952344
Mini tutorial for configuring client-side SSL certificates.
View gist:0be0cb8232ced0a6623ce6172d37ee8b

Client-side SSL

For excessively paranoid client authentication.

Using self-signed certificate.

Create a Certificate Authority root (which represents this server)

Organization & Common Name: Some human identifier for this server CA.

openssl genrsa -des3 -out ca.key 4096
openssl req -new -x509 -days 365 -key ca.key -out ca.crt
kairen / client.go
Created Mar 7, 2018 — forked from hakobe/client.go
golang unix domain socket
View client.go
package main
import (
func reader(r io.Reader) {
kairen / fcitx-chewing.png
Created Dec 1, 2017 — forked from tanyuan/fcitx-chewing.png
Ubuntu: fcitx + chewing 新酷音輸入法
kairen /
Created Apr 10, 2017 — forked from yaroslavvb/
Example of local cluster with multiple workers/training loops sharded parameter server
#!/usr/bin/env python
# Benchmark transferring data, part of troubleshooting
# Take a independent workers communicating with b parameter shards
# Each worker tries to add to variables stored on parameter server as fast as
# possible.
# macbook
# ps=1: 1.6 GB/s
# ps=2: 2.6 GB/s
kairen /
Created Mar 17, 2017 — forked from renshuki/
Ubuntu 14.04 + Terminator + Oh My ZSH with Agnoster Theme

Install Terminator (shell)

sudo add-apt-repository ppa:gnome-terminator
sudo apt-get update
sudo apt-get install terminator

Terminator should be setup as default now. Restart your terminal (shortcut: "Ctrl+Alt+T").

Install ZSH

View bcache-status
#!/usr/bin/env python3
# Dumb script to dump (some) of bcache status
# Copyright 2013 Darrick J. Wong. All rights reserved.
# This file is part of Bcache. Bcache is free software: you can
# redistribute it and/or modify it under the terms of the GNU General Public
# License as published by the Free Software Foundation, version 2.
# This program is distributed in the hope that it will be useful, but WITHOUT
kairen / radosgw-s3-admin
Last active Dec 13, 2018
View radosgw-s3-admin
#!/usr/bin/env python
import sys
import requests
import json
import argparse
from awsauth import S3Auth
aws_key = 'ACCESS_KEY'
secret = 'SECRET_KEY'