Skip to content

Instantly share code, notes, and snippets.

View rajeshkumaravel's full-sized avatar
🎯
Focusing

Rajesh Kumaravel rajeshkumaravel

🎯
Focusing
View GitHub Profile
@rajeshkumaravel
rajeshkumaravel / export-localstorage.md
Last active August 27, 2025 12:47
chrome local storage export to json

Export

  1. Open a tab and navigate to the website where you have content to export.

  2. Open devtools and switch to the console tab.

  3. Copy and paste the following snippet in the console and Chrome should ask you to save the output file

var obj = JSON.stringify(localStorage, null, 4)
var vLink = document.createElement('a')

Oh my zsh.

Oh My Zsh

Install ZSH.

sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh

Install Oh my ZSH.

@rajeshkumaravel
rajeshkumaravel / steps.md
Created December 7, 2023 13:38
Installing a Font in WSL (Windows Subsystem for Linux)

Installing a Font in WSL (Windows Subsystem for Linux)

To install a font in WSL, follow these steps:

  1. Check Font Location: Confirm that the font file (e.g., VictorMono.ttf) is located in a directory accessible from your WSL instance. You can copy the font file to your WSL home directory for simplicity.

  2. Install Font: You can use the fc-cache command to update the font cache in WSL and make the font available. Open a terminal in your WSL instance and run the following commands:

sudo cp /mnt/c/path/to/VictorMono.ttf /usr/local/share/fonts/

@rajeshkumaravel
rajeshkumaravel / install-git.bat
Created March 20, 2023 08:54 — forked from patmigliaccio/install-git.bat
Quick install Git for Windows with batch script. Include the git*.exe install executable in the same directory as this script.
:: Copyright (C): 2017 Pat Migliaccio
:: pat@patmigliaccio.com
::
:: LICENSE: MIT
::
:: File: install-git.bat
::
:: Batch file for a quick install of Git for Windows
:: Include the git*.exe install executable
:: in the same directory as this script.
@rajeshkumaravel
rajeshkumaravel / node-setup.bat
Created March 20, 2023 08:53 — forked from manuelbieh/node-setup.bat
Install node.js + some packages on Windows via Batchfile
@echo off
NET SESSION >nul 2>&1
IF %ERRORLEVEL% NEQ 0 (
echo This setup needs admin permissions. Please run this file as admin.
pause
exit
)
set NODE_VER=null
@rajeshkumaravel
rajeshkumaravel / getAllImports.ts
Created February 16, 2023 06:40 — forked from tinovyatkin/getAllImports.ts
Getting all imported modules names from a JS file using TypeScript parser
import { readFileSync } from 'fs';
import { builtinModules } from 'module';
import ts from 'typescript';
const tsHost = ts.createCompilerHost(
{
allowJs: true,
noEmit: true,
isolatedModules: true,
@rajeshkumaravel
rajeshkumaravel / nvm_windows.md
Last active March 21, 2025 15:07
Installing NodeJS thru NVM in Windows (Without Admin)

************ UNINSTALL ANY PREVIOUS NVM AND NODEJS ************

1. Open Powershell and Execute following command

cd $Env:USERPROFILE;
Invoke-WebRequest https://raw.githubusercontent.com/jchip/nvm/v1.5.4/install.ps1 -OutFile install.ps1;
.\install.ps1 -nvmhome $Env:USERPROFILE\nvm;
del install.ps1
@rajeshkumaravel
rajeshkumaravel / memorySizeOfObject.js
Created July 11, 2022 11:26
calculate memory size of javascript object, it is not a accurate value!
function memorySizeOf(obj) {
var bytes = 0;
function sizeOf(obj) {
if(obj !== null && obj !== undefined) {
switch(typeof obj) {
case 'number':
bytes += 8;
break;
case 'string':
@rajeshkumaravel
rajeshkumaravel / sunbird_desktop_setup.md
Created September 7, 2021 06:17
sunbird desktop setup

STEPS TO SETUP DESKTOP APP

  1. Fork and clone https://github.com/Sunbird-Ed/SunbirdEd-portal
  2. Install dependencies src/desktop && yarn install
  3. Install dependencies cd OpenRAP && yarn install
  4. Generate build under cd src/desktop/OpenRAP && npm run pack
  5. Copy generated .tgz file path; ex: /home/User1/SunbirdEd-portal/src/desktop/OpenRAP/dist/project-sunbird-OpenRAP-1.0.2.tgz
  6. cd ..
  7. yarn add path-to-tar file yarn add /home/User1/SunbirdEd-portal/src/desktop/OpenRAP/dist/project-sunbird-OpenRAP-1.0.2.tgz
@rajeshkumaravel
rajeshkumaravel / status_codes.json
Last active July 21, 2025 11:18
List of Node.js HTTP status codes
{
"100": "Continue",
"101": "Switching Protocols",
"102": "Processing",
"200": "OK",
"201": "Created",
"202": "Accepted",
"203": "Non-Authoritative Information",
"204": "No Content",
"205": "Reset Content",