Skip to content

Instantly share code, notes, and snippets.

View codewithmanas's full-sized avatar
🎯
Focusing

Manas Ranjan Adha codewithmanas

🎯
Focusing
View GitHub Profile
@codewithmanas
codewithmanas / index.html
Created April 29, 2023 10:56
This is for first electron app to start learning electron
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP -->
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'">
<link href="./styles.css" rel="stylesheet">
<title>Hello World!</title>
</head>
<body>
@codewithmanas
codewithmanas / gitbasics.md
Created March 17, 2023 07:28
10 basic Git commands that every beginner should know.
  1. git init: This command initializes a new Git repository in the current directory.

  2. git add: This command adds changes to the staging area. You can specify individual files or use . to add all changes. git add <file name> (for a specific file) or git add . (for all files).

  3. git commit: This command commits changes to the repository. You can add a message with the-m flag, like this: git commit -m "Commit message".

  4. git status: This command shows the status of your repository, including which files have been modified and which are staged for commit.

  5. git log: This command shows the commit history of the repository, including who made each commit, when, and the commit message.

@codewithmanas
codewithmanas / sizeof.md
Created February 25, 2023 14:20
Do you know return type of sizeof() operator in C/C++ ?

return type of sizeof() operator is size_t

what is difference between size_t vs int data types?

size_t and int are two different data types in C that are used for different purposes.

int is a signed integer type that can represent both positive and negative values. It is commonly used for counting and arithmetic operations in C programs. However, the size of an int can vary depending on the implementation and architecture of the system, and it is not guaranteed to be the same size on all systems.

size_t is an unsigned integer type that is used to represent the size of an object or the result of the sizeof operator. It is guaranteed to be large enough to represent the size of any object on the system, and it is defined to be the same size as unsigned long on most systems. size_t is commonly used for memory allocation and manipulation operations, where the size of objects is important.

The main difference between size_t and int is that size_t is an unsigned type, meaning it can

@codewithmanas
codewithmanas / outline-width.md
Last active February 20, 2023 11:36
CSS outline width not working

CSS outline-width not working

Just add outline-style: solid; to your css and it will work.

  outline-width: 1px;
  outline-style: solid;
Explanation:

The outline-width setting doesn't work without specifying outline-style.