week 1

project management

Upload Files Using Terminal

What is Git?

Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.

Why use Git?

How to generate the ssh key (how I did it using a Mac in 2020)

First, our fab academy students use a site called git lab. You who become a fab academy student become a member of the git lab site. We have to create the ssh key of our computer and save it in git lab so we can upload the file on the web using the terminal.

  1. Opened terminal
  2. Created a new directory (folder) named .ssh
    mkdir .ssh
  3. entered the .ssh new directory (folder)
    cd .ssh
  4. Created an ssh key called "fa2020key"
    ssh-keygen -t rsa -b 4096 -C "fa2020key"
  5. Edited the text file named config
    nano config
  6. Entered the following: (note the three spaces at the start of line 2,3 & 4) And Exit.
                    Host fabacademy
                       HostName gitlab.fabcloud.org
                       User git
                       IdentityFile ~/.ssh/fa2020
                  
  7. Copied the contents of my fa2020.pub key (I could use `cat fa2020.pub` from terminal)
  8. Pasted my new key into your gitlab profile at https://gitlab.fabcloud.org/profile/keys
  9. And checked if the ssh key is registered well.
    ssh -T git@gitlab.fabcloud.org
  10. And I received a message.
    Welcome to GitLab, @jihwan!

How to setup the link between the central repository and your local archive

  1. Navigate to the folder where you want to put or create your repo. (Using the command "cd")
  2. Clone your student repository
    git clone git@git.fabacademy.org:fabacademy2020/yourlabname/yourstudentnumber.git
  3. Then you can edit your files in the folder where git clone is connected.
Reference Site

Fab Academy Tutorial Site

Upload Files Using Terminal

Individual Assignment
  1. Open terminal.
  2. Navigate to the folder where you created your repo.
    cd/your_repository
  3. To download the last copy from the repository.
    git pull
  4. Add the new files you added to git. (to upload all the files at once)
    git add -A
  5. To see what changed.
    git status
  6. Now name your update, so you know what you changed with this push.
    git commit -m "change you did"
  7. Upload to the Repository.
    git push
Group Assignment
  1. Open terminal.
  2. Navigate to the folder where you created your group repo.
    cd/your_group_repository
  3. Switch to master branch for get files from the master branch.
    git checkout master
  4. To download the last copy from the repository.
    git pull
  5. To make a "branch name" branch.
    git branch branchname
  6. Switch to "branchname" branch.
    git checkout branchname
  7. Add the new files you added to git. (to upload all the files at once)
    git add -A
  8. To see what changed.
    git status
  9. Now name your update, so you know what you changed with this push.
    git commit -m "change you did"
  10. Upload to the Repository.
    git push origin branchname
Reference Site

Make Homepge

Code Editors

  • Repl.it - The collaborative browser based IDE ((I used it for the first time.))

    There is no need to install the program.

    Sign up process is required

    Files are stored online. (I was uncomfortable with this process.)

  • Visual Studio Code - Code Editor ((I used it mainly later))

    The program must be installed

    Manage files on your personal computer (this was good)

    Additional programs can be installed and used.

Workflow

  1. First of all, I chose one of the students' homepages last year. (Annie Ferlatte's site)
  2. And I downloaded the template that the student referred to. (In Free CSS Site, Downloaded INFINITY 1.0 TEMPLATE.)
  3. I made my homepage by modifying the template on repel it site.
  4. But the first html of my life was not easy. I didn't know what to fix or how to fix it.
  5. So I studied through a Korean YouTuber's channel where I can learn about coding. (Insung Yoon's channel)
  6. And this YouTube channel was great at helping me understand the basics of coding. (Life coding)
  7. I looked up the html video of the function I wanted.
  8. And I added a feature one by one.

Change My Website

First (Before) & Second (After) Version

The first site was very clumsy and uncomfortable to look at the information I recorded. So I modified the homepage. The parts that I revised are first, people who look at the homepage can find information well, second, made a little more clear.

Reference

Reference Site

Useful Source Code

If you want to create a navigation bar located on the left side of this page you see now, check out this article

  1. I'll show you a part of my html code
                    <nav>
                      <ul>
                        <li><a href="#part1">part1</a></li>
                        <li><a href="#part2">part2</a></li>
                        <li><a href="#part3">part3</a></li>
                        <li><a href="#part4">part4</a></li>
                        <li><a href="#part5">part5</a></li>
                        <li><a href="#part6">part6</a></li>
                        <li><a href="#part7">part7</a></li>
                        <li><a href="#part8">part8</a></li>
                        <li><a href="#part9">part9</a></li>
                      </ul>
                    </nav>
                  
  2. And this is my JavaScript code
                    let mainNavLinks = document.querySelectorAll("aside ul li a");
                    let mainSections = document.querySelectorAll("article section");
                    
                    let lastId;
                    let cur = [];
                    
                    window.addEventListener("scroll", () => {
                        _.throttle(doThatStuff, 1000);
                      });
                    
                    window.addEventListener("scroll", event => {
                      let fromTop = window.scrollY;
                    
                      mainNavLinks.forEach(link => {
                        let section = document.querySelector(link.hash);
                    
                        if (
                          section.offsetTop <= fromTop &&
                          section.offsetTop + section.offsetHeight > fromTop
                        ) {
                          link.classList.add("current");
                        } else {
                          link.classList.remove("current");
                        }
                      });
                    });
                  
  3. These two lines are the code that connects the navigation and the specified part
                    let mainNavLinks = document.querySelectorAll("aside ul li a");
                    let mainSections = document.querySelectorAll("article section");
                    
  4. And in this part, the number is the code that adjusts the moving distance.
                    window.addEventListener("scroll", () => {
                        _.throttle(doThatStuff, 1000);
                      });
                    
  5. And I understood the above parts a bit, but my understanding was insufficient to modify the formula.

How to Resize Images

My instructor designated the image as 800x600 in size and 80KB in size. I used a program called GIMP, which is a Layer-based raster 2D design program similar to PhotoShop.

  1. Download the GIMP first.
  2. Drag and drop images to open in GIMP
  3. Use the Crop Tool on the left to cut only the part you want

  4. Right-click > Image > Scale Image Then set the image size and quality and press the scale button.

  5. Right-click again > File > Export As Specify the location and extension to save the image. (I saved almost all files in .jpg format.)

  6. Use the scroll to reduce the capacity to the desired size.