蓬萊人偶
    • 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
    - Book mode https://hackmd.io/@ncnu-opensource/book [TOC] # 自動化 ## 自動化是什麼 >讓電腦定時做事情,比如鬧鐘叫我起床、打鐘叫老師下課、 >[name=還沒開始研究主題前的我] > 自動化是相對人工概念而言的。 > - 指的是在沒人參與的情況下,利用控制裝置使被控對象或過程自動地按預定規律運行。 > - 自動控制技術的研究有利於將人類從複雜、危險、繁瑣的勞動環境中解放出來並大大提高控制效率。 > - 自動化的最大好處是可以節省勞動力,同時,它也可用於節約能源和材料,並改善質量,準確度和精度。[name=維基百科] ## 為什麼要自動化 > 「懶惰(Laziness)、沒耐性(Impatience)與驕傲(Hubris)」 在《Programming Perl》中, Larry Wall 鼓勵程式人應培養三種美德:「懶惰(Laziness)、沒耐性(Impatience)與驕傲(Hubris)」。 - 懶惰會讓程式人努力減少整體工作量; - 沒耐性的程式人無法忍受電腦怠惰。 - 驕傲的程式人會寫下旁人無可挑剔,而本身極度自豪的程式。 而自動化就是讓人懶惰的方法之一。 給人處理重複的事情出錯率大於電腦處理重複的事情出錯率 ## 需要自動化的工作 ### 各行各業的自動化 - 工業自動化 - 農業自動化 - 實驗室自動化 - 辦公室自動化 - 家庭自動化 ### 生活日常 - 電扶梯 / 電梯 - 自動門 - 空調 - 微波爐 - 自動販賣機 ![](https://i.imgur.com/kXsGtpg.jpg) > 圖片來源:https://www.ettoday.net/news/20180621/1195813.htm - 自助點餐 - 語音導覽 - [IFTTT](https://zh.wikipedia.org/wiki/IFTTT) - 如果發生 A 就執行 B (If this then that) - [如果你追到我,我就和你嘿嘿嘿](https://www.youtube.com/watch?v=GVgMtbAV3kk) - 美玉姨 ![](https://i.imgur.com/ZxB7xvn.png) >圖片來源:https://news.pts.org.tw/article/426650 - 自動駕駛 ![](https://i.imgur.com/y7fXB9v.png) >圖片來源:https://www.kocpc.com.tw/archives/349829 ### 個人電腦 - 電腦開機時要跑的 2266 的東西(這邊拿 ubuntu 做範例) 1. 電源接上,確認各項硬體狀態 2. 載入作業系統 3. 驅動儲存裝置、CPU、網路卡、音效卡等等... 4. 開機初始化 --- 1. BIOS (Basic Input/Output System) 2. 透過 MBR 讀取 Boot Loader - [GNU](https://zh.wikipedia.org/wiki/GNU%E8%A8%88%E5%8A%83) GRUB - GNU 是一個自由軟體集體協作計劃,它的目標是建立一套完全自由的作業系統 - GRUB2 是自 Ubuntu 9.10 之後預設開機載入和管理程式 - 是一個來自 GNU 的啟動載入程式 - GRUB 允許使用者可以在電腦內同時擁有多個作業系統。 ::: info - MBR(Master Boot Record): 硬碟上的主啟動磁區,是電腦開機後存取硬碟時所必須要讀取的首個磁區,可以讀取到 Boot Loader 在硬碟中的位置 - Boot Loader: 電腦開機自檢完成後裝載作業系統的電腦程式 - boot 是 bootstrap 的縮寫,源自於短語「 Pull oneself up by one's bootstraps 」,即「靠自己振作起來」 ::: 3. kernel 就會開始驅動儲存裝置、CPU、網路卡、音效卡等等... 4. /sbin/init (Sysvinit) - runlevel | runlevel | Column 2 | | -------- | -------- | | init 0 | shutdown | | init 1 | Single user mode | | init 2 | Multiuser, without [NFS](http://linux.vbird.org/linux_server/0330nfs.php#What_NFS_NFS)| | init 3 | Full multiuser mode | | init 4 | unused | | init 5 | Full multiuser mode with graphical.target | | init 6 | reboot | ::: warning 通常選要進行哪個 runlevel ,會在開機時就決定好了。 雖然說 root 可以去進行切換的動作,但是不建議在開機之後再切換 runlevel ,尤其是降 level。比如說從 level 5 降到 level 3 等同直接把圖形的部份砍掉 ::: - init 讀入`/etc/inittab`,並依據 `/etc/inittab` 設定內容,依序啟動各個相關的 Process 5. UpStart - 採用事件驅動 (ex: 插入 USB) - 於 6.10 ~ 14.0 Upstart , Sysvinit 可以並用 - `/etc/init.d` 紀錄開機時要啟動那些套件 ![](https://i.imgur.com/OsUXMKJ.png) - `/etc` 底下還是有保留各 level 需要執行的套件 ![](https://i.imgur.com/0jkEysj.png) ![](https://i.imgur.com/2RgoV79.png) 6. Systemd - Ubuntu 15.04 開始使用 Systemd,可於開機時決定要使用 Systemd 或 Upstart。 - 用target代替(Runlevel) :::info Systemd 的 `d` , 在Unix中常以` d `作為 daemon 系統為了某些功能必須要提供一些服務,而這個服務就稱為 service 那 daemon 簡單來說就是提供這個服務的 process ::: - 部分外接設備 - 外接設備的驅動程式有分通用與獨立的 - 如果驅動程式是開源的, [linux](https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/) 會把他編到系統裡 - 如果是獨立的,有的會在接上外接設備後自動去安裝驅動程式 > 友情提示: Ubuntu 中的 Software & Updates 有 Additional Drivers 會顯示目前你有哪些驅動程式需要去更新 > ![](https://i.imgur.com/xczTM29.png) > [name=BlueT] - .bashrc - `.bashrc` v.s `/etc/bash.bashrc` - 前者因使用者而異,後者是系統檔案,所以對大家都有影響 - 主要就是打開 terminal 後,讓系統主動幫你做某些動作 ![](https://i.imgur.com/SURBLb0.png) :::info 新增使用者的時候,使用者的家目錄一開始會擁有一些檔案,而這些檔案是從 `/etc/skel` 來的,換句話說今天如果在 `/etc/skel` 中對檔案進行變動的話,那新增使用者的家目錄一開始有的東西也會跟著變動。 ![](https://i.imgur.com/ww8QSqx.png) ::: - tab 自動補字 - bash-completion - [GNU Readline](https://en.wikipedia.org/wiki/GNU_Readline) - 套件如果有 bash-completion ,可以到這邊查看`/usr/share/bash-completion/completions/` - 額外安裝的套件則到這邊查看 `/etc/bash_completion.d/ ` - 小實作 ```shell= _ping() { local cur=${COMP_WORDS[COMP_CWORD]} COMPREPLY=( $(compgen -W "192.168.0.1 192.168.0.2" -- $cur) ) } complete -F _ping ping ``` 之後執行 ```shell= chmod +x /etc/bash_completion.d/ping.bash ``` 接下來只要在 ping 後面按 `tab` 就只會跑出 `192.168.0` - 開機自動... - ubuntu 裡面有自帶這個程式 (Startup Applications) ![](https://i.imgur.com/9uydLgP.png) - 可以新增開機時要系統自動幫你做什麼 ![](https://i.imgur.com/O6I4WEs.png) - 像是開機自動幫我開瀏覽器 ![](https://i.imgur.com/U9NJjPi.png) ## 自動化例子實作 ### MariaDB 資料庫自動備份 #### 自動備份所需工具 1. mysqldump :::info MariaDB 與 MySQL 的愛恨情仇 當初 MySQL 開始出現時,因為它是打著非商業使用免費的,所以很多人在一開始開發時就選擇 MySQL 當資料庫,可是後來 MySQL 被開發 JAVA 的昇陽(SUN)合併,因為 JAVA 本身也是開源,也是免費的,所以對開者來說並沒有什麼問題,接下來是昇陽被甲骨文(Oracle)合併了,所以 MySQL 最後也被併到 ,這個就有很大問題了。 結果 Oracle 還是對外發表,宣稱 MySQL 維持原樣,並會持續維護,所以請大家不用擔心。不過,因為 Oracle 本來就不需要 MySQL,所以不可能全力在 MySQL 之上,這個問題,引起當初 MySQL 開發團隊的不開心,所以最後 MySQL 開發團隊重新集結,重新開發了一套免費(非商業使用時)的資料庫,叫做 MariaDB ,也因為這個原因,所以 MariaDB 對 MySQL 的支援度很高,幾乎可說是無痛轉移。在 Oracle 收購後, MySQL 被發展成一個封閉源碼的項目,只有 Oracle 和少數 Oracle 選出的公司才能參與。 - MySQL 新的企業延伸套件採取封閉源碼 - 資料庫的臭蟲不再公開 - 不再積極更新 MySQL 的公開代碼庫 - 未能快速傳達或修復安全問題,這一點讓 Linux 散佈套件對 Oracle 很不滿 - Oracle 選擇移除功能,而非修正臭蟲 - MySQL 5.5 的新程式碼不再有測試案例 ::: :::info 如果你在安裝的時候(例如 apt 或是 yum install)找不到以 MariaDB 開頭的函式庫或是輔助程式的時候,可以嘗試用 MySQL 為開頭去找,因為很多程式其實是共用的。 ::: - 全備份 ```shell= mysqldump -u root -p --all-databases > all_db_backup.sql mysqldump -u root -p -B file > file.sql ``` 讀檔: ```shell= mysql -u username -p < all_db_backup.sql mysql -u username -p database_name < file.sql ``` :::info | 參數 | 用處 | | -------- | -------- | | -h --host | 指定連接的服務器名稱或者 IP (預設 localhost) | |-A --all-databases|導出所有資料庫。不過預設情況下是不會導出 information_schema 庫。| |-B --databases|導出指定的某個/或者某幾個數據庫,參數後面所有名字參量都被看作數據庫名。| |-d --no-data| 只導出表結構,不導出表數據。| |-t --no-create-info| 只導出數據,而不添加 CREATE TABLE 語句。| |-f --force|即使遇到 SQL 錯誤,也繼續執行,功能類似 Oracle exp 命令中的 ignore 參數。| | - -ignore-table| 指定的表對像不做導出,參數值的格式為[db_nametblname],注意每次只能指定一個值,如果有多個表對像都不進行導出操作的話,那就需要指定多個 --ignore-table 參數,並為每個參數指定不同的參數值。| > information_schema 是紀錄所有其他資料庫的信息。如資料庫名,資料庫的表,表欄的數據類型與訪問權 限等。 ::: - binlogs(Binary Log) - 以 binary 方式儲存的 log - 此方法會把所有會變動到資料的指令儲存到 binlog ,其中包含 CREATE , ALTER TABLE , INSERT , UPDATE , DELETE … (不包含 SELECT 和 SHOW 這一類不影響資料的) . - 首先要還原最近一次的 Full Backup,然後接著依序恢復該時間之後的 binlogs - 無法常規查看,要用 MariaDB 的 mysqlbinlog 才能查看 - 於 `/etc/mysql/mariadb.conf.d/50-server.cnf` 開啟 - log_bin = 存放位置 ![](https://i.imgur.com/YsRNgey.png) > A MariaDB server with the binary log enabled will run slightly more slowly.[name=MariaDB] | 比較 | 只用全備份 | 全備份 + binlogs | | -------- | -------- | -------- | | 版本 | 只能以每次備份做控制 | 任何會改變資料庫的動作都會被記錄,可自由調整 | | 對資料庫速度影響 |備份的瞬間會有大影響|一直都有小影響| 讀取: ``` PURGE BINARY LOGS TO 'mysql-bin.00002'; ``` ``` PURGE BINARY LOGS BEFORE '2099-01-01 09:55:22'; ``` ![](https://i.imgur.com/OR8GGIE.png) 2. rsync - scp : 可以異地複製貼上 - rsync : 可以異地複製比較貼上 <!-- >FIXME: 連線、取得/傳/產生 list 、如何比對、 list 的樣貌、比對後如何更新檔案、 atime mtime ctime -> inode -> sector --> | 比較 | scp | rsync | | -------- | -------- | -------- | | 複製方法 | 全備份 | 差異備份 | | 斷線 |重頭開始|繼續比較,不用重頭| | 預設 port | 22(ssh) | 873 | |速度|第一次速度一樣,之後較慢|第一次速度一樣,之後較快| - 簡單原理 來源處 檔案 A: ``` 123xy4abcde ``` 目的地 檔案 B: ``` 1234abcdefg ``` 先比較 `mtime` 或 `檔案大小` :::info mtime(modification time): 檔案的上次修改時間 ::: 如果說檔案的 `mtime` 或 `檔案大小`有不同,那就開始比較內容 比較方法: 1. 先將`檔案 B` 的內容分塊,`檔案 B`會變成 (這裡三個三個為一塊) ``` 123 4ab cde fg ``` 2. 接下來 `檔案 A` 會依照 `檔案 B` 給的塊大小來做比較 1. 區塊一(一樣): 檔案 A: ``` 123 ``` 檔案 B: ``` 123 ``` 2. 區塊二(不一樣): 檔案 A: ``` xy4 ``` 檔案 B: ``` 4ab ``` 3. 由於區塊二不一樣,`檔案A`就會往後一個字然後繼續做比較,同時將這個點記錄下來 4. 區塊二(還是不一樣): 檔案 A: ``` y4a ``` 檔案 B: ``` 4ab ``` 5. 區塊二(一樣了): 檔案 A: ``` 4aB ``` 檔案 B: ``` 4ab ``` 6. 區塊與區塊之間的不同記錄下來後一起給 `檔案B`,最後 `檔案B` 再將它們組合起來 ##### 用法 ```shell= rsync -av 來源目錄 目標目錄 ``` :::info 常用參數 |Column 2 | Column 3 | |-------- | -------- | |-a, --archive| 權限保存模式,相當於 -rlptgoD 參數,很快速的保存幾乎所有的權限設定| |-r, --recursive | 對子目錄以遞迴模式處理| |-b, --backup |產生備份,也就是對於目的已經存在有同樣的檔案名時,將老的檔案重新命名為 ~filename。| |-u, --update |僅僅進行更新,也就是略過所有已經存在於目的端,且文件時間比要備份的檔案為新。| |-p, --perms| 保留檔案權限| |-t, --times| 保留檔案時間資訊| |-S, --sparse| 對稀疏檔案進行特殊處理以節省目的端的空間| |-n, --dry-run|不實際執行傳送,只顯示將會有的傳輸動作| |-W, --whole-file| 複製檔案,不進行增量檢測| |- -existing |只比對更新目的端已經存在的檔案,而不備份那些新產生的檔案| |- -ignore-existing |忽略目的端已經存在的檔案(也就是不更新)| |- -delete| 刪除傳送端已經不存在,而目的端存在的檔案| ::: 3. crontab |代表意義|分鐘|小時|日期|月份|週|指令| |---|---|---|---|---|---|---| |數字範圍|0-59|0-23|1-31|1-12|0-7|呀就指令啊| | 特殊字號 | 代表意義 | | -------- | -------- | | *(星號) | 代表任何時刻都接受的意思!舉例來說,範例一內那個日、月、週都是 * , 就代表著『不論何月、何日的禮拜幾的 12:00 都執行後續指令』的意思! | | ,(逗號) | 代表分隔時段的意思。舉例來說,如果要下達的工作是 3:00 與 6:00 時,就會是:`0 3,6 * * * command` | | -(減號) | 代表一段時間範圍內。舉例來說, 8 點到 12 點之間的每小時的 20 分都進行一項工作:`20 8-12 * * * command` | | /n(斜線) | 那個 n 代表數字,亦即是『每隔 n 單位間隔』的意思,例如每五分鐘進行一次,則:`*/5 * * * * command` | ``` shell= crontab -e ``` ``` shell= # 每週二四六執行備份 * * * * 2,4,6 mysqldump -u root -p --all-databases > all_db_backup.sql * * * * 2,4,6 rsync -av all_db_backup.sql 目標目錄 ``` [好用的東西](https://crontab-generator.org/) [好玩的東西](https://crontab.guru/) ##### /etc 中的 cron... ![](https://i.imgur.com/D4nax9p.png) ![](https://i.imgur.com/vUg63MY.png) ### 監控系統 https://en.wikipedia.org/wiki/Comparison_of_network_monitoring_systems <!-- ## OpenSource 自動化監控 常見的套件: ### Nagios #### 狀態 - ![](https://i.imgur.com/ZbSOpFL.png) - 軟狀態 - 指一般對於監控事件都會提供一個可容忍的容錯範圍 - 硬狀態 - 即是指當發生超出可容忍的範圍 #### [安裝](https://hackmd.io/G-K1tJ6SRMeLzcagsJ87Aw) #### plugin - check_http(檢查網站狀態) ::: info |參數|功用| | --- | --- | |-H|監控 domane name| |-I|監控 ip| |-p|設定欲監控的 port,預設為 80| |-u|可直接設定預設監控該網站的URL位址,預設為根目錄「/」| |-w|設定警告(Warn)狀態的回應時間,單位為秒| |-c|設定嚴重錯誤(Critical)狀態的回應時間,單位為秒| |-t|設定連接測試的時間(Timeout),預設為 10 秒(即 10 秒內無法跟對方建立連線即判定對方無法連線)| |-P|在測試的過程中,同時以 POST 的方式發出參數資訊| |-r|可以正規表示法(Regulator Express)設定來判別網站伺服器是否存在。| ::: - 回傳 |狀態|| |---|---| |OK|正常| |WARNING|ex:401,403,404| |Critical|有問題| ![](https://i.imgur.com/r7pJyGn.png) #### 其他 ![](https://i.imgur.com/TpYxqf3.png) -->

    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