---
# System prepended metadata

title: WebDevStarter

---

# WebDevStarter

[![hackmd-github-sync-badge](https://hackmd.io/gW_lfDpdQNiMwRf0KFHyWw/badge)](https://hackmd.io/gW_lfDpdQNiMwRf0KFHyWw)


## for Windows
- Windows11で最新のものを想定
- 原則としてPowerShell側から操作するものとする

1. WindowsTerminal
    * basic commands on PowerShell
    ```shell=PS
    #PowerShell Basic Commands
    ls
    cd
    mkdir
    cat
    mv
    rm
    pwd
    echo
    history
    ```
    ```shell=PS
    #show hidden filse
    ls -force
    ```
    * Different: PowerShell / CommandPrompt
    * install winget
        * access https://www.microsoft.com/store/productId/9NBLGGH4NNS1
        * install
        * restart WindowsTerminal
    * about winget
        * winget basic commands
        ```shell=PS
        winget search
        winget show
        winget install
        winget list
        winget upgrade
        winget uninstall
        ```
2. WSL
    * about Windows/MaOS/Linux
    * about WSL
    * check distList for WSL
    ```shell=PS
    #PowerShell
    wsl --list -o
    ```
    * install Ubuntu
    ```shell=PS
    #PowerShell
    wsl --install -d Ubuntu
    ```
    * restart Windows
        * first launch Ubuntu, need to create UNIX account
        ```shell=bash
            Enter new UNIX username: 
            New password:
            Retype new password:
        ```
        * do not forget!
3. Ubuntu(WSL)
    * access Ubuntu on WSL
    ```shell=PS
    #PowerShell
    wsl Ubuntu
    ``` 
    * about wsl basic commands
    ```shell=PS
    #PowerShell
    wsl
    wsl -l -v
    wsl -l -o
    wsl --shutdown
    wsl --unregister
    ``` 

    * commands on Ubuntu
    ```shell=bash
    #Ubuntu
    ls
    cd
    mkdir
    cat
    mv
    rm
    pwd
    echo
    history
    touch
    vim
    grep
    less
    ll
    ```
    ```shell=bash
    #show hidden files
    ls -a
    ```

4. VisualStudioCode
    * about VisualStudioCode
        * a code editor, made by Microsoft
        * many users, many documents, many extensions
    * install VSCode
    ```shell=PS
    winget search VisualStudioCode
    winget install Microsoft.VisualStudioCode
    ```
    * launch VSCode
    * sync DockerContainer
    * open console
        * use PowerShell
        * use Ubuntu
    * controll projectDirectory
        * create NewFile
        * edit File
        * save File
        * delete File
        * create NewFolder
        * edit folderName
        * delete folderName
    * check files from Terminal, Explorer
5. Git
    * about Git
    * install Git
    ```shell=PS
    #PowerShell
    winget search git
    winget install Git.Git
    ```
    * try Git
    ```shell=PS
    #PowerShell
    mkdir sample-git
    cd sample-git
    git init
    git status
    ```  
    * create sample.ext
    ```shell=PS
    #PowerShell
    git status
    git add sample.txt
    git status
    git commit
    ```
    * IF ERROR
        * at fist use, u need to set config
        ```shell=PS
        #PowerShell
        git config --global user.email "your@email.com"
        git config --global user.name "yourName"
        git commit
        ```
    * edit CommitMessage
        * press i key
        * type "first commit"
        * press esc
        * press :wq
        * press Enter
    * check result
    ```shell=PS
    #PowerShell
    git status
    git log
    ```
    * edit & save sample.txt
    ```shell=PS
    #PowerShell
    git status
    git log
    git diff
    git restore sample.txt
    git status
    ```
    * check sample.txt

    ```shell=PS
    #PowerShell
    rm sample.txt
    ```  
    * check sample.txt
    
    ```shell=PS
    #PowerShell
    git status
    git restore sample.txt
    ```
    * check sample.txt
6. Git GUI Client
    * about Fork
    * install Fork
    ```shell=PS
    #PowerShell
    winget search Fork
    winget install Fork.Fork
    ```
    * launch Fork
    * press "finish"
        * wait loading
    * open "sample-git" repository
    * check commit-log
        * "first commit"
    * edit sample-git/sample.txt by VSCode
    * open Fork
    * check "Local Change"
        * "Unstaged" > sample.txt
            * check diff
            * press "Stage"
            * input "add text to sample.txt" to "Commit subject"
            * press "Commit ... File"
    * cehck "All Commits" 
        * check commit-log
            * "add text to sample.txt"
            * "first commit"
    * R-Click "add text to sample.txt"
        * click "Revert Commit"
        * press "Revert"
    * check commit-log
        * "Revert 'add text to sample.txt'"
        * "add text to sample.txt"
        * "first commit"
    * sample.txt is restored
7. GitHub
    * generate SSH-Key
    * set public-key to GitHub account
    * sync local/remote repository
        * init
        * fethc/pull/push/merge
    * about GitHub Pages
        * deploy smiple html web site
    * add member to your repository
8. PHP
    * about Programming Language
        * Basic use(?)
            * C/C++
            * Rust
            * Java
        * SmartPhone App
            * Swift, Kotlin
        * Windows App
            * C#
        * Browser
            * JavaScript
        * Web
            * WebPage
                * HTML/CSS
            * Controll Content in WebPage
                * JavaScript
            * Server
                * PHP
                * Ruby 
        * AI, Scraping
            * Python
        * Excel
            * VBA
    * why PHP
    * about PHP
    * use PHP
        * install PHP to Ubuntu
        ```shell=bash
        #Ubuntu
        sudo apt update && sudo apt upgrade
        sudo apt install php-cli
        php --version
        ```
        * make sample.php
        ```shell=bash
        #Ubuntu
        mkdir ~/sample-php
        cd ~/sample-php
        git init
        touch sample.php
        ```
        * open your VSCode and edit hello.php
        ```php
        <?php echo 'Hello World'; ?>
        ```
        * do hello.php in Ubuntu
        ```shell=bash
        hello.php
        ```

9. 
10. 
11. 