sahilrajput.com

Sahil Rajput

A crazy spirit
Exercise Routines, Dhyaan/Meditation, Music & Visuals, Blog Recommendations, Vocab Doc (web), Lifestyle

🥕🍎 In command ts-node-dev --transpile-only tg.ts what does the flag do --transpile-only? (ChatGPT)

The --transpile-only flag in the ts-node-dev command tells TypeScript Node (ts-node) to skip type checking when running the TypeScript code. Normally, TypeScript checks the types as it compiles the code, which can slow down the process.

When using --transpile-only, TypeScript only transpiles the code (i.e., converts TypeScript to JavaScript) without performing any type checks. This can make the development process faster, especially in situations where you rely on external tools (like an IDE or a separate build step) to handle type checking.


ॐ सर्वे भवन्तु सुखिनः			Om Sarve Bhavantu Sukhinah)			- Om, May All be Happy,
सर्वे सन्तु निरामयाः । 			Sarve Santu Niraamayaah) 			- May All be Free from Illness.
सर्वे भद्राणि पश्यन्तु 			Sarve Bhadraanni Pashyantu)			- May All See what is Auspicious,
मा कश्चिद्दुःखभाग्भवेत् । 		Maa Kashcid-Duhkha-Bhaag-Bhavet)		- May no one Suffer.
ॐ शान्तिः शान्तिः शान्तिः ॥ 		Om Shaantih Shaantih Shaantih)			- Om Peace, Peace, Peace.
echo Hello world! > /dev/null
cat /dev/null
!!(() => {})

Javascript Cheatsheet - Sahil

SLEEP FUNCTION
==============
await new Promise(r => setTimeout(r, 2000))


SLICE Array Method
==================
// Note:
// 1. slice() method returns shallow copied array.
// 2. first argument is inclusive and second argument is **non-inclusive**
const newArray = myArray.slice(startIdx, endIdx + 1);

SORTING Array Method
=======
myNumbers.sort(); // sorts in ascending order [DEFAULT]
myNumbers.sort((a, b) => a - b); // sorts in ascending order [DEFAULT]
myNumbers.sort((a, b) => b - a); // sorts in descending order

REDUCE ARRAY METHOD
======
ar = [ 1, 2, 3 ]
ar.reduce((a,b) => a+b, 0) // Output: 6

PUSH/POP/SHIFT/UNSHIFT - all mutate array
=====
`push` and `pop` works on end of array
`unshift` and `shift` works on start of array

USING FETCH
===========
// client-side
const response = await fetch('/roll'); // 'GET'
const { number } = await response.json();

const response = await fetch('/todo', {
	method: 'POST', // 'PUT', 'DELETE', 'PATCH'
	body: JSON.stringify({ description }),
	headers: {
		'Content-Type': 'application/json'
	}
});
const { description } = await response.json();

// server-side
const { description } = await request.json();


GETTER AND SETTERS IN AN OBJECT
===============================
// 1
const obj = {
    countValue: 42,
    get count() {
        return this.countValue;
    },
    set count(value) {
        this.countValue = value;
    }
};

console.log(obj.count); // 42
obj.count = 43;
console.log(obj.count); // 43

// WHEREAS FUNCTION DEFINED WITH `function` KEYWORD OR ARROW-FUNCTION-SYNTAX BEHAVES HAS GENERAL FUNCTIONS UNLIKE GETTER/SETTERS:
// -----------------------------------------------------------------------------------------------------------------------------
// Read more differenes here - https://github.com/sahilrajput03/sahilrajput03/blob/main/learn-js.md#geeter-setters-in-object
const obj = {
  countValue: 42,
  count: () => this.countValue, // Note: `this` here doesn't refer to the object.
};

console.log(obj.count()); // undefined, because `this` does not refer to `obj`.

Online Markets I use:

Public Clipboard: Click here

Superscript Numbers: ⁰¹²³⁴⁵⁶⁷⁸⁹

Unit Conversions

Tags: #metre, #foot, #feet, #centimeter

A small scale is 15cm long.

Length 			
======
1 ft ≈ 30.48 cm
1 m ≈ 3.3 ft (precisely 3.28084)
1 m ≈ 39.4 inch (precisely 39.3701)
1 km ≈ 0.62 miles (precisely 0.621371)
1 mile ≈ 1.61 km (precisely 1.60934)

10^⁶ = 1 Million = 10 Lakh
10^⁹ = 1 Billion = 100 Crore
10^¹² = 1 Trillion = 100k Crore  =  100 Thousand Crore  =  1 Lakh Crore

Mass
====
1 kg ≈ 2.2 lbs (pounds)
1 lbs ≈ 0.45 kg

Currency
========
**For fastest conversion from dollar to inr you can simply multiply by 100 (~84 ₹/$).**

$ to ₹ Conversion factor: 83 ₹/$
₹ to $ Conversion factor: 0.012 $/₹

$ 1 Million  = ₹ 8.3 Crore
$ 1 Billion  = ₹ 8.3k Crore
$ 1 Trillion = ₹ 83 Lakh Crore = ₹ 8300k Crore

Conversion Trick For $ and ₹
============================
1. To convert $ to ₹ we can multiply the value with 10 and 8 in sequence. (Refer ^1 at bottom)
2. To convert ₹ to $ we can divide the value with 10 and 8 in sequence (Refer ^1 at bottom)

References
==========
^1: 10 and 8.3 are multiplicative factors of 83 because 10 x 8.3 equals 83.

What is Selling?

Source: Click here

PEU:

YouTube Audio Library

  1. Note: This feature is about using youtube’s official collection music audios made by different authors for purpose of background audio.
  2. Note: For multi-language audio feature check it on your tech journal or check this official youtube help page.

Sahil: Most of these tracks have license like “… standalone distribution of these files is not permitted).” as you can check by clicking on License Type icon corresponding to each audio clip.

Royal Society Prizes for Science Books

Breath by James Nestor is the finalist for the year 2021.

Click here

Breathing Videos by James Nestor

❤️ Breathing Videos: Click here

❤️ Interesting Page of James Nestor - Wikipedia: Click here

Document Order & Titles Notice for Google Docs

Website: sahilrajput.com
Github: github.com/sahilrajput03/sahilrajput03
Play Store: Tech Blog by Sahil Rajput

social-media-game

Superprof .co.in: Click here

Indiamart .com: Click here

🙂 English & Hindi Typing Courses

Note: Mangal is part of the Unicode standard, which means it supports a wide range of Devanagari characters and is more compatible with modern software and devices.

❤️ Note: Learn Typing on Mobile: Click here)

Proxy Sites of Torrent Sites

Source: Click here (earlier sitenable.com)

Tech Journal & Blogging: Click here | Old feed

General Blogging: Click here

English Channels in India

Source: List of English-language television channels in India | Wikipedia: Click here

Trademarks: OneUniverse, Same Roof

Sahil’s Vocabulary 🚶: Click here | Doc

Transcribe, Convert

❤️ 🫁 Reset Immune System - Wim Hof Method & Breathwork (Doc)

Note: Wim Hof Breathing or Breathe With Sandy are modern versions of Tummo Breathing.

Practices

*bc = breath cycle

Why Wim Hoff breathing?

It’s gonna boost both your immune system and calmness in a compound effect each day throughout life.

Business Apps

Depressions & Mental Health Support

Be Productive with videos 📽️ 🎬

Original & Curated Articles

Continents

Source: Continent - Wikipedia: Click here

Quick Links:

More:

References:

Made using Jekyll Template - abhinavs/moonwalk