Skip to content

Instantly share code, notes, and snippets.

View arnav-kr's full-sized avatar

Arnav Kumar arnav-kr

View GitHub Profile
@arnav-kr
arnav-kr / service-worker.js
Last active April 11, 2022 07:42
A Basic Service Worker Template with Explanations
// TODO: Update the cacheName Everytime you want to update your cache
const cacheName = "v1.0.0";
const cacheKeepList = [cacheName] // Add Other names of cache that you don't want to delete
// TODO: Add the default response URL
// When the User is offline and the requested resource is not in the cache then this response will be returned. This needs to be in the cache
defaultResponseURL = "";
@arnav-kr
arnav-kr / .env
Created January 5, 2022 11:44
Firebase Admin SDK Starter
FIREBASE_SERVICE_ACCOUNT_JSON={"type": "service_account","project_id": "###############","private_key_id": "################################","private_key": "-----BEGIN PRIVATE KEY-----\n##########################-----END PRIVATE KEY-----\n","client_email": "##########################","client_id": "#########################","auth_uri": "##################################","token_uri": "################################","auth_provider_x509_cert_url": "#####################","client_x509_cert_url": "###############"}
FIREBASE_REALTIME_DATABASE_URL=************************

Step By Step Guide of Disabling the inbuilt JSON Previewer in Firefox

  1. open about:config in your Firefox.

    A warning screen will appear, just click the Accept the Risk and Continue button.

@arnav-kr
arnav-kr / getAnswerKey.js
Last active April 14, 2024 07:22
Extract 2024 JEE Mains Score from Answer Key Challenge
// to be run on the answer key challenge page after loggin into student dashboard (https://jeemain.ntaonline.in/*)
// updated as per new answer key scheme
let answerKey = {};
$$(".form-options-item").forEach(i => {
let questionId = i.querySelector(".vcenter:nth-child(2)").innerHTML;
let correct = i.querySelector(".vcenter:nth-child(3)").innerHTML;
answerKey[questionId] = correct;
});
copy(answerKey);
@arnav-kr
arnav-kr / Configuration.md
Last active February 12, 2024 10:44
Phone IP Sync Script for Task Scheduler on Windows

Important

Prerequisite: make sure nmap is installed for windows and in path, Download if not already installed

Note

Make sure set the user account to Administrators, else the script won't be able to modify the hosts file

Youtube Demo: https://youtu.be/JxQjdxpGU5g

General Properties:

@arnav-kr
arnav-kr / Ngrok.md
Last active February 6, 2025 16:01
Run Flutter Apps in Project IDX on your real device

Ngrok on termux

to install ngrok:

pkg update -y
pkg install git
git clone https://github.com/Yisus7u7/termux-ngrok

cd termux-ngrok
@arnav-kr
arnav-kr / Disabling Calling Name Presentation (CNAP).md
Last active January 9, 2026 12:02
Disabling Calling Name Presentation (CNAP)

Calling Name Presentation (CNAP)

[Skip to main content]

Short URL: go.arnv.dev/cnap

Recently the Calling Name Presentation (CNAP) Service has been introduced in India, which is gradually rolling out around the telecom circles.

CNAP as the name suggests is a suplimentary service enabled by default for all the users, it shows your name as per the KYC documents which you used for SIM card registration