Skip to content

Instantly share code, notes, and snippets.

View thecodermehedi's full-sized avatar
🧑‍💻
Solo Levelling

Mehedi Hasan thecodermehedi

🧑‍💻
Solo Levelling
View GitHub Profile
@thecodermehedi
thecodermehedi / ripple.min.css
Created November 23, 2024 06:35
Pure CSS implementation of Android Material design "ripple" animation
.ripple{position:relative;overflow:hidden;transform:translate3d(0,0,0)}.ripple:after{content:"";display:block;position:absolute;width:100%;height:100%;top:0;left:0;pointer-events:none;background-image:radial-gradient(circle,#000 10%,transparent 10.01%);background-repeat:no-repeat;background-position:50%;transform:scale(10,10);opacity:0;transition:transform .5s,opacity 1s}.ripple:active:after{transform:scale(0,0);opacity:.2;transition:0s}
@thecodermehedi
thecodermehedi / windows-keys.md
Created October 26, 2024 11:49 — forked from rvrsh3ll/windows-keys.md
Windows Product Keys

NOTE

These are NOT product / license keys that are valid for Windows activation.
These keys only select the edition of Windows to install during setup, but they do not activate or license the installation.

Index

@thecodermehedi
thecodermehedi / file-name-differs-from-already-included-file-name-only-in-casing.md
Created June 27, 2024 05:38
'File name differs from already included file name only in casing' on relative path with same casing

You need to disable the forceConsistentCasingInFileNames in the tsconfig.json file.

So you should have something like that:

{
  "compilerOptions": {
    "forceConsistentCasingInFileNames": false,
  }
}
@thecodermehedi
thecodermehedi / typeerror-cannot-read-properties-of-undefined-reading-headerssent.md
Last active June 25, 2024 11:34
TypeError: Cannot read properties of undefined (reading 'headersSent')

it wasn't a problem with Express, but an issue with my coding style. Because I don't use semicolons the error ocurred.

app.use(...)

(async () => {
   ...
})()

How a Software Should Start


SDLC Phases

  1. Planning
@thecodermehedi
thecodermehedi / isPalindrome.js
Last active January 24, 2024 05:11
isPalindrome is a javascript function that takes a string as input and returns true if the string is a palindrome otherwise return false. A palindrome is a word, phrase, number, or other sequence of characters that reads the same forward and backward, ignoring punctuation, case, and spacing.
const isPalindrome = (string) => {
// replacing non-alphanumeric characters with space and converting to lowercase
cleanString = string.replace(/[^a-zA-Z0-9]/g, "").toLowerCase();
// reversing the string (splitting it into an array, reversing the array, and joining it back into a string)
reversedString = cleanString.split("").reverse().join("");
// comparing the reversed string with the original cleaned string and returning true or false
return cleanString === reversedString;
@thecodermehedi
thecodermehedi / geocode.json
Created January 23, 2024 06:18
country code with dial code and flag
[ { "name": "Afghanistan", "dial_code": "+93", "code": "AF", "flag": "🇦🇫" }, { "name": "Albania", "dial_code": "+355", "code": "AL", "flag": "🇦🇱" }, { "name": "Algeria", "dial_code": "+213", "code": "DZ", "flag": "🇩🇿" }, { "name": "AmericanSamoa", "dial_code": "+1684", "code": "AS", "flag": "🇦🇸" }, { "name": "Andorra", "dial_code": "+376", "code": "AD", "flag": "🇦🇩" }, { "name": "Angola", "dial_code": "+244", "code": "AO", "flag": "🇦🇴" }, { "name": "Anguilla", "dial_code": "+1264", "code": "AI", "flag": "🇦🇮" }, { "name": "Antarctica", "dial_code": "+672", "code": "AQ", "flag": "🇦🇶" }, { "name": "Antigua and Barbuda", "dial_code": "+1268", "code": "AG", "flag": "🇦🇬" }, { "name": "Argentina", "dial_code": "+54", "code": "AR", "flag": "🇦🇷" }, { "name": "Armenia", "dial_code": "+374", "code": "AM", "flag": "🇦🇲" }, { "name": "Aruba", "dial_code": "+297", "code": "AW", "flag": "🇦🇼" }, { "name": "Australia", "dial_code": "+61", "code": "AU", "preferred": true, "flag": "🇦🇺" }, { "name": "Austria", "dial_code": "+43",
@thecodermehedi
thecodermehedi / vercel-server.json
Last active December 9, 2024 02:40
vercel configuration file for deploying server ( backend ) to vercel
{
"version": 2,
"builds": [
{
"src": "build/index.js",
"use": "@vercel/node"
}
],
"routes": [
{
@thecodermehedi
thecodermehedi / vercel-client.json
Last active June 23, 2024 16:40
vercel configuration file for deploying client ( frontend ) to vercel
{
"rewrites": [
{
"source": "/(.*)",
"destination": "/"
}
]
}
@thecodermehedi
thecodermehedi / data.json
Last active September 25, 2023 13:22
givingtree-mockdata
[
{
"id": "1",
"picture": "https://i.imgur.com/NdGs6hs.jpg",
"title": "Helping Hands Foundation",
"category": "Health",
"categoryBg": "rgba(0, 82, 255, 0.2)",
"cardBg": "rgba(0, 82, 255, 0.15)",
"textColor": "rgba(0, 82, 255, 1)",
"donateButtonBg": "rgba(0, 82, 255, 1)",