Skip to content

Instantly share code, notes, and snippets.

View nitin2953's full-sized avatar

Nitin Kumar Shah nitin2953

View GitHub Profile
@nitin2953
nitin2953 / index.html
Last active December 9, 2025 17:54
CSS Keyframes animated countdown timeout bar
<div class="timer-bar" id="countdown-timer"></div>
@nitin2953
nitin2953 / regex for letters not numbers or emojis.js
Created October 23, 2025 09:18
Simple regex to only allow letters in any laguage but not any number or emoji characters. There is also a fix for caret position when replacing text in an input field. Please don't ask any question about regex, I'm not a expert here, this code came from many trial & error. Have suggestion, please comment. Demo: https://happywishyou.pages.dev/wis…
/*
* \u200B: ZERO WIDTH SPACE
* \u200C: ZERO WIDTH NON-JOINER
* \u200D: ZERO WIDTH JOINER
* \uFE00-\uFE0F: VARIATION SELECTOR 1 to 16
* \u2139: INFO EMOJI
* \u20E3: Number Emoji COMBINING ENCLOSING KEYCAP (joiner for number emoji)
*/
const regex = /[^\s\p{L}\p{M}]|[\u200B\u200C\u200D\uFE00-\uFE0F\u2139\u20E3]/gu;
let make = new video({
title: "JavaScript Calculator with Arbitrary Precision",
description: openai.generateFrom(keyWords),
keyWords: [
"CSS Grid",
"Arbitrary Precision",
"No Floating Point Error",
"State Management",
"Storing History in LocalStorage",
"Formatting Output with Intl"
@nitin2953
nitin2953 / githistory.xyz.user.css
Last active March 8, 2022 15:50
Diff ➕ & ➖ for Git-history
/* ==UserStyle==
@name Git History Diff ➕ & ➖
@namespace https://gist.github.com/nitin2953
@version 1.0.0
@description Add ➕ & ➖ as ::before element on Added & Deleted line respectively for quick looking
@author Nitin Kumar (https://github.com/nitin2953)
@homepageURL https://gist.github.com/nitin2953/e3c7a8bc4a4805c97963671f2b3790da
@updateURL https://gist.github.com/nitin2953/e3c7a8bc4a4805c97963671f2b3790da/raw/3fcbddad8f93777ad9008b8415d45d6e71001491/githistory.xyz.user.css
@license AGPL-3.0
@preprocessor default
@nitin2953
nitin2953 / new-mdn-fix.user.css
Last active March 19, 2022 11:05
Some fixes for new design of MDN, Install `JetBrains Mono` font on your system
/* ==UserStyle==
@name MDN Design Fix
@namespace https://gist.github.com/nitin2953
@version 1.0.0
@description Beautify Details Summary, color, line-height, focus-ring, etc
@author Nitin Kumar (https://github.com/nitin2953)
@homepageURL https://gist.github.com/nitin2953/77c39db1b726fc48916bd53988bd6b31
@updateURL https://gist.github.com/nitin2953/77c39db1b726fc48916bd53988bd6b31/raw/b0ce8ca4d31c6f755181fe0185b20169579fb21c/new-mdn-fix.user.css
@license AGPL-3.0
@preprocessor default
@nitin2953
nitin2953 / new-mdn-fix.user.css
Created March 2, 2022 12:31
Some fixes for new design of MDN
/* ==UserStyle==
@name MDN Design Fix
@namespace https://gist.github.com/nitin2953
@version 1.0.0
@description Beautify Details Summary, color, line-height, focus-ring, etc
@author Nitin Kumar (https://github.com/nitin2953)
@homepageURL https://gist.github.com/nitin2953/e375812a5fd5e85ac6a189b623dcaca7
@updateURL https://gist.github.com/nitin2953/e375812a5fd5e85ac6a189b623dcaca7/raw/61c1c1aad922feb2b3f040436f4a316432fff2e4/github-link-fix.user.css
@license AGPL-3.0
@preprocessor default
@nitin2953
nitin2953 / github-link-fix.user.css
Last active February 17, 2022 08:51
Stylus css styles to expand click area of links in github repo files viewer
@nitin2953
nitin2953 / index.html
Created January 31, 2022 09:44
JS Selectors vs CSS Selectors (http://jsbench.github.io/#bc940f564dac54182d4a6fb26b687a7f) #jsbench #jsperf
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>JS Selectors vs CSS Selectors</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>