How to Add Full Calendar Icon to Monthly View Grid?
With and Without dayCellDidMount hook
To add an icon to a day, we need to identify the grid we want to add an icon to. For instance, today, past days, future days, weekends only, etc. Then we add the icon through JavaScript.
There are two ways to do that:
[Read More]Countries JSON Dictionary, Map Code to Name and Name to Code
Of Over 240 Countries
What Are The Use Cases of Lodash Chunk method?
Redux Form Render Multiple FieldArray Dynamically on the Same Page, With Validation
Shell Script to Delete and Recreate a Branch From Master
Both locally and remotely
To delete a branch and recreate it, both locally and remotely, here is a short shell script that asks for user confirmation and then proceeds to recreate the branch from master. In this example, the branch is development, the confirmation message is colored red to emphasize precuation, and the script only proceeds once user types exact yes.
JavaScript Flatten Deeply Nested Array of Objects Into Single Level Array
Using plain JavaScript, and lodash's flatMapDeep method.
JavaScript Find Path of Key in Deeply Nested Object or Array
Key Path Finder Using Depth First Search (DFS)
The following two codes go through the whole object, an array of objects, or a collection of both to get the path to a particular key. There are two versions: first gets the path to the key only, and second gets the path where a key has the given value.
[Read More]JavaScript Check if Key Exists in Deeply Nested Object or Array of Objects, Without Knowing the Path
Depth First Search (DFS) for Key Verification in an Object
The following JavaScript code recursively goes through the whole object, an array of objects, or a collection of both to verify if the given key exists somewhere down the object. It does not require the path to the key in advance.
[Read More]Size Conversion Between Pixel, Tailwind Classes, and Rem
A cheatsheet for quick tailwind size and font size reference
Assuming you have set 16px font-size in your project base, following will be the conversion table with examples: