Skip to content

Instantly share code, notes, and snippets.

View 2rohityadav's full-sized avatar
🌴
Working From Home

Rohit Kumar 2rohityadav

🌴
Working From Home
View GitHub Profile
@2rohityadav
2rohityadav / lighthouserc.schema.yml
Created January 19, 2024 09:52
Unofficial lighthouserc.yml schema
$schema: https://json-schema.org/draft/2020-12/schema
title: .lighthouserc
description: Lighthouse CI configuration JSON schema. Reference: https://github.com/GoogleChrome/lighthouse-ci/blob/main/docs/configuration.md
type: object
properties:
ci:
type: object
properties:
collect:
type: object
@2rohityadav
2rohityadav / vscode-settings-mac.json
Created April 20, 2023 16:47
vscode-settings.json | mac Only
{
"workbench.iconTheme": "material-icon-theme",
"workbench.colorTheme": "Monokai Pro (Filter Spectrum)",
"editor.inlayHints.fontFamily": "Fira Code",
"editor.fontFamily": "Fira Code",
"editor.fontSize": 14,
"editor.tabSize": 2,
"editor.wordWrap": "on",
"editor.formatOnSave": true,
"editor.formatOnPaste": true,
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Shallow vs Deep Copy</title>
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" href="../video-pages/main.css">
</head>
<body>
<header>
@2rohityadav
2rohityadav / queryParams.md
Created September 16, 2021 12:14
Add or update query string parameter
  • JavaScript Version
function updateUrlParameter(uri, key, value) {
    // remove the hash part before operating on the uri
    var i = uri.indexOf('#');
    var hash = i === -1 ? ''  : uri.substr(i);
    uri = i === -1 ? uri : uri.substr(0, i);

 var re = new RegExp("([?&amp;])" + key + "=.*?(&amp;|$)", "i");
@2rohityadav
2rohityadav / vscode-settings-win.json
Last active April 20, 2023 16:45
vscode-settings.json | Windows Only
{
"workbench.iconTheme": "material-icon-theme",
// FiraCode
"editor.fontFamily": "Fira Code",
"editor.fontLigatures": true,
"editor.tabSize": 2,
"editor.detectIndentation": false,
"window.zoomLevel": 0,
// Enable/disable navigation breadcrumbs
"breadcrumbs.enabled": true,
@2rohityadav
2rohityadav / extensions-list-for-vscode
Last active April 20, 2023 16:43
extensions-list-for-vscode.md
code --install-extension 2gua.rainbow-brackets
code --install-extension aaron-bond.better-comments
code --install-extension adpyke.codesnap
code --install-extension andys8.jest-snippets
code --install-extension Angular.ng-template
code --install-extension anweber.vscode-httpyac
code --install-extension apollographql.vscode-apollo
code --install-extension bradgashler.htmltagwrap
code --install-extension bradlc.vscode-tailwindcss
code --install-extension Cardinal90.multi-cursor-case-preserve
@2rohityadav
2rohityadav / checkDataTypes.md
Last active July 16, 2021 05:28
check data types in javascript
@2rohityadav
2rohityadav / sonarqube-setup-angular.md
Last active January 2, 2023 19:25
sonarqube setup with angular

SONAR Configuration - Angular

1) Install sonarqube-scanner -

npm install sonarqube-scanner --save-dev

2) Need to install few npm packages as a devDependencies

"devDependencies": {
@2rohityadav
2rohityadav / github_bitbucket_sameFolder.md
Last active April 2, 2020 06:06
Using Github & bitbucket in same folder

How to Use GitHub and BitBucket at the Same Time for One Project?

You can use multiple remote repositories with git. But you'll have to push separately into 2 of your remotes.

cd project

$ git remote add github https://github.com/your_user/your_repo.git

$ git remote add bitbucket https://your_user@bitbucket.org/your_user/your_repo.git

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Shallow vs Deep Copy</title>
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" href="../video-pages/main.css">
</head>
<body>
<header>