cccr424
    • 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 New
    • Engagement control
    • Make a copy
    • 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 Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy 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
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # 作業 [TOC] 附註:.md 代表文章格式為 markdown,可自行上網搜尋相關教學,檔案內容請盡可能遵守[中文文案排版指北](https://github.com/sparanoid/chinese-copywriting-guidelines)。 ## hw1:交作業流程 請用文字一步步敘述應該如何交作業。 範例: 1. 新開一個 branch:`git branch hw1` 2. 切換到 branch:`git checkout hw1` 請將答案寫在 [hw1.md](hw1.md)。 Ans 1. 從 ## hw2:理解放鬆很重要 大腦會在兩種不同的工作模式中切換,所以在卡關時讓大家適當休息一下是很重要的,否則只會越卡越深,陷入泥淖之中。 因此,這個作業希望讓大家學會休息的重要性。請你找個時間出去散步(像是家裡附近的公園之類的,反正哪裡都可以),並且把休息一天的心得寫在每日進度上面。 Week 1 的週五晚上,除了去上咖啡課外,在上課前也到旁邊的操場走了一圈。發現有報名咖啡課真的是太好了,雖然只有兩個小時的課,但是品嘗咖啡和練習手沖都過得很開心,剛好課程是講到越南咖啡,加了條狀包裝的煉乳(第一次看到),覺得很奇特,不過也知道其實越南咖肥沒甚麼特別的技巧,就是把水注滿等他滴完然後加煉乳,泡的甜甜的就可以了。 ## hw3:教你朋友 CLI 學了一項東西之後若是想驗證自己是不是真的懂,教別人是最快的方法。 有天,你的麻吉 h0w 哥跑來找你說:「欸!能不能教我 command line 到底是什麼,然後怎麼用啊?我想用 command line 建立一個叫做 wifi 的資料夾,並且在裡面建立一個叫 afu.js 的檔案。就交給你了,教學寫好記得傳給我,ㄅㄅ」 可...可惡,居然這樣子就跑走了。但因為他是你的麻吉,所以你也沒辦法拒絕。 因此這個作業要請你寫一篇簡短的文章,試圖教會 h0w 哥什麼是 command line 以及如何使用,並且要教他如何達成他想要的功能。 請將答案寫在 [hw3.md](hw3.md)。 ## hw4:跟你朋友介紹 Git 因為你的人實在是太好,時不時就會有朋友跑來找你來幫忙。 這次來的是一個叫做菜哥的朋友,會叫做菜哥是因為家裡賣菜,跟你認識的其他人同名的話純屬巧合。 菜哥:「就是啊,我最近有一個煩惱。因為我的笑話太多了,所以我目前都用文字檔記錄在電腦裡,可是變得越來越多之後很難紀錄,而且我的笑話是會演進的。會有版本一、版本二甚至到版本十,這樣我就要建立好多個不同的檔案,弄得我頭很痛,聽說你們工程師都會用一種程式叫做 Git 來做版本控制,可以教我一下嗎?」 『好吧,我試試看』 菜哥:「謝啦,話說你來參加這個計畫學程式真的選對了欸,之後就不會有貧血的困擾了」 『為什麼』 「因為你會寫程式」 『...』 「喔...原來是血乘四的部分啊(拍手)」 就是這樣,在一陣尬聊之中你答應了菜哥的要求,要教他怎麼使用 Git 來管理他的笑話。 因此,你必須教他 Git 的基本概念以及基礎的使用,例如說 add 跟 commit,若是還有時間的話可以連 push 或是 pull 都講,菜哥能不能順利成為電視笑話冠軍,就靠你了! 請將答案寫在 [hw4.md](hw4.md)。 ## hw5:簡答題 請將答案寫在 [hw5.md](hw5.md)。 1. 請解釋後端與前端的差異。 2. 假設我今天去 Google 首頁搜尋框打上:JavaScript 並且按下 Enter,請說出從這一刻開始到我看到搜尋結果為止發生在背後的事情。 3. 請列舉出 3 個「課程沒有提到」的 command line 指令並且說明功用。 ANS 1. 前端與後端的差異 2. Google 首頁搜尋框打上:JavaScript 並且按下 Enter,代表著我從這裡送出一個請求搜尋 JavaScript 到 Google server, 而 server 在收到這個指令時就到 data base 裡做搜尋 JavaScript,然後在 response 資料給我,這時我能看到搜尋結果。 ![](https://i.imgur.com/PZNJ7rn.jpg) 3. * TOC在加上中括號,可以做成目錄,非常方便。 [TOC] * $ whoami dir .help ## 挑戰題 有一種東西叫做 [shell script](http://linux.vbird.org/linux_basic/0340bashshell-scripts.php),可以用 command line 指令以及一些語法寫成一個腳本,執行之後可以很方便地做很多事。 舉例來說,下面這個檔案我們存檔並取名叫做 test.sh: ``` bash #!/bin/bash touch "$1.js"; echo "檔案建立完成"; ``` 接著為了讓他可以執行,我們要更改檔案權限:`chmod +x test.sh`。 最後執行它:`./test.sh abc`,傳入參數`abc`。 就會建立一個叫做 abc.js 的檔案,這就是一個很簡單的 shell script。 現在請你寫一個 shell script,可以傳入一個數字 n,然後會產生 1~n 個檔案,檔名是 `{number}.js`。 舉例來說:`./num.sh 10`會產生`1.js`、`2.js`...`10.js`。 <details> <summary>提示 #1</summary> 去找找看怎麼在 shell script 裡面寫迴圈吧! </details> ## 超級挑戰題 請寫一個`github.sh`,可以傳入一個參數 username,執行之後就會輸出這個 GitHub 使用者的暱稱、介紹、地點跟個人網站。 備註:這題禁止使用 jq 這個指令。 範例: ``` ./github.sh aszx87410 輸出: Huli Love coding, teaching, and writing. Believe sharing can make the world a better place. Taipei, Taiwan https://medium.com/@hulitw ``` <details> <summary>提示 #1</summary> 你知道嗎?用這個網址可以取得使用者的資料:https://api.github.com/users/aszx87410 </details> <details> <summary>提示 #2</summary> cut, grep, sed, awk 這些指令都是字串處理的好夥伴 </details>

    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