├── .github
├── ISSUE_TEMPLATE
│ ├── bug.yml
│ ├── config.yml
│ ├── feature_request.yml
│ ├── new_post.yml
│ └── other.yml
├── dependabot.yml
├── funding.yml
├── labeler.yml
├── pr-title-checker.json
└── workflows
│ ├── author-assign.yml
│ ├── greetings.yml
│ └── labeler.yml
├── .gitignore
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── astro.config.mjs
├── package-lock.json
├── package.json
├── pnpm-lock.yaml
├── public
├── authors
│ ├── Divya4879.jpg
│ ├── abrarlala.jpg
│ ├── adi-ray.jpg
│ ├── azeen3003.jpeg
│ ├── bangadam.jpeg
│ ├── cute girl.png
│ ├── default.png
│ ├── grand-rick001.png
│ ├── iamdiksha.jpg
│ ├── ikshwaku03.jpg
│ ├── jmngandu.jpg
│ ├── oyepriyansh.jpeg
│ ├── prashantjagtap2909.jpg
│ ├── precious.jpg
│ ├── rahmaaaan.jpg
│ ├── ravisolanki27.jpg
│ ├── rizzabh.jpg
│ ├── rudy3333.jpg
│ ├── shubhamnagda.jpg
│ ├── siddharth1006.jpeg
│ ├── supriadi.jpg
│ ├── sushannt.png
│ ├── vansh16aug.jpg
│ ├── william-monroy.jpg
│ ├── yashkshrivas4491.jpg
│ ├── younusk.jpg
│ └── zemerik.png
├── favicon.ico
└── images
│ └── banner.png
├── src
├── components
│ ├── Author.astro
│ ├── BaseHead.astro
│ ├── Callout.tsx
│ ├── Header.astro
│ ├── Post.astro
│ ├── ThemeToggle.tsx
│ └── YoutubeEmbed.tsx
├── content
│ └── posts
│ │ ├── Cloud Computing.md
│ │ ├── Creating-a-simple-webpage.md
│ │ ├── Discord bot.md
│ │ ├── Git.md
│ │ ├── How-to-Contribute-to-Open-Source-Projects–A-Beginner-Guide.md
│ │ ├── Intro.md
│ │ ├── Jr-Motivation.md
│ │ ├── create_spring_boot_application.md
│ │ ├── future-of-data-science.md
│ │ ├── hello-developers.md
│ │ ├── hello.md
│ │ ├── how-does-the-virtual-dom-work.md
│ │ ├── how-javascript-works.md
│ │ ├── how-to-add-a-new-post.md
│ │ ├── how-to-create-rest-api-in-golang.md
│ │ ├── learning-astro.md
│ │ ├── lets-connect.md
│ │ ├── netflix-agorithm.md
│ │ ├── numbers-in-python.md
│ │ ├── object-oriented-programming.md
│ │ ├── roadmap-to-mern-stack.md
│ │ ├── shubhamnagda.md
│ │ ├── test-tweet-shahnawaz.md
│ │ ├── what-is-angular.md
│ │ ├── what-is-golang.md
│ │ ├── what-is-html.md
│ │ ├── what-is-javascript.md
│ │ ├── what-is-reactjs.md
│ │ ├── whatisJava.md
│ │ └── younusk.md
├── env.d.ts
├── layouts
│ ├── Layout.astro
│ └── PostLayout.astro
├── pages
│ ├── 404.astro
│ ├── authors
│ │ ├── [author].astro
│ │ └── index.astro
│ ├── index.astro
│ └── posts
│ │ ├── [slug].astro
│ │ └── index.astro
├── styles
│ ├── 404.css
│ └── global.css
└── util
│ ├── authors.ts
│ └── readingTime.mjs
├── tsconfig.json
└── uno.config.ts
/.github/ISSUE_TEMPLATE/bug.yml:
--------------------------------------------------------------------------------
1 | name: "👾 Bug Report"
2 | description: "File a Bug here to help improve the project."
3 | title: "Bug: "
4 | labels: ["bug"]
5 | body:
6 | - type: textarea
7 | id: description
8 | attributes:
9 | label: "Description"
10 | description: "Please provide a detailed description of the issue."
11 | validations:
12 | required: true
13 | - type: textarea
14 | id: screenshots
15 | attributes:
16 | label: "Screenshots"
17 | description: "Please add screenshots if applicable."
18 | - type: dropdown
19 | id: browsers
20 | attributes:
21 | label: "What browsers are you seeing the problem on?"
22 | multiple: true
23 | options:
24 | - "Brave"
25 | - "Chrome"
26 | - "Firefox"
27 | - "Microsoft Edge"
28 | - "Opera"
29 | - "Safari"
30 | - "Other"
31 | - type: checkboxes
32 | id: work
33 | attributes:
34 | label: "Ready to Work?"
35 | options:
36 | - label: "I want to work on this issue"
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/config.yml:
--------------------------------------------------------------------------------
1 | blank_issues_enabled: false
2 | contact_links:
3 | - name: "❓ Question"
4 | url: "https://discord.com/invite/AeAjegXn6D"
5 | about: "Feel free to ask your question on our Discord server."
6 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature_request.yml:
--------------------------------------------------------------------------------
1 | name: "✨ Feature Request"
2 | description: "Suggest a feature request"
3 | title: "feat:"
4 | labels: ["feature request"]
5 | body:
6 | - type: textarea
7 | id: what-feature
8 | attributes:
9 | label: "Description"
10 | description: "Describe your feature request"
11 | validations:
12 | required: true
13 | - type: textarea
14 | id: screenshots
15 | attributes:
16 | label: "Screenshots"
17 | description: "Please add screenshots if applicable"
18 | validations:
19 | - type: checkboxes
20 | id: work
21 | attributes:
22 | label: "Ready to Work?"
23 | options:
24 | - label: "I want to work on this issue"
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/new_post.yml:
--------------------------------------------------------------------------------
1 | name: "🆕 New Post"
2 | description: "Add a new project on DevTweet"
3 | title: "feat: new post by "
4 | labels:
5 | - "New Post"
6 | - "good first issue"
7 | body:
8 | - type: textarea
9 | id: post-add
10 | attributes:
11 | label: "Add a new project on DevTweet"
12 | validations:
13 | required: true
14 | - type: checkboxes
15 | id: terms
16 | attributes:
17 | label: "Ready to Work?"
18 | options:
19 | - label: "I want to work on this issue"
20 | required: true
21 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/other.yml:
--------------------------------------------------------------------------------
1 | name: "🔶 Other"
2 | description: "Use this for any other issues. Please do NOT create blank issues."
3 | labels: ["other"]
4 | body:
5 | - type: markdown
6 | attributes:
7 | value: "# Other issue"
8 | - type: textarea
9 | id: issuedescription
10 | attributes:
11 | label: "What would you like to share?"
12 | description: "Provide a clear and concise explanation of your issue."
13 | validations:
14 | required: true
15 | - type: textarea
16 | id: extrainfo
17 | attributes:
18 | label: "Additional information"
19 | description: "Is there anything else we should know about this issue?"
20 | validations:
21 | required: false
22 |
--------------------------------------------------------------------------------
/.github/dependabot.yml:
--------------------------------------------------------------------------------
1 | version: 2
2 | updates:
3 | - package-ecosystem: "npm"
4 | directory: "/"
5 | schedule:
6 | interval: "weekly"
7 |
--------------------------------------------------------------------------------
/.github/funding.yml:
--------------------------------------------------------------------------------
1 | github: oyepriyansh
--------------------------------------------------------------------------------
/.github/labeler.yml:
--------------------------------------------------------------------------------
1 | New Post:
2 | - 'src/content/posts/*'
3 | wait for reviewers:
4 | - '**/*'
--------------------------------------------------------------------------------
/.github/pr-title-checker.json:
--------------------------------------------------------------------------------
1 | {
2 | "LABEL": {
3 | "name": "title needs formatting",
4 | "color": "F9D0C4"
5 | },
6 | "CHECKS": {
7 | "prefixes": [
8 | "fix: ",
9 | "feat: ",
10 | "docs: ",
11 | "test: ",
12 | "chore: ",
13 | "ci: ",
14 | "perf: ",
15 | "refactor: ",
16 | "revert: ",
17 | "style: ",
18 | "data:",
19 | "fix(",
20 | "feat(",
21 | "docs(",
22 | "chore(",
23 | "ci(",
24 | "perf(",
25 | "refactor(",
26 | "revert(",
27 | "style(",
28 | "test("
29 | ]
30 | },
31 | "MESSAGES": {
32 | "success": "All OK",
33 | "failure": "Failing CI test",
34 | "notice": ""
35 | }
36 | }
--------------------------------------------------------------------------------
/.github/workflows/author-assign.yml:
--------------------------------------------------------------------------------
1 | name: 'Author Assign'
2 |
3 | on:
4 | pull_request_target:
5 | types: [opened, reopened]
6 |
7 | jobs:
8 | assign-author:
9 | runs-on: ubuntu-latest
10 | steps:
11 | - uses: toshimaru/auto-author-assign@v1.1.0
12 | with:
13 | repo-token: '${{ secrets.GITHUB_TOKEN }}'
--------------------------------------------------------------------------------
/.github/workflows/greetings.yml:
--------------------------------------------------------------------------------
1 | name: 'Greetings'
2 |
3 | on:
4 | fork:
5 | push:
6 | branches: [main]
7 | issues:
8 | types: [opened]
9 | pull_request_target:
10 | types: [opened]
11 |
12 | jobs:
13 | welcome:
14 | runs-on: ubuntu-latest
15 | steps:
16 | - uses: actions/checkout@v1
17 | - uses: EddieHubCommunity/gh-action-community/src/welcome@main
18 | with:
19 | github-token: ${{ secrets.GITHUB_TOKEN }}
20 | issue-message: 'Welcome, @${{ github.actor }}! Thanks for raising the issue!'
21 | pr-message: 'Great job, @${{ github.actor }}! Thanks for creating the pull request!'
22 | footer: 'Soon the maintainers/owner will review it and provide you with feedback/suggestions.'
23 |
--------------------------------------------------------------------------------
/.github/workflows/labeler.yml:
--------------------------------------------------------------------------------
1 | name: 'Labeler'
2 | on:
3 | - pull_request_target
4 |
5 | jobs:
6 | triage:
7 | permissions:
8 | contents: read
9 | pull-requests: write
10 | runs-on: ubuntu-latest
11 | steps:
12 | - uses: actions/labeler@v4
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Ignore build output
2 | dist/
3 |
4 | # Ignore generated types
5 | .astro/
6 |
7 | # Ignore dependencies
8 | node_modules/
9 |
10 | # Ignore logs
11 | npm-debug.log*
12 | yarn-debug.log*
13 | yarn-error.log*
14 | pnpm-debug.log*
15 |
16 | # Ignore environment variables
17 | .env
18 | .env.production
19 |
20 | # Ignore macOS-specific files
21 | .DS_Store
22 |
--------------------------------------------------------------------------------
/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | # Contributor Covenant Code of Conduct
2 |
3 | ## Our Pledge
4 |
5 | We as members, contributors, and leaders pledge to make participation in our
6 | community a harassment-free experience for everyone, regardless of age, body
7 | size, visible or invisible disability, ethnicity, sex characteristics, gender
8 | identity and expression, level of experience, education, socio-economic status,
9 | nationality, personal appearance, race, religion, or sexual identity
10 | and orientation.
11 |
12 | We pledge to act and interact in ways that contribute to an open, welcoming,
13 | diverse, inclusive, and healthy community.
14 |
15 | ## Our Standards
16 |
17 | Examples of behavior that contributes to a positive environment for our
18 | community include:
19 |
20 | * Demonstrating empathy and kindness toward other people
21 | * Being respectful of differing opinions, viewpoints, and experiences
22 | * Giving and gracefully accepting constructive feedback
23 | * Accepting responsibility and apologizing to those affected by our mistakes,
24 | and learning from the experience
25 | * Focusing on what is best not just for us as individuals, but for the
26 | overall community
27 |
28 | Examples of unacceptable behavior include:
29 |
30 | * The use of sexualized language or imagery, and sexual attention or
31 | advances of any kind
32 | * Trolling, insulting or derogatory comments, and personal or political attacks
33 | * Public or private harassment
34 | * Publishing others' private information, such as a physical or email
35 | address, without their explicit permission
36 | * Other conduct which could reasonably be considered inappropriate in a
37 | professional setting
38 |
39 | ## Enforcement Responsibilities
40 |
41 | Community leaders are responsible for clarifying and enforcing our standards of
42 | acceptable behavior and will take appropriate and fair corrective action in
43 | response to any behavior that they deem inappropriate, threatening, offensive,
44 | or harmful.
45 |
46 | Community leaders have the right and responsibility to remove, edit, or reject
47 | comments, commits, code, wiki edits, issues, and other contributions that are
48 | not aligned to this Code of Conduct, and will communicate reasons for moderation
49 | decisions when appropriate.
50 |
51 | ## Scope
52 |
53 | This Code of Conduct applies within all community spaces, and also applies when
54 | an individual is officially representing the community in public spaces.
55 | Examples of representing our community include using an official e-mail address,
56 | posting via an official social media account, or acting as an appointed
57 | representative at an online or offline event.
58 |
59 | ## Enforcement
60 |
61 | Instances of abusive, harassing, or otherwise unacceptable behavior may be
62 | reported to the community leaders responsible for enforcement at
63 | oyepriyansh@hotmail.com.
64 | All complaints will be reviewed and investigated promptly and fairly.
65 |
66 | All community leaders are obligated to respect the privacy and security of the
67 | reporter of any incident.
68 |
69 | ## Enforcement Guidelines
70 |
71 | Community leaders will follow these Community Impact Guidelines in determining
72 | the consequences for any action they deem in violation of this Code of Conduct:
73 |
74 | ### 1. Correction
75 |
76 | **Community Impact**: Use of inappropriate language or other behavior deemed
77 | unprofessional or unwelcome in the community.
78 |
79 | **Consequence**: A private, written warning from community leaders, providing
80 | clarity around the nature of the violation and an explanation of why the
81 | behavior was inappropriate. A public apology may be requested.
82 |
83 | ### 2. Warning
84 |
85 | **Community Impact**: A violation through a single incident or series
86 | of actions.
87 |
88 | **Consequence**: A warning with consequences for continued behavior. No
89 | interaction with the people involved, including unsolicited interaction with
90 | those enforcing the Code of Conduct, for a specified period of time. This
91 | includes avoiding interactions in community spaces as well as external channels
92 | like social media. Violating these terms may lead to a temporary or
93 | permanent ban.
94 |
95 | ### 3. Temporary Ban
96 |
97 | **Community Impact**: A serious violation of community standards, including
98 | sustained inappropriate behavior.
99 |
100 | **Consequence**: A temporary ban from any sort of interaction or public
101 | communication with the community for a specified period of time. No public or
102 | private interaction with the people involved, including unsolicited interaction
103 | with those enforcing the Code of Conduct, is allowed during this period.
104 | Violating these terms may lead to a permanent ban.
105 |
106 | ### 4. Permanent Ban
107 |
108 | **Community Impact**: Demonstrating a pattern of violation of community
109 | standards, including sustained inappropriate behavior, harassment of an
110 | individual, or aggression toward or disparagement of classes of individuals.
111 |
112 | **Consequence**: A permanent ban from any sort of public interaction within
113 | the community.
114 |
115 | ## Attribution
116 |
117 | This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118 | version 2.0, available at
119 | https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
120 |
121 | Community Impact Guidelines were inspired by [Mozilla's code of conduct
122 | enforcement ladder](https://github.com/mozilla/diversity).
123 |
124 | [homepage]: https://www.contributor-covenant.org
125 |
126 | For answers to common questions about this code of conduct, see the FAQ at
127 | https://www.contributor-covenant.org/faq. Translations are available at
128 | https://www.contributor-covenant.org/translations.
129 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # 👨💻 Contributing
2 |
3 |
4 | 1. Forking the Repository
5 | click on that fork button to fork the repository.
6 | [](#-contributing)
7 |
8 |
9 | 2. Clone the repository
10 | ```
11 | git clone https://github.com//DevTweet.git
12 | ```
13 |
14 | 3. Navigate to the repository folder
15 | ```
16 | cd DevTweet
17 | ```
18 |
19 | 4. Add a reference(remote) to the original repository.
20 | ```
21 | git remote add upstream https://github.com/oyepriyansh/DevTweet.git
22 | ```
23 | 5. Now go ahead and create a new branch and move to the branch
24 | ```
25 | git checkout -b newpost
26 | ```
27 |
28 | 6. Install dependencies and run in local
29 | ```
30 | pnpm i
31 | ```
32 | ```
33 | pnpm dev
34 | ```
35 |
36 | > [!NOTE]
37 | > If you don't have pnpm installed in your system then run this command `npm i -g pnpm`
38 |
39 |
40 | 7. Make your changes
41 |
42 |
Creating a post
43 |
44 | Go to `src/content/posts` directory.
45 |
46 | Create a markdown file, for example `hello.md`.
47 |
48 | Now copy the template code from below, and put into your markdown file and replace the placeholder with actual values.
49 |
50 | ```md
51 | ---
52 | layout: ../../layouts/PostLayout.astro
53 | title: The title of the post
54 | excerpt: A short description of the post
55 | author: your-author-username
56 | createdAt: Month Day, Year
57 | ---
58 |
59 | **Post content goes here.**
60 | ```
61 |
62 |
63 | #### Adding an Author
64 |
65 | Go to `src/util/authors.ts` file. just extend the array by adding your author username. Make sure it is in lowercase.
66 |
67 | ```ts
68 | // Before:
69 | export const AUTHORS = ["oyepriyansh",
70 | "william"];
71 |
72 | // After:
73 | export const AUTHORS = ["oyepriyansh",
74 | "william",
75 | "your-author-username"];
76 | ```
77 |
78 | #### Author Image
79 |
80 | You can add an image for yourself by uploading an image to the `/public/authors` directory.
81 | Please make sure to rename the image exact same as your author username in the `src/util/authors.ts` file.
82 |
83 | > **Note**: Capitalization does not matter for the image file, but still make it all lowercase.
84 |
85 |
86 | 8. After done you can now push this changes, for doing that follow the following command in order
87 |
88 | - `git add --all` (will add all the files to staging area)
89 | - `git commit -m ""`
90 | > **Note**: replace the `` with a good commit message, for example if you are adding a new post; the commit message will be **feat: new post by your-name`**.
91 | - `git push origin newpost`
92 |
93 | 9. After this go to your forked GitHub repository. Now you will see a popup saying **Compare & pull request**, click on it and create a pull request.
94 | [](https://github.com/oyepriyansh/DevTweet/pulls)
95 | **Make sure to add a good PR title, example: `feat: new post by your-name`.**
96 |
97 | That’s it! You have successfully contributed to DevTweet. Once the pull request is accepted and merged, your post will be live on DevTweet.
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2023 Priyansh Prajapat
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | > [!NOTE]
2 | > This repository has been archived and no longer maintained
3 |
4 | > [!TIP]
5 | > if you wanna contribute to open source, consider checking out DevProfiles repository
6 | >
7 | >
8 |
9 | ---
10 |
11 |
19 | );
20 | }
21 |
--------------------------------------------------------------------------------
/src/content/posts/Cloud Computing.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: ../../layouts/PostLayout.astro # Always use this layout, it's so the post gets properly styled
3 | title: Cloud Computing 🔥
4 | excerpt: Cloud computing refers to the delivery of computing services (including servers, storage, databases, networking, software, analytics, and more) over the internet to offer faster innovation, flexible resources, and economies of scale...
5 | author: precious
6 | createdAt: October 03, 2023
7 | ---
8 |
9 | # Cloud Computing: A Brief Technical Overview
10 |
11 | ## Introduction
12 |
13 | Cloud computing is a revolutionary technology that enables users to access and utilize computing resources over the internet. Instead of owning physical hardware or managing infrastructure, cloud services are provided by third-party vendors. This concise technical overview will cover key concepts, deployment models, and benefits of cloud computing.
14 |
15 | ## Key Concepts
16 |
17 | ### Service Models
18 |
19 | 1. **IaaS (Infrastructure as a Service):** Provides virtualized computing resources like virtual machines, storage, and networking. Users have control over the operating systems and applications.
20 |
21 | 2. **PaaS (Platform as a Service):** Offers a platform for application development, handling infrastructure and allowing developers to focus solely on coding.
22 |
23 | 3. **SaaS (Software as a Service):** Delivers applications over the internet, eliminating the need for installation and maintenance.
24 |
25 | ### Deployment Models
26 |
27 | 1. **Public Cloud:** Resources are owned and operated by a third-party provider, accessible to the public.
28 |
29 | 2. **Private Cloud:** Exclusive use by a single organization, either hosted internally or by a third-party.
30 |
31 | 3. **Hybrid Cloud:** Combines elements of both public and private clouds, allowing data and applications to be shared.
32 |
33 | 4. **Multi-Cloud:** Leverages services from multiple cloud providers for specific functionalities.
34 |
35 | ### Virtualization and Containerization
36 |
37 | Virtualization creates virtual versions of resources (servers, storage, etc.), allowing multiple virtual machines to run on a single physical machine. Containerization packages applications and their dependencies for consistent deployment across various environments.
38 |
39 | ## Benefits of Cloud Computing
40 |
41 | 1. **Cost Efficiency:** Eliminates the need for large upfront capital expenses on hardware. Users pay only for what they use.
42 |
43 | 2. **Scalability and Flexibility:** Resources can be scaled up or down based on demand, providing flexibility in resource allocation.
44 |
45 | 3. **Accessibility and Mobility:** Accessible from anywhere with an internet connection, promoting remote work and collaboration.
46 |
47 | 4. **Automatic Updates and Maintenance:** Cloud providers handle maintenance, updates, and security patches, reducing the burden on IT teams.
48 |
49 | 5. **Disaster Recovery and Redundancy:** Cloud services often include robust backup and recovery options, ensuring data safety.
50 |
51 | ## Conclusion
52 |
53 | Cloud computing has transformed the way businesses and individuals access and utilize computing resources. Understanding the key concepts, service models, and deployment options is crucial for making informed decisions about adopting cloud technology. With its numerous benefits, cloud computing is a cornerstone of modern IT infrastructure.
54 |
55 |
--------------------------------------------------------------------------------
/src/content/posts/Creating-a-simple-webpage.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: ../../layouts/PostLayout.astro # Always use this layout, it's so the post gets properly styled
3 | title: Creating a Simple Web Page
4 | excerpt: Let's dive into a beginner-friendly tutorial on creating a simple web page
5 | author: maida12
6 | createdAt: October 5, 2023
7 | ---
8 |
9 | Tutorial: Creating a Simple Web Page
10 | 1. Setting Up Your Workspace:
11 |
12 | Open a text editor of your choice. Notepad, Visual Studio Code, or Sublime Text are good options.
13 |
14 | 2. Creating the HTML File:
15 |
16 | Create a new file and save it with a .html extension, for example, index.html. Add the following basic structure:
17 |
18 | html
19 | Copy code
20 |
21 |
22 |
23 |
24 |
25 | Your Page Title
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 | This is the basic structure of an HTML document.
35 |
36 | 3. Adding Content:
37 |
38 | Inside the tag, add some content. For example:
39 |
40 | html
41 | Copy code
42 |
Hello, World!
43 |
This is a simple web page created with HTML and CSS.
44 | 4. Creating the CSS File:
45 |
46 | Create a new file and save it with a .css extension, for example, styles.css. Link this file in your HTML file, as shown in the section.
47 |
48 | 5. Styling with CSS:
49 |
50 | In your styles.css file, you can style the HTML elements. For example:
51 |
52 | css
53 | Copy code
54 | body {
55 | font-family: 'Arial', sans-serif;
56 | background-color: #f4f4f4;
57 | margin: 0;
58 | padding: 0;
59 | }
60 |
61 | h1 {
62 | color: #333;
63 | }
64 |
65 | p {
66 | color: #666;
67 | }
68 | Feel free to experiment with different styles and properties.
69 |
70 | 6. Preview Your Web Page:
71 |
72 | Open your HTML file in a web browser to see your page. Right-click on the file and choose "Open with" and select your preferred browser.
73 |
74 | Congratulations! You've just created a simple web page using HTML and CSS. This is just the beginning, and you can explore more advanced topics like JavaScript for interactivity, responsive design, and more as you progress in your web development journey.
--------------------------------------------------------------------------------
/src/content/posts/Discord bot.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: ../../layouts/PostLayout.astro # Always use this layout, it's so the post gets properly styled
3 | title: How to code a discord bot?
4 | excerpt: In this post you will learn how to code your discord bot to reply with `pong` when an user types `ping` with discord.js
5 | author: Zemerik
6 | createdAt: October 24, 2023
7 | ---
8 |
9 | # How to Code a Discord bot?
10 |
11 | ## 👍Prerequisites:
12 |
13 | Coding a discord bot might interest you and sound fun, there are some prerequisites to it. In order to code a discord bot with discord.js, you require a fairly decent grasp
14 | of JavaScript itself. Although, it is possible to code a discord bot with no or very little information about JavaScript, doing so may result in you taking unnecessary time to
15 | solve basic errors in your code and end up frustrated.
16 |
17 | So it is highly suggested, you learn some JavaScript basics before moving ahead.
18 |
19 | ## 💻STEP 1 - Setting up your workspace:
20 |
21 | ### Note:
22 | If you are using app/website like Replit or Glitch, you can simply skip this step and move on to step 2.
23 |
24 | ### Creating your package.json file
25 | - Head over to the terminal of your project or open the folder in which you are going to store your files into command prompt. After that type, `npm init` in your terminal and the
26 | following should come up.
27 | ```
28 | This utility will walk you through creating a package.json file.
29 | It only covers the most common items, and tries to guess sensible defaults.
30 |
31 | See `npm help init` for definitive documentation on these fields
32 | and exactly what they do.
33 |
34 | Use `npm install ` afterwards to install a package and
35 | save it as a dependency in the package.json file.
36 |
37 | Press ^C at any time to quit.
38 | package name: (The name of your folder)
39 | ```
40 |
41 | - Right now the computer is asking you to enter the name of your package, which can be anything you want just as "my first discord bot", "I love bots", etc. If you press enter on
42 | your keyboard, the package name will automatically be named whatever is written in the brackets.
43 |
44 | - After you have typed your package name or if you want your package name the same as default, press enter on your keyboard.
45 |
46 | - You should now be prompted to enter the version you want, by default it will be `1.0.0` if you do not enter anything. There is no need for you to enter the version or
47 | description. The description will be blank by default.
48 |
49 | - When you get to the entry point, you can enter anyname you want as long as it ends with .js. The entry point is the main file of your project. You can call it whatever you like
50 | as long as it ends with .js. If you leave it blank, the main entry point will be automatically be index.js.
51 |
52 | - You can skip all of the rest inputs and leave them to default as you are just starting out.
53 |
54 | The last option you will get is,
55 | ```
56 | Is this OK? (yes)
57 | ```
58 |
59 | - When this comes up, simply press enter and the process should be complete. A `package.json` file should automatically be created in your folder and it will contain all the data
60 | such as your package name and entry point.
61 |
62 | - Now create a new file the same place where the `package.json` has been created and name it the name of your entry point. If you did not change the default, then your main entry point will be `index.js`.
63 |
64 | ## 😃Step 2 - Add the Code:
65 |
66 | - Copy Paste the following code in your entry point,
67 |
68 | ```js
69 | const express = require('express')
70 | const Discord = require('discord.js')
71 | const app = express();
72 |
73 | app.listen(3000, () => {
74 | console.log("Project is running!");
75 | })
76 |
77 | const client = new Discord.Client({ intents: 32767 })
78 |
79 | client.on('messageCreate', async (message) => {
80 | if (message.content === "ping") {
81 | message.channel.send('pong')
82 | }
83 | })
84 |
85 | client.login('YOUR BOT TOKEN HERE')
86 | ```
87 |
88 | - Remember to replace **YOUR BOT TOKEN HERE** with the actual token of your bot which can be obtained from [the developer portal](https://discord.com/developers/applications)
89 |
90 | ## 🥇Step 3 - Running your project
91 |
92 | - You are now ready to run your project. As soon as your run your project, your discord bot should appear online and send `pong` whenever someone types `ping`.
93 |
94 | ##
95 |
96 |
Thats all for this project. Hope you had fun while coding your discord bot and found this post helpful.
97 |
Thanks for visiting
98 |
--------------------------------------------------------------------------------
/src/content/posts/Git.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: ../../layouts/PostLayout.astro
3 | title: Deep understanding of git essentials
4 | excerpt: Git commands and version controls
5 | author: Rahmaaaan
6 | createdAt: Jan 13, 2024
7 | ---
8 |
9 | # Deep understanding of git essentials
10 |
11 | ## What is Git?
12 |
13 | Git is a distributed version control system designed for tracking changes in source code during software development. Unlike centralized version control systems, Git operates as a distributed system, allowing every developer to have a complete copy of the repository on their local machine. This decentralization enables offline work and collaboration without constant reliance on a central server.
14 |
15 | ## Getting Started with Git
16 |
17 | ### Installation Guide
18 |
19 | - **Linux:**
20 | Use the package manager (apt, yum, etc.) to install Git.
21 |
22 | - **Mac OS X:**
23 | Git can be installed through Homebrew, MacPorts, or by downloading the installer from the [official Git website](https://git-scm.com/).
24 |
25 | - **Windows:**
26 | Download the installer from the [Git website](https://git-scm.com/) and follow the installation wizard.
27 |
28 | ### Configuration
29 |
30 | Once Git is installed, configure user credentials:
31 |
32 | ```bash
33 | # Open a terminal or command prompt
34 | git config --global user.name "Your Name"
35 | git config --global user.email "your_email@example.com"
36 | ```
37 |
38 | To list all configurations set in Git:
39 |
40 | ```bash
41 | git config --list
42 | ```
43 |
44 | ## Git Commands
45 |
46 | ### Repository Initialization and Cloning
47 |
48 | #### Initializing a Repository
49 |
50 | Initialize a new Git repository:
51 |
52 | ```bash
53 | git init
54 | ```
55 |
56 | This creates a hidden `.git` folder containing version control information.
57 |
58 | #### Cloning a Repository
59 |
60 | Clone an existing repository:
61 |
62 | ```bash
63 | git clone
64 | ```
65 |
66 | This copies the entire repository history and files to the local machine.
67 |
68 | ### Staging Changes
69 |
70 | #### Adding a particular file
71 |
72 | Add specific file changes to the staging area:
73 |
74 | ```bash
75 | git add
76 | ```
77 |
78 | #### Adding all the files
79 |
80 | ```bash
81 | git add .
82 | ```
83 |
84 | Stages all modifications and additions within the current directory.
85 |
86 | ```bash
87 | git add --all
88 | ```
89 |
90 | Stages all modifications, additions, and deletions across the entire project.
91 |
92 | ### Reviewing
93 |
94 | #### Checking Status
95 |
96 | Use `git status` to check the current state of the repository.
97 |
98 | #### Viewing Differences
99 |
100 | ```bash
101 | git diff
102 | ```
103 |
104 | Showcases disparities between the current state and the last commit.
105 |
106 | ```bash
107 | git diff --staged
108 | ```
109 |
110 | Spotlights alterations currently staged for the next commit.
111 |
112 | ### Committing Changes
113 |
114 | ```bash
115 | git commit -m "Commit message"
116 | ```
117 |
118 | Records changes staged in the commit with a descriptive message.
119 |
120 | ```bash
121 | git commit -am "Commit message"
122 | ```
123 |
124 | Combines "add" and "commit" actions, staging all modified files and immediately committing them with a message.
125 |
126 | ### Inspecting Commits
127 |
128 | #### Viewing Commit History
129 |
130 | ```bash
131 | git log
132 | ```
133 |
134 | Presents a chronological history of commits with essential details.
135 |
136 | ```bash
137 | git log --oneline
138 | ```
139 |
140 | Provides a condensed log with abbreviated commit hashes alongside commit messages.
141 |
142 | #### Inspecting Specific Commits
143 |
144 | ```bash
145 | git show
146 | ```
147 |
148 | Displays detailed information about a specific commit.
149 |
150 | ### Undoing Changes
151 |
152 | #### Unstaging changes
153 |
154 | ```bash
155 | git reset
156 | ```
157 |
158 | Removes specific files from the staging area while retaining changes in the working directory.
159 |
160 | #### Resetting changes
161 |
162 | ```bash
163 | git reset --hard HEAD
164 | ```
165 |
166 | Resets both the staging area and the working directory to match the state of the last commit (HEAD).
167 |
168 | #### Reverting commits
169 |
170 | ```bash
171 | git revert
172 | ```
173 |
174 | Creates a new commit that effectively undoes the changes introduced by a particular commit.
175 |
176 | ## Branching and Merging in Git
177 |
178 | ### Creating and Switching Branches
179 |
180 | ```bash
181 | git branch
182 | ```
183 |
184 | Lists all branches with an asterisk denoting the current active branch.
185 |
186 | ```bash
187 | git branch
188 | ```
189 |
190 | Creates a new branch starting from the current commit.
191 |
192 | ```bash
193 | git checkout
194 | ```
195 |
196 | Switches the working directory to the specified branch.
197 |
198 | ### Merging Changes
199 |
200 | ```bash
201 | git merge
202 | ```
203 |
204 | Integrates changes from a specified branch into the current branch.
205 |
206 | ## Remote Repositories
207 |
208 | A remote repository is a version of your project hosted on a different location or server.
209 |
210 | ```bash
211 | git remote add origin
212 | ```
213 |
214 | Links the local repository to a remote repository identified by the name "origin" and the specified URL.
215 |
216 | ```bash
217 | git remote -v
218 | ```
219 |
220 | Lists all remote repositories associated with the local repository.
221 |
222 | ```bash
223 | git pull
224 | ```
225 |
226 | Fetches changes from a remote repository and merges them into the current branch.
227 |
228 | ```bash
229 | git push
230 | ```
231 |
232 | Pushes committed changes from the local repository to the specified remote repository and branch.
233 |
234 | ## Miscellaneous
235 |
236 | - `.gitignore` file specifies files and directories to be excluded by Git from tracking or being committed.
237 |
238 | ```bash
239 | git rm
240 | ```
241 |
242 | Removes a file from the repository and stages its deletion for the subsequent commit.
243 |
244 | ```bash
245 | git clean -df
246 | ```
247 |
248 | Clears out untracked files and directories from the working directory.
249 |
250 | This comprehensive guide provides developers with a strong foundation in Git, facilitating efficient collaboration, precise version control, and streamlined project management. Mastering these essentials unlocks Git’s potential, propelling software development toward greater efficiency and collaboration.
251 |
--------------------------------------------------------------------------------
/src/content/posts/How-to-Contribute-to-Open-Source-Projects–A-Beginner-Guide.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: ../../layouts/PostLayout.astro # Always use this layout, it's so the post gets properly styled
3 | title: How to Contribute to Open Source Projects – A Beginner's Guide
4 | excerpt: As we continue to advance technologically....
5 | author: ikshwaku03
6 | createdAt: October 3, 2023
7 | ---
8 |
9 | ### As we continue to advance technologically, more and more products and services are being transformed into software ready services. And many of them are being made open-source.
10 |
11 | Most developers and companies depend on open-source tools and software to make their products work. And I think you'll agree with me that the number of contributions to open-source have really grown lately – not just for solo developers but from companies also.
12 |
13 | My first ever contributions to the open-source community was during the yearly Hacktoberfest event in _2023_. As a beginner I participated in beginner friendly projects which I will be sharing later to help you out too.
14 |
15 | Now, if you are reading this article it's because you want to be part of the great open-source community – but maybe you don’t know where to get started? Well, you are in the right place.
16 |
17 | In this guide we will cover:
18 |
19 | - What exactly is open source?
20 | - How can you get started contributing?
21 | - What should you expect?
22 |
23 | Well, in this article we will cover all this and more.
24 |
25 | Let's get started!
26 |
27 | ## What is Open Source?
28 |
29 | ---
30 |
31 | In simple words, we can describe an open source project as source code that is made available to the public to view, use, modify, and distribute under a permissive license.
32 |
33 | As an example to explain this, let's use a classroom scenario. A teacher can share a document on a platform like Google Docs. On this platform students can edit the document and even make copies of their own. But whenever they make edits they have to be approved by the teacher before reflecting on the document again.
34 |
35 | That's how open source code works: once it's been made public, and you need to add a feature or make changes, the owner has to approve the added changes and publish them for others to see.
36 |
37 | Most successful open-source projects are a result of contributions from people with all skill levels – and not only coding skills, but also other skills like writing, languages, and so on.
38 |
39 | Any time someone fixes a typo, adds an alert about a possible compiler warning, fixes a bug, or even adds detailed documentation to a project, progress is made. If we take all these small contributions from different people with different skills and put them together, great things can happen.
40 |
41 | Just as Vincent van Gogh said:
42 |
43 | > Great things are done by a series of small things brought together.
44 |
45 | ## Why you Should Contribute to Open-Source
46 |
47 | ---
48 |
49 | Contributing to open source projects can be a rewarding way to learn, teach, share, and build experience.
50 |
51 | There are plenty of reasons why you should contribute to an open source project, such as:
52 |
53 | - To improve the software you rely on daily.
54 | - To find a mentor if you need one.
55 | - To learn new skills or improve on existing ones.
56 | - To share your skills.
57 | - To gain a much deeper knowledge about the software you're using.
58 | - To build up your reputation and help grow your career.
59 | - Plus, it's fun and gives you personal satisfaction and hey, you never know who is watching, maybe it's your next employer or partner 🙂.
60 |
61 | ## Step by Step Guide on How to Contribute to Open Source
62 |
63 | When we say contributing to open-source, it does not necesarilly mean that you need to know how to code. There are different ways in which you can contribute even if you are a non-coder – but having some coding skills will help you (and the projects) out a lot.
64 |
65 | Some common contributions can be through:
66 |
67 | - Adding a description to a project's documentation to elaborate on a certain point, mostly referred to as a README file (_check this guide on how to write a_ [Good README file](https://www.freecodecamp.org/news/how-to-write-a-good-readme-file/)).
68 | - Giving guidance on a specific project and how to use it.
69 | - Adding sample output to show how the code works.
70 | - Writing in-depth tutorials for the project.
71 | - Adding translation for a project - A good place to start with this might be with the [freeCodeCamp's translation program](https://contribute.freecodecamp.org/#/index?id=translations).
72 | - Answering questions about a project (like on Stack Overflow or Reddit)
73 | - You can offer to mentor another contributor.
74 | - You can fix typos and arrange the project's work folder correctly.
75 |
76 | All these ways, and many more, count towards contributions. Now what exactly should you know before you start contributing to an OS project?
77 |
78 | ## What to Know Before Contributing to an OS Project
79 |
80 | ---
81 |
82 | Just as we expect each open-source products to be different, so are the communities. Each community has it's own rules and will have different guidelines and roles, and if you are lucky some also do give rewards after you contribute.
83 |
84 | But despite all this, there are some common features which apply across all OS projects, and that's what we are going to talk about:
85 |
86 | ### Roles in a typical OS Project
87 |
88 | In a typical OS project we will have the following people:
89 |
90 | - **Author** - This is the person who created the project. They have the power to assign new roles to other members to help with the project's maintenance.
91 | - **Owner** - The owner has administrative ownership of the project (and can be the same person as the author)
92 | - **Maintainers** - These people are responsible for driving the vision and goals of the project. They're usually people who feel responsible for the direction of the project and who are committed to improving it.
93 | - **Contributors** - Contributors add to the project in one way or another. They follow the same code review process, are subject to the same requirements on code style, and so on.
94 | - **Community Members/Users** - These valuable members of the community can provide feedback about features, bug reports, and more.
95 |
96 | ## Must have elements in all OS projects
97 |
98 | When talking about an OS project, they are categorized in several ways depending on structure, type of product platform, programming language used, whether it's sponsored or fully independent, and more.
99 |
100 | All this info should be outlined with the help of the guidelines and information:
101 |
102 | - **License**
103 | If a project does not have an open-source license, then it is not open source. The license helps protect contributors and users. Businesses and savvy developers usually won't touch a project without this protection. If you're wondering how to get one and choose the correct one for your project, check out the official OS license website: [https://choosealicense.com/](https://choosealicense.com/).
104 | - **README file**
105 | This is a manual that explains how to get started with a project. It lists the requirements for contributing to the project, the steps to take to contribute to the project etc... A good README should contain everything a potential contributor would want to know about the project. If you already have a project and you're trying to write a good README file, this guide will come in handy: [_How to write a good README file_](https://www.freecodecamp.org/news/how-to-write-a-good-readme-file/).
106 | - **Contribution Guidelines**
107 | These are guidelines that help people who contribute to the project know exactly what is expected from them. And even though it's not mandatory is always a good practice to add one. If you need help writing one or understanding what it entails, the official OS website has a template guide to help you out: [Contributor guidelines template](https://opensource.com/life/16/3/contributor-guidelines-template-and-tips)
108 | - **Code of Conduct**
109 | A code of conduct is a document that establishes your expectations for how your contributors and participants behave. Adopting and enforcing a code of conduct can help create a positive and welcoming environment for your community. The OS guide explains more on what it entails: [https://opensource.guide/code-of-conduct/](https://opensource.guide/code-of-conduct/).
110 |
111 | As an individual or an organization running an Open-Source project, it's all about creating a community where people can grow together. This means that you will have to develop a friendly environment where people will get to share ideas, work on challenges, and even have random chats at some time.
112 |
113 | There are some go-to options here, and you can use tools like:
114 |
115 | - **Issue Tracker**
116 | This is where you keep track of your work on GitHub, and how development happens. In case there's any problem a contributor can create an issue and link it to a pull request and fellow contributors can opt in to try and fix it. Then after it's fixed it's closed.
117 | - **Pull Requests**
118 | They let you tell others about changes you've pushed to a branch in a repository on GitHub. Once a pull request is opened, you can discuss and review the potential changes with the collaborator and add follow-up commits before the're merged into the base branch.
119 | - **Chat Channel**
120 | Although it's not mandatory, you can consider it a good practice to be part of an OS community channel. It is specifically meant for people to share their ideas and have conversations. Some of the most common media for this purpose include Slack and Discord.
121 |
122 | So, now you have an idea of what an OS project is and what to expect when you contribute to one. Moving into the most important part, how do you know which project to contribute to?
123 |
124 | ## How to find an Open Source Project to Contribute to
125 |
126 | Contributing works on all levels, there is no need to over think how you're gonna do it. Instead think of some of the projects you already use and how you can make a change to them or improve on them.
127 |
128 | Research has shown that around 30% of casual contributions are documentation, typo fixes, or even translations.
129 |
130 | At the begining I promised to share some of the projects that helped me out when I made my first contribution. Well lucky you, if you are a first-time contributor – which everybody is at some point – here are some links that will get you started in the open source world:
131 |
132 | - [first-timers only](https://www.firsttimersonly.com/)
133 | - [first contribution](https://github.com/firstcontributions/first-contributions)
134 | - [contributor ninja](https://contributor.ninja/)
135 | - [open-source friday](https://opensourcefriday.com/)
136 | - [24 pull requests](https://24pullrequests.com/)
137 | - [python project scripts](https://github.com/larymak/Python-project-Scripts)
138 | - [hebatica](https://habitica.com/static/front)
139 | - [code triage](https://www.codetriage.com/)
140 |
141 | _**Quick hack for you** In the world of open-source software, issues get reported and fixed pretty quickly. So, a good way to kick start is to take on an issue and be sure to try to work on it promptly._
142 |
143 | ## How to choose an Open-Source Project
144 |
145 | After you have found the project you want to contribute to, it's time to do a little vetting. Make sure it meets the following criteria so you know it'll be a good project to work on:
146 |
147 | 1. Check out if it has a license file.
148 | 2. Check when the last commit was made. This will help you know if the maintainers are active and also give you an estimate on how long it will take to respond to your contribution.
149 | 3. Look for the number of contributors.
150 | 4. Check how often people make commits.
151 |
152 | If you see lots of recent activity that's a good sign – it means the community is active and so are the maintainers.
153 |
154 | Now, if the first "vetting" checks out, proceed to checking the following points too:
155 |
156 | 1. Does it have any open issues? If yes this might be a good sign, you will have a place to begin.
157 | 2. How long does it take for maintainers to respond? This will be determined by how often issues are closed and PRs merged.
158 | 3. Is there an active discussion on an issue?
159 | 4. Are the issues getting closed regularly?
160 | 5. How many open pull requests are there?
161 | 6. How recently was the latest pull requests merged?
162 | 7. Do the maintainers thank people for contributing?
163 |
164 | If this final vetting process checks out, then you are good to go and start your contribution.
165 |
166 | ## What to Consider Before You Go Open Source
167 |
168 | I know you are excited and ready to rock the OS world, but do you know what to look for in a project?
169 |
170 | As mentioned above, there are different ways in which you can contribute. But before you make your first contribution it's good to note a few things about the project you will be choosing, like:
171 |
172 | - **What programming language does the project use?**
173 | The most fundamental technology behind any application is the programming language it uses. Some of the most popular languages on GitHub are JavaScript, Python, Java, Ruby, and PHP – but there are many more.
174 | There is a multitude of projects that might suit your skills and interests. So just find one that you'd feel comfortable working on.
175 | - **Type of project**
176 | After you've chosen the language you want to work with, you will also need to choose the type of project you prefer. Just have a look around and pick a project or a topic that interests you.
177 |
178 | Once you've found a project, you'll want to actually make contributions. And you'll do that by submitting pull requests. Let's talk about that now.
179 |
180 | ## What is a Pull Request?
181 |
182 | Remember the example about Goggle Docs? Well, a pull request is similar only this time it's about code.
183 |
184 | We can describe a pull request as when a contributor submits changes – wether it's code, documentation, or elsewhere – and asks a maintainer to check it out, make sure it's fine, and then merge it to the base project.
185 |
186 | So, how do you submit one?
187 |
188 | ## How to Submit a Pull Request
189 |
190 | If you are at this stage, it means you have found a project and you are ready to make your contribution. So let's talk about how to actually submit a pull request.
191 |
192 | ### Steps to Submit a PR
193 |
194 | - **Fork the repository**
195 | At the top right corner, you will see the term "fork". All you need to do is click it and you will have created a copy of the same project in your account.
196 |
197 | 
198 |
199 | After this operation the URL of the project will change to:
200 |
201 | https://github.com//projectname
202 |
203 | - **Clone the project into your local machine**
204 | In order for you to perform this step, you must have Git installed locally in your machine. If you don't, refer to the official [Git docs](https://git-scm.com/) on how to get started.
205 |
206 | Copy the forked project URL, and proceed to your local machine where you will open git bash, and proceed with the command below:
207 |
208 | git clone https://github.com//
209 |
210 | This will create a copy of the project on your local machine. Now that you have cloned the repo we will need to do two things:
211 |
212 | First is to make the necessary changes/contribution and commit those changes. After making your changes and adding new files, its time to add those changes into a separate branch before pushing them to remote.
213 |
214 | But, first let's create a branch. In your git bash, change the path to pint to your repository directory. To do that use this command:
215 |
216 | cd project folder name
217 |
218 | Now, to create a branch we will use the command: `git checkout`
219 |
220 | git checkout -b your-new-branch-name
221 |
222 | Here's an example:
223 |
224 | git checkout -b lary-mak
225 |
226 | It's time to add the new changes into the branch we created. In order to see all the changes you made, we will use the `git status` command:
227 |
228 | git status
229 |
230 | The command will list all the changes you made. To add them we will use `git add *`, which will add all the files to our branch.
231 |
232 | git add *
233 |
234 | Let's add a commit message, briefly explaining what we added:
235 |
236 | git commit -m ""
237 |
238 | - **Push changes to remote**
239 | Now that everything is set, it's time to let our maintainer know what we have added. That is made possible by pushing the changes with this command:
240 |
241 | git push origin
242 |
243 | replacing `` with the name of the branch you created earlier, in my case it will be `git push origin larykmak`.
244 |
245 | - **Submit changes**
246 | If you go to your repository on GitHub and refresh the page, you'll see a Compare and pull request button. Click on that button.
247 |
248 | Soon the maintainer will merge all your changes into the master branch of this project (unless they need changes from you). You will get a notification email once the changes have been merged.
249 |
250 | Creating a pull request has some advantages, like:
251 |
252 | - It allows you to contribute to another repo without needing administrative privileges to make changes to the repo.
253 | - It allows others to review your changes and suggest corrections, additions, edits, and so on.
254 | - It gives repo administrators control over what gets added to their project repo.
255 |
256 | Congratulations 🥳🎉,
257 | You just completed the standard fork -> clone -> edit -> pull request work-flow which sums up to your first contribution. You'll use this often as a contributor! So, what next?
258 |
259 | ## What next after your First Pull Request?
260 |
261 | That does not mark the end! Now, just find more projects and keep contributing. Also be sure to be on the lookout for the one month dedicated to open-source contributions every year that's run by _Digital Ocean_ for a chance to win some amazing gifts.
262 |
263 | One more thing to talk about a bit more before we end. That is, why contributing to OS is rewarding.
264 |
265 | ## Benefits of Contributing to Open Source
266 |
267 | - People that contribute to an open-source project get to know the technology at a much deeper level than they would by simply using the technology.
268 | - You can focus your efforts on adding and leveraging features that will benefit businesses based on experience with what works and doesn't work in the real world.
269 | - It builds your morale and reputation. People who contribute to open source projects have access to other community members' insights and experience.
270 | - Contributing to open source provides a clear view into the future of a project
271 | - If you're on GitHub, a large portion of the things you do on that platform are public. Use this to your advantage by always doing your best when contributing and communicating with fellow contributors.
272 |
273 | ## Why You Should Contribute to Open Source as a Developer
274 |
275 | - It will help sharpen your skills of coding and improvement into writing clean code.
276 | - It helps the community and your peers get to know you. This recognition can bring you a lot of opportunities in your career.
277 | - It helps you learn more about project management, and it could leave you inspired to start your own project.
278 |
279 | ## Wrap Up!
280 |
281 | As I mentioned, open source is open for every one to participate. There are a lot of opportunities you can take advantage of and learn something new. All you need is to decide to begin and get started.
282 |
283 | **OPEN-SOURCE IS WAITING FOR YOU**
284 |
285 | If you have read this far, I really appreciate it.
286 |
--------------------------------------------------------------------------------
/src/content/posts/Intro.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: ../../layouts/PostLayout.astro
3 | title: 💻 Let's Connect Folks
4 | excerpt: My 1st post on DevTweet! 🥳🚀
5 | author: YashkShrivas4491
6 | createdAt: Oct 5, 2023
7 | ---
8 |
9 | 👋🏻 Hi 👨💻 Coder's,
10 | I'm Yash, just exploring open-source software while learning and implementing it.
11 |
12 | Follow me on GitHub: https://github.com/YashkShrivas4491
13 |
--------------------------------------------------------------------------------
/src/content/posts/Jr-Motivation.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: ../../layouts/PostLayout.astro # Always use this layout, it's so the post gets properly styled
3 | title: Junior Dev Motivation
4 | excerpt: Jr Dev Motivation
5 | author: richardhartleydev
6 | createdAt: October 4, 2023
7 | ---
8 |
9 | Staying motivated in a self-taught coding journey can be challenging, but it's also incredibly rewarding. As a junior software developer who's been through this journey, I've found a few strategies that have helped me keep my enthusiasm and determination alive. First and foremost, it's essential to set clear goals for yourself. Whether it's building a specific project, mastering a particular programming language, or landing your dream job, having a tangible objective can give you a sense of purpose and direction. Break these goals into smaller, manageable tasks to make progress feel more achievable.
10 |
11 | Another tip that has been invaluable for me is finding a supportive community. Online forums, coding bootcamps, and social media groups dedicated to programming can connect you with like-minded individuals who can offer guidance and encouragement. Engaging with a community not only helps you stay motivated but also allows you to learn from others' experiences and collaborate on projects. Moreover, don't be afraid to celebrate your successes, no matter how small they may seem. Acknowledging your achievements along the way can boost your confidence and keep your motivation levels high.
12 |
13 | Lastly, maintaining a healthy work-life balance is crucial. Burnout is a real risk in the world of self-taught coding, so make sure to take breaks, exercise, and pursue other interests outside of coding. Remember that learning to code is a journey, not a race, so be patient with yourself and embrace the occasional setbacks as opportunities to learn and grow. By following these tips and staying committed to your coding journey, you can stay motivated and achieve your goals as a self-taught developer.
14 |
15 | Follow me on twitter @richardh_dev
16 |
--------------------------------------------------------------------------------
/src/content/posts/create_spring_boot_application.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: ../../layouts/PostLayout.astro # Always use this layout, it's so the post gets properly styled
3 | title: How to create a Spring Boot application
4 | excerpt: According to the official Spring Boot website...
5 | author: siddharth1006
6 | createdAt: October 8th, 2023
7 | ---
8 |
9 |
10 |
11 | **According to the official** *[Spring Boot](https://spring.io/projects/spring-boot)* **website,**
12 |
13 | _Spring Boot is a software that makes it easy to create stand-alone, production-grade Spring based Applications that you can "just run"._
14 |
15 | We take an opinionated view of the Spring platform and third-party libraries so you can get started with minimum fuss.
16 |
17 | ## Creating Your First Spring Boot Application
18 |
19 | In this tutorial, we'll guide you through the process of creating your first Spring Boot application.
20 |
21 | ## Prerequisites
22 |
23 | Before we begin, make sure you have the following:
24 |
25 | - Java Development Kit (JDK) installed on your system.
26 | - A code editor (e.g., IntelliJ IDEA, Eclipse, Visual Studio Code, etc.).
27 | - Basic understanding of Java and Spring framework.
28 |
29 | ## Step 1: Set Up a New Spring Boot Project
30 |
31 | 1. Open your preferred Integrated Development Environment (IDE).
32 | 2. Create a new Spring Boot project.
33 | - You can use Spring Initializer (https://start.spring.io/) or your IDE's built-in Spring Boot project creation tool as follows:
34 | - Select the dependencies you need (e.g., Spring Web, Spring Boot DevTools, etc.).
35 |
36 | ## Step 2: Create a Spring Boot Application Class
37 |
38 | 1. Create a new Java class (e.g., `MyApplication`) in the `src/main/java/com/example/demo` directory.
39 | 2. Add the `@SpringBootApplication` annotation at the top of your class.
40 | ```java
41 | @SpringBootApplication
42 | public class MyApplication {
43 | public static void main(String[] args) {
44 | SpringApplication.run(MyApplication.class, args);
45 | }
46 | }
47 |
48 | ## Step 3: Create a Simple Controller
49 |
50 | 1. Create a new Java class (e.g., ```HelloController```) in the ```src/main/java/com/example/demo``` directory.
51 | 2. Add the ```@RestController``` and ```@RequestMapping``` annotations.
52 | ```java
53 | @RestController
54 | public class HelloController {
55 | @RequestMapping("/")
56 | public String hello() {
57 | return "Hello, World!";
58 | }
59 | }
60 |
61 | ## Step 4: Run Your Spring Boot Application
62 |
63 | 1. **Right-click** on the MyApplication class and select "Run MyApplication".
64 | 2. Alternatively, you can run the *application from the command line* using Maven:
65 | ```mvn spring-boot:run```
66 |
67 | ## Step 5: Access Your Application
68 | Open a web browser and go to http://localhost:8080. You should see the message "Hello, World!".
69 |
70 |
--------------------------------------------------------------------------------
/src/content/posts/future-of-data-science.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: ../../layouts/PostLayout.astro # Always use this layout, it's so the post gets properly styled
3 | title: Future of Data Science
4 | excerpt: A short tweet discussing the future of data science
5 | author: Azeen3003
6 | createdAt: October 4, 2023
7 | ---
8 |
9 |
10 | 🔮 The future of #DataScience is incredibly bright! 🌟 As technology advances, we'll see even more powerful AI, deeper insights, and innovative applications. From healthcare to finance, data-driven decisions will reshape industries. Exciting times ahead! 🚀📈 #AI #FutureTech
11 |
--------------------------------------------------------------------------------
/src/content/posts/hello-developers.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: ../../layouts/PostLayout.astro # Always use this layout, it's so the post gets properly styled
3 | title: 👋Hello Developers,
4 | excerpt: My First Post on DevTweet
5 | author: Zemerik
6 | createdAt: October 23, 2023
7 | ---
8 |
9 | # 👋Hello,
10 |
11 | I am Hemang, a young and passionate developer based in Australia. I contain the abilites to turn ideas into reality with my elegant lines of code.
12 |
13 | Github: https://github.com/Zemerik
14 |
--------------------------------------------------------------------------------
/src/content/posts/hello.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: ../../layouts/PostLayout.astro
3 | title: Greetings for everyone
4 | excerpt: A simple file for greeting others and networking
5 | author: Divya4879
6 | createdAt: Oct 04, 2023
7 | ---
8 |
9 | **Post content goes here.**
10 |
--------------------------------------------------------------------------------
/src/content/posts/how-does-the-virtual-dom-work.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: ../../layouts/PostLayout.astro # Always use this layout, it's so the post gets properly styled
3 | title: How does the virtual DOM work in React?
4 | excerpt: The React Virtual DOM is a crucial concept that enhances...
5 | author: ravisolanki27
6 | createdAt: August 25, 2023
7 | ---
8 |
9 | The React Virtual DOM is a crucial concept that enhances the performance of React applications by efficiently updating the actual DOM (Document Object Model) when the state of the application changes. It acts as an abstraction layer between the application's logic and the browser's rendering engine. Here's how it works:
10 |
11 | 1. **Initial Render:**
12 | When you create a React component and render it to the DOM, React generates a virtual representation of the component's structure, also known as the Virtual DOM. This Virtual DOM is a lightweight copy of the actual DOM and contains elements and their properties.
13 |
14 | 2. **State and Props Changes:**
15 | When the state or props of a component change due to user interactions or other events, React re-renders the component and generates a new Virtual DOM representation.
16 |
17 | 3. **Reconciliation:**
18 | React then performs a process called "reconciliation" to compare the new Virtual DOM with the previous one. It efficiently identifies the differences (diffing) between the two representations.
19 |
20 | 4. **Generating Updates:**
21 | Based on the differences detected during reconciliation, React creates a minimal set of updates that need to be applied to the actual DOM to reflect the changes. This set of updates is optimized for performance.
22 |
23 | 5. **Batching Updates:**
24 | React batches multiple updates together to minimize the number of actual DOM manipulations. This batching reduces the performance overhead associated with interacting with the DOM.
25 |
26 | 6. **Updating the Actual DOM:**
27 | Once React has the set of updates ready, it applies them to the actual DOM using a process known as "reconciliation" or "diffing" algorithm. Only the parts of the DOM that need to be changed are modified, which results in efficient updates and improved performance.
28 |
29 | 7. **Efficiency Gains:**
30 | The Virtual DOM allows React to avoid unnecessary direct manipulation of the actual DOM for every state change. By performing updates in memory first and then optimizing the application of changes to the actual DOM, React minimizes the browser's reflow and repaint operations, leading to a smoother user experience.
31 |
32 | 8. **Optimizations:**
33 | React also implements various optimization techniques, such as using keys to uniquely identify elements in collections, to enhance the efficiency of the reconciliation process and minimize unnecessary updates.
34 |
35 | In summary, the React Virtual DOM works by maintaining a lightweight copy of the actual DOM in memory. When there are changes in the application's state or props, React calculates the minimal updates required to sync the Virtual DOM with the actual DOM. This process reduces the performance overhead associated with direct manipulation of the DOM, leading to faster and more efficient rendering in React applications.
36 |
37 | If you found this post helpful then consider following me on GitHub by [clicking here](https://github.com/RaviSolanki27).
38 |
--------------------------------------------------------------------------------
/src/content/posts/how-javascript-works.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: ../../layouts/PostLayout.astro # Always use this layout, it's so the post gets properly styled
3 | title: How does JavaScript work?
4 | excerpt: In this post we will learn about how JavaScript works.
5 | author: abrarlala
6 | createdAt: July 20, 2023
7 | ---
8 |
9 | # This is how JavaScript works
10 |
11 | JavaScript is a versatile programming language commonly used for building interactive and dynamic web applications. It is primarily designed to be run in web browsers but can also be used on the server-side (e.g., with Node.js). Here's a high-level overview of how JavaScript works:
12 |
13 | 1. **Interpreted Language**: JavaScript is an interpreted language, meaning it is executed line-by-line rather than being compiled into machine code like languages such as C++ or Java.
14 |
15 | 2. **Client-Side Execution**: When JavaScript is used in web development, it is mainly executed on the client-side, i.e., in the web browser of the user. Web browsers have built-in JavaScript engines that interpret and execute the code.
16 |
17 | 3. **Embedding JavaScript**: JavaScript code can be embedded directly into HTML documents using `
48 |
49 |
50 |
--------------------------------------------------------------------------------
/src/layouts/PostLayout.astro:
--------------------------------------------------------------------------------
1 | ---
2 | import type { z } from "astro:content";
3 | import type { postSchema } from "../content/config";
4 | import Header from "../components/Header.astro";
5 | import BaseHead from "../components/BaseHead.astro";
6 |
7 | export interface Props {
8 | content: z.TypeOf & { readingTime: string };
9 | }
10 |
11 | const {
12 | content: { title, createdAt, author, excerpt, image, readingTime },
13 | } = Astro.props;
14 |
15 | const pubDate = new Date(createdAt).toLocaleDateString("en-US", {
16 | year: "numeric",
17 | month: "short",
18 | day: "numeric",
19 | });
20 |
21 | const authorIcon =
22 | (await Astro.glob("../../public/authors/**/*.{jpeg,jpg,png}"))
23 | .map((v) => v.default.replace("/public", ""))
24 | .filter((v) => v.toLowerCase().includes(author.toLowerCase()))
25 | .at(0) ?? "/authors/default.png";
26 |
27 | const input = JSON.stringify({
28 | title,
29 | subtitle: `${pubDate} • ${readingTime}`,
30 | });
31 | ---
32 |
33 |
34 |
35 |
36 |
41 |
42 |
43 |
44 |
45 |
46 |