Skip to content

Instantly share code, notes, and snippets.

@SH20RAJ
SH20RAJ / videos.json
Last active May 17, 2024 19:11
Sample Videos for Testing
{
"name": "Movies",
"videos": [
{
"description": "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org",
"sources": [
"http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4"
],
"subtitle": "By Blender Foundation",
@SH20RAJ
SH20RAJ / terabox-cookies.txt
Last active April 28, 2024 05:14
Cookies for Terabox Downloader - terabox-cookies.txt
browserid=ECp8myR7LciVVyrKxhjseu5DsPlsBGfcO2llDtQXqlF9ol1xSxrOyu-zQOo=; __bid_n=18de05eca9a9ef426f4207; _ga=GA1.1.993333438.1714196932; ndus=Ye4ozFx5eHuiHedfAOmdECQ1cUYjXwfZF6VF4QbD; TSID=JmuRgIKcaPqMjlzvZE5wXOJD96SkO594; PANWEB=1; csrfToken=8nN5Q8Y5H71nPyC8NHxBYAcr; lang=en; __bid_n=18de05eca9a9ef426f4207; ndut_fmt=A66A9E7BD20D40C268FB5C44A4E512FB76288B038CE8454BBB5B6BA0DB474814; ab_sr=1.0.1_OWVhNGFjZjk2MTJjMjE4MWViNzJhZDZhYTFmYzc4YmU3YmM4YmE2YzM4OTlkNGFiYTgwMTU5YjExYzVkMmYyOWU3NjQ2MGY4OGU2NWFlN2VhMDVhM2EzMGFlNmVlY2YzODY4YWNlNTdiYzdkODllZGQyNzRmODFiMmYxMTA2NGQyYWM2NGQxN2UxNDA3YzlhMDZkNDJiNWE4YmM5NTkxOA==; ab_ymg_result={"data":"97e606d2561336895e6c204c4cefdda3f92fcb3da76591b45dff12f3686fa1cad214e650165788b6b308134b9d9630b87d3b7b925e4d6eff5c376d2a0616a7d075d125397d73a7d649719f13489133194f2afd96fe712df4def2120f7e123df403d77144b1fb1f7ef9cd2b2c34feda576a824304a7c66bc9bbf9482618a92b59","key_id":"66","sign":"a8e92f31"}; _ga_06ZNKL8C2E=GS1.1.1714281215.2.0.1714281219.56.0.0
@SH20RAJ
SH20RAJ / vercel.json
Created April 25, 2024 15:34
Vercel.json to deploy express app on vercel
{
"version": 2,
"builds": [
{
"src": "bot.js",
"use": "@vercel/node"
}
],
"routes" : [
{

🚀 JavaScript Optional Chaining: Navigate Objects Safely with Confidence! 🌟 - 🔮 Unlocking JavaScript Magic 😎

Introduction:

In the enchanting world of JavaScript, diving into nested objects can be like exploring a mysterious treasure map 🗺️. But fear not, brave developers! Our trusty companion, the ?. (optional chaining) operator, is here to guide us through the twists and turns of object navigation 🧭✨. Let's embark on an adventure to discover the magic of optional chaining!

What is Optional Chaining (?.)?

Optional chaining, introduced in ECMAScript 2020, is a magical operator that allows us to safely access properties of nested objects, even when they might not exist. It's like having a magical shield that protects us from the perils of null and undefined values 🛡️.

How to Use Optional Chaining:

Let's unravel the mysteries of optional chaining with a whimsical example:

@SH20RAJ
SH20RAJ / javascript-magic-20-quirky-questions-52ga.md
Created April 12, 2024 07:18
🎩 JavaScript Magic: 20 Quirky Quandaries! 💫

JavaScript Magic: 20 Quirky Quandaries! 💫

Prepare to be enchanted by the mysterious world of JavaScript quirks! 🧙‍♂️ Let's embark on a journey through 20 mind-bending questions that will test your understanding of JavaScript's peculiar behaviors! 🚀💡

Question 1: What's the result of [] + {}? 🤔

console.log([] + {}); // ?
Answer:
@SH20RAJ
SH20RAJ / is-0-null-in-javascript-javascript-quirks-tricky-equality-questions-4eac.md
Created April 12, 2024 07:07
is 0 !== null in Javascript 💡 - 🧐 JavaScript Quirks: Tricky Equality Questions! 💡

Title: "🧐 JavaScript Quirks: Exploring Tricky Equality Questions! 💡"

Have you ever wondered about the curious world of JavaScript equality comparisons? 🤔 Brace yourself for a dive into some peculiar scenarios where JavaScript's loose equality rules can lead to surprising results! Let's explore these quirky questions together! 🚀✨

Question 1: What's the result of 0 == null? 🤔

console.log(0 == null); // ?
@SH20RAJ
SH20RAJ / building-an-offline-enabled-to-do-list-web-app.md
Created April 12, 2024 01:04
Building an Offline-Enabled To-Do List Web App 🚀

Building an Offline-Enabled To-Do List Web App

After getting huge success on my previous article. Here is a use case of building an Offline-Enabled Website. {% post https://dev.to/sh20raj/how-to-make-your-website-used-without-internet-3e3l %}

In today's world, where connectivity isn't always guaranteed, creating web applications that work offline can greatly enhance user experience. In this tutorial, we'll walk through the process of building a simple To-Do List web app that functions both online and offline. We'll be using basic HTML, CSS, and JavaScript, along with a service worker for caching resources.