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
philipz / readme.md
Created Feb 12, 2020
Change Quarkus Default GraalVM Version
View readme.md

./mvnw package -Pnative -Dquarkus.native.container-runtime=docker -Dquarkus.native.builder-image=quay.io/quarkus/ubi-quarkus-native-image:19.3.1-java8

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

Apache Ignite architecture model

Embedded with the application

ignite_arch1

Server in separate JVM (real cluster topology)

ignite_arch2

Client and Server in separate JVM on single host

ignite_arch3

@philipz
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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@philipz
philipz / readme.md
Created Nov 28, 2019
microk8s tips
View readme.md
sudo usermod -a -G microk8s <username>
sudo microk8s.kubectl config view --raw > $HOME/.kube/config
microk8s.enable metallb
@philipz
philipz / readme.md
Created Nov 12, 2019
Imagemagick fill right-top corner
View readme.md

gravity regions

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

@philipz
philipz / readme.md
Last active Mar 25, 2020
Kafka Partitions and Consumer Group
View readme.md

A. Consumer > Partitions

consumer.properties

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

wget -qO - https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub | sudo apt-key add -

You can’t perform that action at this time.