Skip to content

Instantly share code, notes, and snippets.

View NitkarshChourasia's full-sized avatar
🦁
pragmaticForAndToLife

Nitkarsh Chourasia NitkarshChourasia

🦁
pragmaticForAndToLife
View GitHub Profile
@NitkarshChourasia
NitkarshChourasia / nodejs_assignment.js
Created February 26, 2024 20:31
Node.js Zero to Hero in 3 Days - Node.js Assignment Q&A
// Node.js Assignment
const add = 10 + 2;
console.log(`The added value is ${add}`);
const subs = 10 - 2;
console.log(`The subtracted value is ${subs}`);

To allow others to review your code on GitHub when you are the owner and primary contributor, you can follow these steps:

  1. Create a Branch: Before you start working on a new feature or making changes, create a new branch in your repository. This branch will contain the changes you want others to review.

  2. Make Changes: Add, modify, or delete code as needed to implement the feature or fix an issue.

  3. Commit Changes: Commit your changes to the branch. Use clear and descriptive commit messages to explain the purpose of each change.

  4. Push to Remote: Push your branch and commits to the remote repository on GitHub. This is usually done using the git push command.

@NitkarshChourasia
NitkarshChourasia / git_best_practices.md
Created August 9, 2023 12:58
Git best practices.

Using Git effectively and following best practices can help you avoid failures, prevent irreversible mistakes, and ensure the successful development of features. Here are some Git best practices to consider:

  1. Use Version Control: Always use version control, like Git, to track changes in your codebase. This allows you to maintain a history of your project, revert to previous states, and collaborate effectively.

  2. Branching Strategy: Follow a branching strategy like Gitflow, where you have different branches for features, releases, and hotfixes. This helps isolate work, manage features, and stabilize releases.

  3. Small Commits: Make small, focused commits that address a single task or change. This makes it easier to understand changes, review code, and revert if needed.

  4. Descriptive Commit Messages: Write clear and descriptive commit messages that explain what the commit does. This helps other developers understand the purpose of the changes.

@NitkarshChourasia
NitkarshChourasia / NitkarshChourasia.py
Last active July 17, 2023 22:30
A brief introduction about me.
class Person:
def __init__(self, name, bio, website, social_media):
self.name = name
self.bio = bio
self.website = website
self.social_media = social_media
def display_intro(self):
print(f"Name: {self.name}")
print(f"Bio: {self.bio}")
@NitkarshChourasia
NitkarshChourasia / clean-up-arch-linux.md
Created January 10, 2023 19:04 — forked from rumansaleem/clean-up-arch-linux.md
Instructions to clean up Arch Linux (Manjaro)

Contents

  • Clean pkg cache
  • Remove unused packages (orphans)
  • Clean cache in /home
  • remove old config files
  • Find and Remove
    • duplicates
    • empty files
    • empty directories
  • broken symlinks
# False, True Statement
def false_true():
a = False == (0 > 1) # If printed without assigning it shows nothing and returns exit code 0.
b = True == (1 > 2) # So how can we print directly without assigning is it possible like this.
print(a,b)
######
# False == (2 > 1)
# True == (1 > 2)
# print(??? How can I, is there a way to print the values of the above statement without assigning?)
######