Skip to content

Instantly share code, notes, and snippets.

View g-rohit's full-sized avatar
🎯
Focusing

G Rohit g-rohit

🎯
Focusing
View GitHub Profile
@g-rohit
g-rohit / mega-exclusions.md
Created March 28, 2024 20:23
How to ignore any file or folder from Mega sync backup?

mega-exclusions.png

@g-rohit
g-rohit / promises.js
Last active March 1, 2024 22:14
Handling Promises in Javascript using Async Await, Fetch and Promise constructor.
/**
* Asynchronous function to fetch internet facts from a JSON API.
* @returns {Promise<void>} A Promise that resolves when the facts are fetched and logged.
*/
async function getFacts() {
try {
// Fetch data from the internet_facts.json API
const API = await fetch(
"https://gist.githubusercontent.com/g-rohit/a4c4c49b85c71bff69738e9ad0e44da9/raw/1e74b775a2efcf1cca8b066da45aa0d28c2ac096/internet_facts.json"
);
@g-rohit
g-rohit / internet_facts.json
Last active January 29, 2024 06:42
Random 20 Internet Facts
{
"internet_facts": [
"The first ever website was published on August 6, 1991, by Tim Berners-Lee.",
"The first email was sent by Ray Tomlinson in 1971.",
"The concept of the World Wide Web was proposed by Tim Berners-Lee in 1989.",
"Google processes over 40,000 search queries every second on average.",
"The internet requires 50 million horsepower to keep running in current state.",
"The most common use of the internet is sending and receiving email.",
"YouTube is the second largest search engine on the internet, after Google.",
"There are over 1.7 billion websites on the internet as of 2021.",
@g-rohit
g-rohit / uses--by-grohit.json
Last active September 19, 2023 22:51
Uses by G Rohit
[
{
"Name": "Antivirus",
"ApplicationName": "Bitdefender Antivirus Free",
"URL": "https://www.bitdefender.com/solutions/free.html",
"tags": "utilities"
},
{
"Name": "Break time reminder",
"ApplicationName": "Stretchly",
@g-rohit
g-rohit / quotes.json
Created August 30, 2023 03:16
Collections of Random Quotes - can be used a Quotes JSON API
{
"quotes": [
{
"quote":"Life isn’t about getting and having, it’s about giving and being.","author":"Kevin Kruse"},
{
"quote":"Whatever the mind of man can conceive and believe, it can achieve.","author":"Napoleon Hill"},
{
"quote":"Strive not to be a success, but rather to be of value.","author":"Albert Einstein"},
{
@g-rohit
g-rohit / WebUser.json
Last active May 10, 2023 23:36
All Web user book published Dates
// https://www.magzter.com/magazines/listAllIssues/503
// var all = document.querySelectorAll('.jsx-3193871204.mag__resultsListInner')
// all.forEach(eachitem => { console.log(eachitem.innerText) })
{
"December 09, 2020",
"November 25, 2020",
"November 11, 2020",
"October 28, 2020",
"October 14, 2020",
"September 30, 2020",
var sheetName = 'responses'
var scriptProp = PropertiesService.getScriptProperties()
function intialSetup () {
var activeSpreadsheet = SpreadsheetApp.getActiveSpreadsheet()
scriptProp.setProperty('key', activeSpreadsheet.getId())
}
function doPost (e) {
@g-rohit
g-rohit / remove-hindustantimes-ad-block-pop-up.js
Last active December 9, 2020 11:19
remove-hindustantimes-ad-block-pop-up
// ==UserScript==
// @name HT-times-@grohit;
// @version 1.00
// @Date 9th-dec-2020
// @author github.com/g-rohit
// ==/UserScript==
// Desc: Remove ad blocker pop up
setInterval(function () {
if (window.location.href.includes("hindustantimes")) {
@g-rohit
g-rohit / save_instagram_image_and_video.user.js
Last active May 8, 2023 08:53
Add image and video access on right click of the mouse on web instagram
// ==UserScript==
// @name Instagram-@grohit;
// @version 1.00
// @Date 12th Nov 2020
// @author github.com/g-rohit
// ==/UserScript==
// Desc: Add image and video access on right click of the mouse on web instagram
setInterval(function () {
if (window.location.href.includes("instagram")) {
@g-rohit
g-rohit / ig_request_acceptor.js
Last active September 19, 2020 08:43
Accept pending Instagram requests
setInterval(function(){ document.querySelector('div.Igw0E.IwRSH.eGOV_._4EzTm.JI_ht>button.sqdOP.L3NKy.y3zKF').click() }, 3000);