Sometimes I want to create empty branch for gh-pages or server-packages instead of branch from master, I will excute following command:
1 | git checkout --orphan empty.branch.name |
Sometimes I want to create empty branch for gh-pages or server-packages instead of branch from master, I will excute following command:
1 | git checkout --orphan empty.branch.name |
ESLint
extensionsettings.json
by pressing Ctrl,
Add following setting
1 | "eslint.validate": [ |
(Optional) Add "eslint.autoFixOnSave": true
for autofix on save.
It should work now, enjoy :)
Proxy means on behalf of
:
Proxy(Forward proxy)
on behalf ofuser
to reach websitesReverse proxy
on behalf ofserver
to receive users request
Thanks to Dean Sim’s picture on this answer, it is the best to help understand reverse proxy :
More detail on stackoverflow answer
To set up custom domain with HTTPS on Github Pages, there are 6 steps :
Open Developer tools (F12) => Settings (F1) => Enable JavaScript source maps
常看到HTML裡有data-
這個屬性, 其實這是HTML5才有的,透過讓每個元素有自己的dataset,讓本來需要用ajax獲得或是hide起來的資料,可直接使用data-把值藏好!
存人物的多項資訊到一個DOM元素中
1 | <ul id="people"> |
Library argparse
in python could help user handle arguments passed through command prompt, below I record the most important functions :
今天剛好遇到要計算兩個日期區間有沒有重疊,發現這個問題其實可以想成,A和B一生中有沒有可能相遇?
這麼一想就簡單多了,就是兩人必須在對方死亡前出生!
1 | var isOverlap = a.start < b.end && b.start < a.end |