Docker Swarm + Portainer 筆記

原本打算用 Docker Swarm 玩下 mesh routing,點知伏位何其多。最伏嘅位係,佢寫就寫連到,但實際唔得,又無寫ERROR MSG。所以記錄一下點搞。

  1. Firewall / Router 開 Port
    TCP port 2377
    TCP and UDP port 7946
    UDP port 4789
  2. 揀一部機做 Manager, 行 docker swarm init –advertise-addr <ip> advertise-addr 非常重要,其他機必需要係連到呢個IP。假設你冇打 advertise-addr,咁 Docker 有機會拎咗你個 Lan IP (e.g. 192.168.1.2) 做地址。當你其他機唔係同一個 LAN 就會連唔到。
  3. init 完佢會俾個 command 你,唔好咁急行住喺其他 Worker 機行住,因為同樣地你都係要加 advertise-addr。
    docker swarm join –token <token> <manager ip>:2377 –advertise-addr <ip>
  4. 之後喺 Manager 就可以裝 Portainer。
    curl -L https://downloads.portainer.io/portainer-agent-stack.yml -o portainer-agent-stack.yml
    docker stack deploy -c portainer-agent-stack.yml portainer
  5. 如果想加多啲 Worker 重覆第3步即可。
  6. 之後可以喺 Portainer 加個 nginx service 試下係咪真係得 http://<manager ip>:9000/#!/1/docker/services/new
    Name: 你鍾意
    Image: nginx:latest
    Replicas: 1
    Port Mapping: 7000:80 (都係你鍾意,記得 Firewall 開返)
  7. 然後可以睇下得唔得,兩個都上到就代表 Mesh Routing 生效中,如果唔得,就要 Double Check 第一至第三步有冇做錯嘢。
    http://<manager ip>:7000
    http://<worker ip>:7000

[Solved] Xbox (Beta) Game Pass Download Error 0x0000001

I recently subscribed Xbox Game Pass, however some games cannot be installed with 0x0000001 error. All methods from Microsoft forum or Reddit are not working for me. After wasted a lot of time, I found my way to solve the problem.

Method 1: Set Correct Group

  1. Press Win + R
  2. Type “lusrmgr.msc” and press “Enter”
  3. Double click your user and go to the “Member of” tab.
  4. Make sure it is “Administors” and “Users”
  5. If not, click “Add…” to add them back

Method 2: Create an Local Administor Account

  1. Go to “Settings”
  2. Find “Family & other users”
  3. Click “Add someone else to this PC”
  4. Click “Add a user without a Microsoft account”
  5. After created the account, click “Change account type”, and select “Administor” from dropdown list.
  6. Logout your current account and login your new account
  7. Try to open Xbox (Beta) and download some games.

水樹奈々 – ALL FOR LOVE 歌詞 同步

[00:05.930]
[00:10.816]夜明けまじかに見る夢の
[00:15.733]余韻が胸を揺らしてる
[00:20.936]巡り会えた輝きに包まれ
[00:25.391]痛みまでも消えていく
[00:31.027]空の踊り子が花びらになって
[00:36.120]見渡す限りを埋め尽くす
[00:40.718]
[00:41.120]傍にいてそれだけで
[00:43.651]他に何もいらないよ
[00:46.380]貴方がいるから貴方と生きてるから
[00:51.243]愛しさも絶望も
[00:53.826]その全て抱きしめて
[00:56.193]ただ愛のためにただ愛のためだけに
[01:01.266]貴方だけしか私にはもういらない
[01:09.592]光射す世界へ
[01:13.183]
[01:16.532]二人がもてる何もかも
[01:21.559]二人がもたぬ何もかも
[01:26.439]同じ祈りを重ねられたなら
[01:31.049]奇跡に近付くのでしょう
[01:34.960]
[01:36.738]遠雷が響く雲は騒りゆく
[01:41.733]季節の移ろい告げるけど
[01:46.277]
[01:46.884]ここに来てこのままで
[01:49.357]答えなんていらないよ
[01:51.917]今、時を超えて永遠に届くから
[01:56.816]失って触れ合って
[01:59.402]ひとつに辿り着いた
[02:01.977]ただ愛のままにただ愛の向くままに
[02:06.946]あなただけしか私にはもう見えない
[02:13.711]
[02:35.050]永久に変わらないふたつの心
[02:39.847]永久に祈らせない時間が
[02:44.300]この地上にあるなら
[02:46.826]恐れ抱くものなんてないのに
[02:53.670]
[02:54.961]傍にいてそれだけで
[02:57.477]他に何もいらないよ
[03:00.076]あなたがいるから貴方と生きてるから
[03:05.107]愛しさも絶望も
[03:07.566]その全て抱きしめて
[03:10.037]ただ愛のためにただ愛のためだけに
[03:15.206]貴方だけしか私には見えない
[03:20.186]貴方だけしか私にはもういらない
[03:28.516]光射す世界へ
[03:33.053]

NativeScript + Vue + Typescript

https://www.nativescript.org/blog/nativescript-vue-with-class-components

npm install -g @vue/cli @vue/cli-init

vue init nativescript-vue/vue-cli-template <project-name>

<script lang="ts">
import { Component, Prop, Vue } from "vue-property-decorator";
@Component
export default class MyComp extends Vue {
  @Prop() private msg: string;
}
</script>