Skip to content

Instantly share code, notes, and snippets.

philipz philipz

Block or report user

Report or block philipz

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
philipz /
Created Feb 12, 2020
Change Quarkus Default GraalVM Version

./mvnw package -Pnative -Dquarkus.native.container-runtime=docker

View gist:71323be0c2362c6717c64e07d174c149
"type": "java",
"name": "backend",
"request": "attach",
"hostName": "localhost",
"port": 5005
philipz /
Last active Dec 15, 2019
Apache Ignite architecture model

Apache Ignite architecture model

Embedded with the application


Server in separate JVM (real cluster topology)


Client and Server in separate JVM on single host


philipz / ignite-stateful-set.yaml
Last active Dec 27, 2019
Apache Ignite Transactions Test
View ignite-stateful-set.yaml
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# Unless required by applicable law or agreed to in writing, software
philipz /
Created Nov 28, 2019
microk8s tips
sudo usermod -a -G microk8s <username>
sudo microk8s.kubectl config view --raw > $HOME/.kube/config
microk8s.enable metallb
philipz /
Created Nov 12, 2019
Imagemagick fill right-top corner

gravity regions

convert 1502QR42495.jpg -gravity NorthEast -region 12%x12% -fill white -colorize 100% 1502QR42495_fill.jpg

philipz /
Last active Mar 25, 2020
Kafka Partitions and Consumer Group

A. Consumer > Partitions
  1. ./ --create --zookeeper zookeeper:2181 --replication-factor 1 --partitions 1 --topic test
  2. ./ --broker-list kafka:9092 --topic test
  3. ./ --bootstrap-server kafka:9092 --topic test --consumer.config ./
  4. ./ --bootstrap-server kafka:9092 --topic test --consumer.config ./
View gist:cc2877aaeb0158b86290122badb2d2c0
1. 管理型系統,如營運類系統,首選關聯式。
2. 大流量系統,如電商單品頁的某個服務,後台選關聯式,前台選內存式。
3. 日誌型系統,原始數據選列式,日誌搜尋選倒排索引。
4. 搜尋型系統,指站內搜尋,非通用搜尋,如商品搜尋,後台選關聯式,前台選倒排索引。
5. 交易型系統,如庫存、交易、記帳,選關聯式+快取+一致性協議,或新型關聯式資料庫。
6. 離線運算,如大量數據分析,首選列式,關聯式亦可。
7. 即時運算,如即時監控,可以選時序資料庫,或列式資料庫。

wget -qO - | sudo apt-key add -

You can’t perform that action at this time.