Skip to content

Commit 5b1dab3

Browse files
add content and tasks
Co-authored-by: Midha Tahir <[email protected]>
1 parent 9b5f8c4 commit 5b1dab3

17 files changed

+20388
-108
lines changed

gatsby-config.js

+21-14
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,32 @@
11
module.exports = {
22
siteMetadata: {
3-
title: "Gatsby Starter Course",
4-
subtitle: "For making great content",
5-
author: "Your Name Here",
6-
authorSubtitle: "Company Here",
7-
authorImage: "author.jpg", // this image should go in /static
3+
title: "Git & Docker Workshop",
4+
subtitle: "",
5+
author: "Muhammad Hasham Khalid",
6+
authorSubtitle: "Associate Consultant @ Systems Ltd.",
7+
authorImage: "author.jpeg", // this image should go in /static
88
courseImage: "courseImage.png", // this also should go in /static
9-
twitter: "https://twitter.com/holtbt", // make empty string to omit socials
10-
linkedin: "https://linkedin.com/in/btholt",
11-
github: "https://github.com/btholt",
9+
twitter: "https://twitter.com/hashiinngg", // make empty string to omit socials
10+
linkedin: "https://linkedin.com/in/mhashamk",
11+
github: "https://github.com/Muhammad-Hasham-Khalid",
1212
description:
13-
"This is the description that will show up when people share as well as on search engines",
13+
"I am a software engineer, eager to learn and work on modern technologies for building and deploying fast, elegant and performant applications. I am mostly interested in mobile and web application development alongside with exploring cutting-edge technologies like Blockchain, Cloud Computing etc.",
1414
keywords: [
15-
"this is",
16-
"a list of keywords and phrase",
17-
"that search engines",
18-
"will index your page for",
15+
"hasham khalid",
16+
"muhammad hasham",
17+
"muhammad hasham khalid",
18+
"Muhammad-Hasham-Khalid",
19+
"hashiinngg",
20+
"software-engineer",
21+
"speaker",
22+
"github",
23+
"git",
24+
"docker",
25+
"NED",
26+
"NED university",
1927
],
2028
},
2129
pathPrefix: "",
22-
// pathPrefix: "/my-repo-name", // if you're using GitHub Pages, put the name of the repo here with a leading slash
2330
plugins: [
2431
{
2532
resolve: "gatsby-plugin-react-svg",

lessons/conclusion.md

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
path: "/conclusion"
3+
title: "Conclusion & Resources"
4+
order: "4A"
5+
section: "Conclusion"
6+
---
7+
8+
### Resources
9+
10+
- [Oh Shit Git!](https://ohshitgit.com/)
11+
- [Bret Fisher YouTube Channel](https://www.youtube.com/@BretFisher)
12+
- [All In One Resources](https://bit.ly/all-in-1-resources)
13+
- [Frontend Masters](https://frontendmasters.com)
14+
- [Bret Fisher Udemy Course](https://www.udemy.com/course/docker-mastery/)
15+
- [Stephen Grider Udemy Course](https://www.udemy.com/course/docker-and-kubernetes-the-complete-guide/)

lessons/docker-commands.md

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
path: "/docker-commands"
3+
title: "Docker Commands"
4+
order: "2B"
5+
section: "Introduction to Docker"
6+
---
7+
8+
# Docker Cheatsheet
9+
10+
You can refer to this docker cheatsheet for the commands [cheatsheet](https://docs.docker.com/get-started/docker_cheatsheet.pdf)

lessons/docker-introduction.md

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
path: "/docker-introduction"
3+
title: "What is Docker & Why it is used?"
4+
order: "2A"
5+
section: "Introduction to Docker"
6+
---
7+
8+
## What Are Containers?
9+
10+
A container is a unit of software that packages code and its dependencies so the application runs quickly and reliably across computing environments.
11+
12+
## Why Containers and Why we need containers?
13+
14+
### Bare Metal
15+
16+
Historically, if you wanted to run a web server, you either set up your own or you rented a literal server somewhere. We often call this "bare metal" because, well, your code is literally executing on the processor.
17+
18+
- More Maintenance is required
19+
- Expensive
20+
- Takes time
21+
22+
### Virtual Machines
23+
24+
Virtual machines are the next step. This is adding a layer of abstraction between you and the metal. Now instead of having one instance of Linux running on your computer, you'll have multiple guest instances of Linux running inside of a host instance of Linux.
25+
26+
### Public Cloud
27+
28+
- AWS, Azure, Google C
29+
30+
So, as alluded to above, you can nab a VM from a public cloud provider like Microsoft Azure or Amazon Web Services. It will come with a pre-allocated amount of memory and computing power (often called virtual cores or vCores because their dedicated cores to your virutal machine.) Now you no longer have to manage the expensive and difficult business of maintaining a data center but you do have to still manage all the software of it yourself: Microsoft won't update Ubuntu for you but they will make sure the hardware is up to date.
31+
32+
### Containers
33+
34+
And here we are, containers. As you may have divined, containers give us many of the security and resource-management features of VMs but without the cost of having to run a whole other operating system. It instead usings chroot, namespace, and cgroup to separate a group of processes from each other.
35+
36+
So now that we've been through why we need containers, let's go through the three things that make containers a reality.

lessons/docker-quiz.md

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
path: "/docker-quiz"
3+
title: "Docker Quiz"
4+
order: "3B"
5+
section: "Final Quiz"
6+
---
7+
8+
1. Pull latest Ubuntu image, run a container with it, go inside the container and install nodejs in it and run a simple hello world program.
9+
2. Docker keeps a container running as long as the process it started inside the container is still running. How do you check if the container is running. Mention the steps you would take to find out.
10+
3. What command is used to build an image.
11+
4. Make a dockerfile to run a simple http python flask server, mention all the steps you will take.
12+
5. Make a dockerfile to run a simple one page HTML website, mention all the steps you will take.

lessons/git-cmds.md

+95
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
---
2+
path: "/git-commands"
3+
title: "Git Commands"
4+
order: "1C"
5+
section: "Introduction to Git"
6+
---
7+
8+
## Initialize, Setup Remote, Clone Repo
9+
10+
- Initialize
11+
12+
```bash
13+
git init # Yeah, that's it! pretty simple, right?
14+
```
15+
16+
- Setup Remote
17+
18+
```bash
19+
# This will tell git from which remote repository we want to connect our current local repository
20+
git remote add <remote name> <remote link>
21+
```
22+
23+
- Clone an existing repsoitory
24+
25+
```bash
26+
git clone <repository-remote-link> <location (optional)>
27+
```
28+
29+
## Stage, Commit, Push
30+
31+
- Staging
32+
33+
```bash
34+
# stage a specific file
35+
git add <filename>
36+
37+
# stage all files
38+
git add .
39+
# or
40+
git add -A
41+
```
42+
43+
- Commit
44+
45+
```bash
46+
# commit with a message as arg
47+
git commit -m "<your meaningful message goes here>"
48+
49+
# commit without a message arg
50+
# (this will open the editor to write the commit message)
51+
git commit
52+
53+
# add/stage files that are dirty(modified/deleted) and then commit
54+
git commit -a
55+
56+
# can also pass the -m flag with -a to write the commit message as arg
57+
git commit -am "<your meaningful message goes here>"
58+
```
59+
60+
- Push
61+
62+
```bash
63+
git push <remote name> <branch name>
64+
```
65+
66+
Some useful flags to learn with this command are:
67+
68+
- `-f`: force
69+
> **WARNING**: Don't use the `-f` flag until you don't know what side effect it will create, it can mess up things.
70+
- `-u`: setup upstream
71+
72+
## Branching and Merging
73+
74+
- Branching
75+
76+
```bash
77+
git branch <branch name> # create a branch
78+
git checkout <branch name> # then switch to it
79+
# or
80+
git checkout -b <branch name> # create a branch and switch to it
81+
82+
# delete a branch
83+
git branch -d <branch name>
84+
```
85+
86+
- Merging branches
87+
88+
```bash
89+
git checkout <branch-name-in-which-you-want-to-merge>
90+
git merge <branch-name-you-want-to-merge>
91+
```
92+
93+
## Creating a Pull Request
94+
95+
Pull requests are a way of contributing to a project, they are very useful to learn and to be used in personal, group and other open source projects, as with the help of branches and PRs the whole workflow becomes well organized and well managed. Now, let's take a look at how we can create a pull request and merge it.

lessons/git-installation.md

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
path: "/git-installation"
3+
title: "Git Installation & Setup"
4+
order: "1B"
5+
section: "Introduction to Git"
6+
---
7+
8+
### Download
9+
10+
Git can be easily downloaded and installed, OS specific instructions can be found on the official website:
11+
12+
[https://git-scm.com/](https://git-scm.com/)
13+
14+
### Instructions during installation
15+
16+
**(For Windows Users)**
17+
18+
Select the commit message editor to be notepad instead of the default one (vim), as it can difficult to use for beginners.
19+
![git-editor-windows](./images/git-editor-win.jpeg)
20+
21+
### Post installation setup
22+
23+
Let's tell git about ourselves, it's just like setting up a local account on git so that it knows us:
24+
25+
```bash
26+
git config --global user.name "John Doe"
27+
git config --global user.email "[email protected]"
28+
```
29+
30+
Replace the name with your GitHub username, and the email with your email that you made the account with on GitHub.
31+
32+
> There is one thing to learn here that is this `--global` flag. Only use this flag with the command if you want to setup this configuration globally through out your machine. If you want to specifically setup some folder with a different account you can skip this flag.

lessons/git-introduction.md

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
path: "/what-is-git"
3+
title: "What is Git?"
4+
order: "1A"
5+
section: "Introduction to Git"
6+
description: "Introduction to git and git installation."
7+
icon: "dumpster-fire"
8+
---
9+
10+
Let's see the how the git website defines git, it's pretty straight forward and self explanatory:
11+
12+
> 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.
13+
14+
But, wait a minute, what is a **VERSION CONTROL SYSTEM** ???
15+
16+
## VCS (Version Control System)
17+
18+
Let's see how microsoft's website explains what a version control system is:
19+
20+
> Version control systems are software that help track changes make in code over time.
21+
22+
But why do I need a version control system???
23+
24+
## Need of VCS
25+
26+
Without version control, developers are tempted to keep multiple copies of code on their computer. This is dangerous because it's easy to change or delete a file in the wrong copy of code, potentially losing work. Version control systems solve this problem by managing all versions of the code, but presenting the team with a single version at a time.

lessons/git-quiz.md

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
path: "/git-quiz"
3+
title: "Git Quiz"
4+
order: "3A"
5+
section: "Final Quiz"
6+
---
7+
8+
1. How would you edit a commit that has just been pushed to github?
9+
2. How would you make one small change after you had just committed, without making another commit.
10+
3. How will you know if a branch has just been combined into a master in Git?
11+
4. How can you configure a Git repository to run code sanity checking tool (prettier/lint) before making commits? (hints: Husky, Git Hooks) - Mention all steps and commands.

lessons/images/git-editor-win.jpeg

65.8 KB
Loading

lessons/intro.md

-29
This file was deleted.

lessons/page-2.md

-10
This file was deleted.

lessons/page-3.md

-10
This file was deleted.

0 commit comments

Comments
 (0)