Skip to content

Instantly share code, notes, and snippets.

Shingo Omura everpeace

View GitHub Profile
everpeace /
Last active Sep 26, 2018
kubeflow meetup #1 - Kubeflow Operators
# please setup your kubernetes cluster and kubectl with admin permission (for deploying crd and operator)
# confirm ks version (0.11.0 or later)
$ ks version
# create kss app directory
$ ks init kflowmeetup
$ cd kflowmeetup
# add kubeflow ksonnet registry
$ ks registry add kubeflow
everpeace / kube-scheduler-configuration.yaml
Last active Aug 23, 2018
kube-scheduler's config file and policy config file (policy.cfg) (v1.11.1)
View kube-scheduler-configuration.yaml
# This config scheme is based on Kubernetes v.1.11.1
# ref:
# NOTE: You can dump default config yaml by this command:
# $ docker run -v $(pwd):/host kube-scheduler --write-config-to /host/config.yaml
# TypeMeta
apiVersion: componentconfig/v1alpha1
kind: KubeSchedulerConfiguration
# SchedulerName is name of the scheduler, used to select which pods
View gist:35ec86a9a67ada8c889d3d76a8180033
$ scala
Welcome to Scala 2.12.4 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_152).
Type in expressions for evaluation. Or try :help.
scala> trait Foo {}
defined trait Foo
# actually I wanted to write like this. But it doesn't compile
# trait Bar {
# self: { val someInt: Int } with Foo =>

Keybase proof

I hereby claim:

  • I am everpeace on github.
  • I am everpeace ( on keybase.
  • I have a public key ASAZY_STqf0Okff7CYzVSc9aRUuyXKv_asok9FZBwBlIbQo

To claim this, I am signing this object:

everpeace / docker-compose.yml
Last active May 31, 2018
kafka cluster in docker-compose.
View docker-compose.yml
# WARNING: This docker-compose.yml is only for testing purpose.
# Parameters:
# default: 3.0.0
# reference:
# Ports:
# - description: Major ports are exposed to host computer
# - zookeeper: 2181
# kafka1: 9091
# kafka2: 9092
everpeace / pod.yaml
Created May 11, 2017
test workload for GPU schedule with nodeAffinity
View pod.yaml
kind: Pod
apiVersion: v1
name: gpu-pod
- matchExpressions:
everpeace / Why People Want
Last active Mar 27, 2019
View Why People Want







everpeace / Macros.scala
Last active Dec 14, 2015
ユーザから渡されたブロックにimplicit valを注入するマクロを組んでみたけどうまくいかない。
View Macros.scala
import reflect.macros.Context
object Macros{
// on(i){ ... }とやるとblockの中にiをimplicitとして注入するマクロ
def on[I, V](i:I)(block:V)= macro impl_on[I,V]
def impl_on[I, V](c:Context)(i:c.Expr[I])(block:c.Expr[V]):c.Expr[V] = {
import c.universe._
// type of block is
everpeace / sample.scala
Last active Dec 13, 2015
View sample.scala
import scala.language.higherKinds
// 代数の型クラスの階層があって
trait Algebra[E]{ def op(e1:E,e2:E):E }
trait SubAlgebra[E] extends Algebra[E]
// ある代数の型クラスのオブジェクトがあって
object ConcreteAlgebra extends SubAlgebra[Int]{
def op(e1:Int, e2:Int) = e1+e2
everpeace / show branch descriptions in "git branch"
Created Feb 4, 2013
oneliner for showing branch descriptions in "git branch". Branch descriptions can be set with "git branch --edit-descrption [branchname]".
View show branch descriptions in "git branch"
git branch | sed 's/^ /_/' | awk '{desc=""; "git config branch."$2".description"|getline desc ; print $1" "$2" "desc}'|sed 's/^_/ /g'
You can’t perform that action at this time.