Skip to content

Instantly share code, notes, and snippets.

View philipz's full-sized avatar

philipz philipz

View GitHub Profile
@philipz
philipz / gist:4f4e74d4ea516c7a369cdfd68c2fee13
Created November 22, 2020 05:10
How to Hide Grub Boot Menu in Ubuntu 20.04 LTS
sudo nano /etc/default/grub
add this line to your grub file:
GRUB_RECORDFAIL_TIMEOUT=0
sudo update-grub
Done!
@philipz
philipz / readme.md
Created February 12, 2020 05:18
Change Quarkus Default GraalVM Version

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

@philipz
philipz / gist:71323be0c2362c6717c64e07d174c149
Created January 24, 2020 14:22
VSCode Java Remote Debug
{
"type": "java",
"name": "backend",
"request": "attach",
"hostName": "localhost",
"port": 5005
},
@philipz
philipz / readme.md
Last active December 15, 2019 13:12
Apache Ignite architecture model

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 December 27, 2019 06:06
Apache Ignite Transactions Test
# 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 November 28, 2019 14:12
microk8s tips
sudo usermod -a -G microk8s <username>
sudo microk8s.kubectl config view --raw > $HOME/.kube/config
microk8s.enable metallb
@philipz
philipz / readme.md
Created November 12, 2019 02:12
Imagemagick fill right-top corner

gravity regions

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

@philipz
philipz / readme.md
Last active March 25, 2020 09:14
Kafka Partitions and Consumer Group

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
1. 管理型系統,如營運類系統,首選關聯式。
2. 大流量系統,如電商單品頁的某個服務,後台選關聯式,前台選內存式。
3. 日誌型系統,原始數據選列式,日誌搜尋選倒排索引。
4. 搜尋型系統,指站內搜尋,非通用搜尋,如商品搜尋,後台選關聯式,前台選倒排索引。
5. 交易型系統,如庫存、交易、記帳,選關聯式+快取+一致性協議,或新型關聯式資料庫。
6. 離線運算,如大量數據分析,首選列式,關聯式亦可。
7. 即時運算,如即時監控,可以選時序資料庫,或列式資料庫。