Skip to content

Instantly share code, notes, and snippets.

View Anmol-Baranwal's full-sized avatar
:dependabot:
Code never sleeps

Anmol Baranwal Anmol-Baranwal

:dependabot:
Code never sleeps
View GitHub Profile
Task Automated Solution
Verify if the code follows style guidelines Code linters like ESLint (for JavaScript) or Pylint (for Python)
Check for broken links in documentation Link-checking tools like Markdownlint or HTML linting tools
Verify if code follows security best practices Security linters like SonarQube or Brakeman (for Ruby on Rails)
Check for spelling and grammar in comments Spellcheck tools like Code Spell Checker or write-good for markdown files
Ensure no secrets (API keys, passwords..) are hard-coded Secret scanning tools like Git-secrets or TruffleHog
Check if the project has proper test coverage Code cov
Effort required with a human reviewer Effort required with a formatting tool
Reviewer looks for whitespace issues and finds mistakes. Nothing!
Reviewer writes a note explaining the issue.
Reviewer double-checks the note for clarity.
Author reads the note and fixes the indentation.
Reviewer verifies the fix.
Feedback framed as command Feedback framed as request
Reviewer: "Refactor the User class into multiple smaller classes." Reviewer: "Could we refactor the User class into multiple smaller classes?"
Author: "I don't think it's necessary. The class is fine as it is." Author: "We could, but I believe splitting it might overcomplicate things. What do you think?"
@Anmol-Baranwal
Anmol-Baranwal / scrollbar.css
Created June 4, 2023 08:55
CSS Code for custom scrollbar ensuring browser cross-compatibility issues
/* Scrollbar /
/ Webkit-based browsers */
::-webkit-scrollbar {
width: 16px;
}
::-webkit-scrollbar-track {
background: transparent;
}
@Anmol-Baranwal
Anmol-Baranwal / Hyper Terminal Preference Code
Last active February 2, 2023 20:15
This is my custom styling code for my hyper terminal.
module.exports = {
config: {
// default font size in pixels for all tabs
fontSize: 13,
// font family with optional fallbacks
fontFamily: 'Menlo, "DejaVu Sans Mono", Consolas, "Lucida Console", monospace',
// terminal cursor background color and opacity (hex, rgb, hsl, hsv, hwb or cmyk)
cursorColor: 'rgba(248,28,229,0.8)',
@Anmol-Baranwal
Anmol-Baranwal / STL.cpp
Last active January 6, 2023 21:29
STL C++: A brief overview of methods & algorithms.
#include<bits/stdc++.h>
using namespace std;
int main()
{
// ========== PAIR ===========
pair<int, pair<int,int>> p = {1, {3, 4}};
// marked here-> - -
cout<<p.first<<" "<<p.second.first<<" ";
@Anmol-Baranwal
Anmol-Baranwal / Bug_Report.yml
Created October 3, 2022 15:13
Basic Issue Templates in yml format
name: "🐛 Bug Report"
description: Create a new ticket for a bug.
title: "🐛 [BUG] - <title>"
labels: [
"bug"
]
body:
- type: textarea
id: description
attributes:
@Anmol-Baranwal
Anmol-Baranwal / action_label.yml
Created September 23, 2022 16:58
Workflow to automatically add labels in JSON format in GitHub
on: issues
name: Create Default Labels
jobs:
labels:
name: DefaultLabelsActions
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@1.0.0
- uses: lannonbr/issue-label-manager-action@3.0.0
env:
@Anmol-Baranwal
Anmol-Baranwal / action_label.yml
Last active October 20, 2022 18:18
JSON Data for Labels in GitHub with name, color, description with the workflow
on: issues
name: Create Default Labels
jobs:
labels:
name: DefaultLabelsActions
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@1.0.0
- uses: lannonbr/issue-label-manager-action@3.0.0
env: