YellowFish
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Note Insights Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    # 雲端運算 Cloud Computing [TOC] ## 雲端運算是什麼 ![](https://i.imgur.com/Ak2CYz6.png) > [來源](https://zh.wikipedia.org/zh-tw/%E9%9B%B2%E7%AB%AF%E9%81%8B%E7%AE%97) * 什麼才算是雲端運算,自己在家架伺服器,從學校連線過去算嗎? * 以向 Google GCP 租用雲端主機為例,Google GCP (雲端服務供應商) 必須提供一定條件的服務,才能算是雲端運算,例如 : * 讓使用者可以根據需求自由配置資源 * 讓使用者隨時隨地都能透過網路連線主機 * 資源的配置可以隨時調整 ## 定義 [NIST](https://csrc.nist.gov/publications/detail/sp/800-145/final) (National Institute of Standards and Technology 美國國家標準與技術研究院) 的定義 : 雲端運算是由5種 **Essential Characteristics** (必要特性)、3種 **Service Model** (服務模式)、4種 **Deployment Model** (部署模式)組成 ![](https://i.imgur.com/H2X0Fvo.png) > [來源](https://www.researchgate.net/figure/NIST-Visual-model-of-cloud-computing-definition_fig1_299982137) ### 必要特性 * **Broad Network Access** : 廣泛的網路。使用者可以用任何裝置隨時隨地透過網路存取 * **Rapid Elasticity** : 快速部屬高靈活度。使用者可以有彈性地快速擴增或是縮小資源配置 * **Measured Service** :服務可測量。使用者和供應商都能監控或控制資源的使用狀況(例如儲存空間、處理器、頻寬與使用人數) * 使用者 : 可以了解資源使用量 * 供應商 : 可以依此計算費用 * **On-demand Self-service** : 隨需求應變自助服務。使用者可以依自身需求自行配置運算能力,比如伺服器運作時間或網路儲存空間,而不必透過供應商人工介入 * **Resource Pooling** : 共享資源池。供應商將資源虛擬化後放到資源池,使用者再從裡面自由使用資源 想要滿足這些特性,就需要一些技術來實現 ![](https://i.imgur.com/wbwVeGs.png) > [來源](https://www.ithome.com.tw/article/93004) * 硬體 * 多核心處理器 : 可以提供更大量的運算資源 * 虛擬化 : * 可以快速配置運算資源 * 也可以視使用情況動態調整資源配置 * 虛擬機比實體主機更方便集中管理 * 分散式運算 * [網格運算](https://zh.wikipedia.org/zh-tw/%E7%BD%91%E6%A0%BC%E8%AE%A1%E7%AE%97) : 雲端運算使用網格運算的概念,以分散式運算技術創造龐大的運算資源,來解決大型的運算任務 * 一台超級電腦無法解決的問題 -> 交給很多電腦來做 * 網格運算通常目的是解決需要複雜運算的單一任務(例如核爆模擬、基因定序...,比如基因定序因為 DNA 組合方式非常非常多種,用一般方式來定序會花非常久的時間) * 雲端運算的目的則通常是處理大眾應用的運算,大量的使用者會產生龐大的運算量,所以也需要透過分散式運算來處理 * [MapReduce](https://ithelp.ithome.com.tw/articles/10194296) : 將大規模的運算任務切成好幾小份給多個伺服器處理,最後再將結果整合起來。就像選舉時由很多個開票所開票,最後再統整結果,算出是誰當選 ::: info MapReduce 以計算字串為例 : ![](https://i.imgur.com/IjzD9Jw.jpg) > [來源](https://www.mssqltips.com/sqlservertip/3222/big-data-basics-part-5-introduction-to-mapreduce/) * input : 要做計算的原始資料,以上圖為例其實就是一堆文字清單 * split : 把 input 資料切分 * map : 每一個節點會把對應切割出來的資料建立 key value 結果。 key 是字本身,value 1 代表找到一筆 * combine : 把每一個 key 一樣的合併起來,避免傳送多次出去。是可選的步驟,用於減少網路傳遞的流量來提高性能 * shuffle & sort : 在進入 reduce 階段之前,會先做排序,相關 key 值的會被放在一起 * reduce : 這個階段會做實際的加總,因此每一個 key 的 value 會被加總 * output : 最後輸出的結果 ::: ::: info [網格運算和 MapReduce 的差異](https://www.linkedin.com/pulse/how-hdfs-mapreduce-different-than-grid-computing-kalpna-prakash) * 網格運算雖然運算任務切分,但是所有電腦共用原始資料 * MapReduce 則會把任務和資料都切分 ::: * [NoSQL](https://www.ithome.com.tw/article/93032) : 解決大量運算產生的資料擴增需求 * 非關聯式資料庫 (Not Only SQL),分成 Key-Value 資料庫 (應用數量最多)、記憶體資料庫(In-memory Database)、圖學資料庫(Graph Database)、文件資料庫(Document Database) * Key-Value 資料庫 : * 每個 Key 對應一個 Value * 新增一個 Key 等同於傳統資料庫新增一個 table * 每一群資料之間沒有關聯,可以任意增加刪除 * 可儲存多種類型的資料 * 可以把資料庫分布在不同設備 * 因此可用性也較高,若一個節點故障,換到另一個節點使用就可以 * 網路 * 網際網路 : 讓各個設備可以互相連接,以共享軟體服務 * [SOA](https://ithelp.ithome.com.tw/articles/10228330) * 服務導向架構(Service-Oriented Architecture) * 將系統的功能封裝為一個個服務,使用者可以使用獨立的服務,開發商則可以組合這些服務成應用程式 * [Web 2.0](https://zh.wikipedia.org/zh-tw/Web_2.0)、[Mashup](https://zh.wikipedia.org/zh-tw/%E6%B7%B7%E6%90%AD_(%E4%BA%92%E8%81%AF%E7%B6%B2)) : 讓使用者可以透過網頁操作軟體 * Web 2.0 : 以使用者為中心,強化使用者與網頁的互動 ::: info Web 1.0 : 網頁就是一個靜態 html ,只能看 ::: * Mashup : 將不同來源的網頁、應用程式或服務結合起來,創建一個新的整合應用程式或服務。比如要在網頁放上影片,可以上傳到 Youtube 後再嵌入到自己的網頁 * 系統管理 * [自主運算](https://zh.wikipedia.org/zh-tw/%E8%87%AA%E4%B8%BB%E9%81%8B%E7%AE%97) (Autonomic Computing) : 讓管理人員可以更簡單的管理主機,克服系統快速擴張所帶來的複雜性 ::: info * IBM 定義了自主運算系統的 4 種特性和各自對應的共 8 個條件 1. Self-configuration (自我配置) : 系統能夠自動完成資源配置,並可以根據需求自動調整 * 知道自己可以存取哪些資源、容量、限制,以及如何與其他系統連接 * 基於開放標準,不會限制在某個私有環境下 * 可以適應環境變化,與周圍的系統互動並建立通訊協定 * 可以預測對資源的需求,同時保持使用者透明度 2. Self-healing (自我修復) : 系統會自動發現並修正故障 * 可以避開問題,比如修補自身系統 3. Self-optimization (自我最佳化) : 系統會自動監控和控制資源,確保最佳性能 * 可以最佳化性能,確保運作的最高效率 * 可以根據環境變化自動進行配置和重新配置 4. Self-protection (自我保護) : 系統會自動偵測、識別攻擊,並保護系統 * 可以偵測、識別攻擊和保護系統,維持系統整體安全和完整性 ::: * [資料中心自動化](https://www.netapp.com/zh-hant/data-storage/what-is-data-center-automation/) : 自動化硬體、系統、網路等資源的監控或管理等任務,減少人力的涉入,可以提高資料中心的運作效率,讓使用者可以快速使用服務 ### 服務模式 ![](https://i.imgur.com/PXbOjK7.png) > [來源](https://medium.com/@stfk1105/iaas-paas-saas-%E4%B8%89%E5%85%84%E5%BC%9F-c745dfa0cfd4) * **On Premises** : 本地伺服器,從網路環境到軟硬體維護都要自己來 * **[Infrastructure 基礎設施](https://www.redhat.com/en/topics/cloud-computing/what-is-cloud-infrastructure)** 指的是建造雲服務所需要的部分,包含 Network , Storage , Hardware , Virtualization * Network * 實體網路線、switch、router 等設備組成,在此之上建立虛擬網路 * 通常是多個子網路組成 * 允許建立 VLAN,並為網路資源分配動態或靜態位址 ::: info **[VLAN (Virtual LAN 虛擬區域網路)](http://www.cs.nthu.edu.tw/~nfhuang/chap16.htm)** 在同一個區網內,透過邏輯把區網劃分出多個 VLAN,每個 VLAN 都具備和真實區域網路一樣的功能。同一 VLAN 內的主機之間可以直接互相通訊,不同 VLAN 間的主機通訊則是由 router 轉發 * 實體區域網路 ![](https://i.imgur.com/baGYTow.png) * 虛擬區域網路 ![](https://i.imgur.com/6bZ1yLy.png) * IEEE 802.1Q 規範 * 分成三種實現方式 * physical layer (實體層) : 以 switch 的埠來區分 VLAN * data link layer (資料連結層) : 以 MAC 位址區分 VLAN * network layer (網路層) : 以 IP 子網路或通訊協定來區分 VLAN * 優點 : * 減少廣播流量浪費,因為只有同 VLAN 下的主機會收到廣播 * 增加網路安全性,沒有使用 VLAN 的網路下,同 switch 下的主機可以從廣播封包中得到每個主機的重要資訊,例如 IP 位址和 MAC 位址 * [附上一個可以模擬網路的東東 - Cisco Packet Tracer](https://id.cisco.com/signin/refresh-auth-state/007ouqRXv5GYKyMjBIK51NQqLGtliOvCSz_rBH_mMj) ::: * Storage * 資料儲存在資料中心的儲存陣列中 * 儲存管理會確保資料備份和定期刪除過期備份,也會幫資料加上索引方便查找 * Hardware * 虛擬的雲端運算主機需要有實際的硬體提供資源 * 硬體包含網路設備 (如 switch , router)、儲存陣列、備份設備、伺服器等 * Virtualization * 將硬體資源如 memory , computing power , storage 抽象化並放到集中的資源池 * 使用者可以從資源池自由架設或擴張服務 * **其他** : * [Middleware](https://www.redhat.com/zh-tw/topics/middleware) : 中介軟體,為應用程式提供各種通用服務和功能的軟體,讓開發人員創建應用程式時更有效率 * Runtime : 程式碼在執行時所需要的函式庫和執行環境 * **IaaS (Infrastructure as a Service)** : 基礎設施即服務,服務商提供基礎設施作為服務,使用者不用管理網路環境和硬體設備。使用者就像是拿到一台全新的主機,可以選擇作業系統,也可以在主機上安裝軟體 常見供應商 : * AWS: EC2 , VPC * GCP: GCE * Azure: VM , Block Storage :::info Amazon EC2 實作 1. 註冊並登入 [AWS](https://aws.amazon.com/tw/free/?trk=cf0164b0-a143-4575-9482-010451b8f1d5&sc_channel=ps&ef_id=Cj0KCQjw2v-gBhC1ARIsAOQdKY3Ng_nUE4DxU17E16AZRU6lr-8Dwd3YcUJk1ghhWWVYn7OVLFIuef0aAmuaEALw_wcB:G:s&s_kwcid=AL!4422!3!595905315029!e!!g!!aws!17115100998!136234409996&all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) 2. 開啟 EC2 (Service -> 運算 -> EC2) ![](https://i.imgur.com/8COoKUq.png) 3. 建立新主機 (左邊選"執行個體" , 右上角按"啟動新個體") ![](https://i.imgur.com/SM8XtuX.png) 4. 設定主機名稱、作業系統、硬體配置、ssh key、網路設定 * 主機名稱 : 自己取 * 作業系統 : 選 Ubuntu 20.04 免費方案 ![](https://i.imgur.com/Xooctgi.png) * 硬體配置 : 選一個免費方案 ![](https://i.imgur.com/Ib9MATE.png) * ssh key : 使用已建立的 key,沒有就建立一個,建立完會自動下載下來,要保留好等等登入要用 ![](https://i.imgur.com/gibsw6N.png) * 網路設定 : 可以設置允許連線的主機 IP 、 防火牆規則,如果要在主機上架網頁伺服器允許 HTTP 和 HTTPS 要勾選 ![](https://i.imgur.com/exO3sDS.png) * 儲存空間 : 選擇免費方案之內的空間大小就可以 ![](https://i.imgur.com/iq9Biox.png) 5. 設定完就按右下角的啟動執行個體 ![](https://i.imgur.com/VIuKHXJ.png) 6. 連線主機 : 回到"執行個體"頁面,勾選要連線的主機,按上面的"連線" ![](https://i.imgur.com/uhL5EzU.png) 7. 看到以下頁面後,開啟終端機切換到剛才下載的 ssh key 所在目錄,根據頁面的指令 ssh 連線到主機 ![](https://i.imgur.com/FyVJSeQ.png) ![](https://i.imgur.com/liHe37J.jpg) ![](https://i.imgur.com/PUCpnXt.png) 8. 在上面架設 apache2 * `sudo apt update` * `sudo apt install apache2` 9. 瀏覽器網址輸入 {主機 IP} : 80 link http://ec2-54-95-24-127.ap-northeast-1.compute.amazonaws.com:80 ![](https://i.imgur.com/OM358Qy.jpg) ::: * **PaaS (Platform as a Service)** : 平台即服務。供應商提供應用程式開發環境當作開發工具,讓使用者在上面開發應用程式 常見供應商 : * Heroku (現在沒有免費了:cry: ) * Azure Web App * Google App Engine * AWS Lambda :::info Azure Web App 實作 : 1. 註冊並登入 [Azure](https://portal.azure.com/) 2. 按左上角 "建立資源" ![](https://i.imgur.com/0Ow2A9v.png) 3. 選"Web 應用程式" ![](https://i.imgur.com/sNVyByt.png) 4. 設定名稱(網頁域名)、程式語言、主機位置、主機配置 ![](https://i.imgur.com/ZSUZXIE.png) 5. 因為是免費方案,所以其他功能目前不能使用,直接跳到建立 ![](https://i.imgur.com/IQ6ig6a.png) 6. 部署完成 ![](https://i.imgur.com/jebkBCp.png) 7. 接下來要用 git 把 flask 專案推到主機上 8. 回首頁左邊選單選 App Services ![](https://i.imgur.com/PHaixsz.png) 9. 點進剛才新增的 App ![](https://i.imgur.com/ArsZrX7.png) 10. 左邊選單找到 Deployment Center ![](https://i.imgur.com/3n50r7z.png) 11. Source 選 Local Git 後按 Save ![](https://i.imgur.com/2cmxN5K.png) 12. 複製 git clone uri ![](https://i.imgur.com/EMLl3DA.png) 13. 在 terminal 用 git 指令把專案 push 上去 * cd 到專案目錄下 `git init` `git remote add azure { 剛才的 uri }` `git add .` `git commit -m "{commit name}"` `git push azure master` 14. 接著要輸入使用者名稱和密碼,回到瀏覽器按 Local Git/FTPS credentials ![](https://i.imgur.com/rDY8b82.png) 15. 往下滑複製使用者名稱和密碼 * 名稱只需要複製 `\` 之後的 $yftest2 ![](https://i.imgur.com/4qklcxt.png) 16. push 之後回到 overview 複製網頁的網址 ![](https://i.imgur.com/aMJc7i6.png) 17. 建置正確的話就能看到網頁了 ![](https://i.imgur.com/PMz8nR6.png) ::: * **SaaS (Software as a Service)** : 軟體即服務。供應商提供軟體做為服務,使用者過網際網路就能直接使用 常見供應商 : * Google Apps (Gmail , Google Drive , Google Meet...) * Microsoft 365 * Facebook , Instagram ### 部署模式 * **Public Cloud (公有雲)** : * 雲基礎設施提供給一般大眾或企業使用 * 供應商負責建置和維護實體設備 * 使用者可以省去建置和維護設備的成本 * 有些服務是免費的 * 公有不代表所有資料都是共享,會有存取控制機制 * 可能有資料曝光的安全疑慮,因為資料都放在供應商的主機 * 常見供應商: * AWS * Google GCP * Azure * **Private Cloud (私有雲)** : * 單一組織提出自身需求,供應商提供相應且只給該組織專用的雲端運算架構 * 資料和程式由組織內部管理,資料曝光方面的安全性較好 * 成本較高 * 常見供應商 : * Hewlett Packard Enterprise(HPE) * VMware * Dell * Oracle * **Community Cloud (社群雲)** : * 一群擁有共同需求的組織成立,用來服務該群體 * 通常是針對單一或多種產業提供的服務,比如電子病歷交換雲端平臺 * **Hybrid Cloud (混合雲)** : * 兩個以上的雲端運算架構的結合,可以同時享有兩者的優勢 * 整合和管理上較為複雜 * 常見的是公有雲 + 私有雲 * 比如企業想節省成本又想把敏感資料分開,就會把服務放在公有雲,敏感資料放在私有雲 ![](https://i.imgur.com/IFiAHS2.png) > [來源](https://www.ithome.com.tw/article/93013) * **雲端運算部署模式比較** : | 類型 | 公有雲 | 私有雲 | 混合雲 | |------|------|------|------| | 優點 | 初始成本較低<br>不需維護成本<br>容易部署和擴增 | 資料曝光度較低<br>雲端環境掌控性高 | 享有公有雲和私有雲的優點 | | 缺點 |資料曝光度較高<br>無法掌控雲端環境| 維護成本高<br>不易擴增| 整合和管理複雜| :::info [**VPC 虛擬私有雲**](https://www.cloudflare.com/zh-tw/learning/cloud/what-is-a-virtual-private-cloud/) ![](https://i.imgur.com/ewjzXEz.png) > [來源](https://www.cloudflare.com/zh-tw/learning/cloud/what-is-a-virtual-private-cloud/) #### 介紹 * 全名 Virtual Private Cloud * 在公有雲裡面的隔離私有雲 * 就像餐廳訂位,在公有雲中隔離出來只給某使用者使用 #### 怎麼隔離 ? * VPC 會把私人的資源跟其他公有雲內的其他資源隔離開來 * 隔離的技術包括: * 子網路: * 在 VPC 中定義一個範圍的 IP 位址 * 可以不讓公共網路訪問這些 IP 位址 * VLAN: * 虛擬網路,以邏輯隔離第二層的網路 * 隔離後自己要怎麼從外網連進去 VPC ? * [VPN](https://www.cloudflare.com/zh-tw/learning/access-management/what-is-a-vpn/): * 虛擬私人網路 (Virtual Private Network) * 在 VPC 上架設 VPN 伺服器 * 從外網透過 VPN 連線至 VPC 上的 VPN 伺服器 * VPN 伺服器再將外網 IP 位址改為 VPC 的內網 IP,就不會被 VPC 網路隔離 #### 虛擬私有雲的優點 * 擴展性高 : VPC 是公用雲供應商負責管理,所以使用者可以隨時根據需求擴增運算資源 * 部署較容易 : 跟部署混合雲相比 (公有 + 私有),部署相對簡單 #### Amazon Private Cloud 有提供幾個可提高和監控 VPC 安全的功能 ![](https://i.imgur.com/QN62Cgw.png) > [來源](https://docs.aws.amazon.com/zh_tw/vpc/latest/userguide/VPC_Security.html#VPC_Security_Comparison) * security group * 管理進出虛擬機的流量 * 只能設定允許的規則 * 傳輸之前會檢查全部的規則 * 有狀態,允許回傳流量,不會受任何規則影響 * Network ACL (Network Access Control Lists) * 管理進出子網路的流量 * 可以設定允許和拒絕的規則 * 傳輸之前,會依規則編號順序依序檢查規則 * 無狀態,回傳的流量也要通過規則檢查 * ACL 下可以管理多個子網路,一個子網路必須也只能被一個 ACL 管理 #### reference : * https://towardsaws.com/aws-saa%E7%B3%BB%E5%88%97-vpc%E4%BB%8B%E7%B4%B9-c1c9dfc92f * https://www.cloudflare.com/zh-tw/learning/cloud/what-is-a-virtual-private-cloud/ * https://docs.aws.amazon.com/zh_tw/vpc/latest/userguide/VPC_Security.html#VPC_Security_Comparison * https://docs.aws.amazon.com/zh_tw/vpc/latest/userguide/vpc-network-acls.html ::: ## reference * https://ithelp.ithome.com.tw/articles/10259104 * https://www.youtube.com/watch?v=m-1OPCcCumQ&ab_channel=%E9%98%BF%E5%BD%AC%E9%9B%BB%E8%85%A6 * https://www.redhat.com/en/topics/cloud-computing/what-is-cloud-infrastructure * https://www.ithome.com.tw/article/93002

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully