Skip to content

Instantly share code, notes, and snippets.

const axios = require("axios");
const jsdom = require("jsdom");
// ids to name mapping of theatres - you can find this by inspecting the theate div
const ids = {
VRCM: "VR Mall",
SPPZ: "Forum Palazzo",
STHM: "SPL Sathyam cinemas",
EVPI: "EVP Cinemas",
JACM: "Phoenix Jazz cinemas",
let value = 0.5 // set value from 0-1
document.querySelectorAll('audio').forEach(el=>el.volume = value)
@charupraneeth
charupraneeth / elab-midsem-autofill.js
Last active August 26, 2021 05:34
simple script that auto-fills mid-sem feedback in srm erp , all you have to do is open the dev console in seperated window mode and paste the code
function autofill(){
const min = 2,
max = 5; // (1 - poor , 5 - excellent)
document.getElementById("commentTextArea").value = "Nice teaching"; // remarks
document.querySelectorAll("select").forEach((element) => {
if (element.id.includes("gradeSelect")) {
element.value = Math.round(Math.random() * (max - min) + min);
}
});
}
@charupraneeth
charupraneeth / amazon-scraper.js
Created August 26, 2021 04:02
a simple amazon.in scraping script
const fetch = require("node-fetch");
const jsdom = require("jsdom");
const options = {
credentials: "include",
headers: {
"User-Agent":
"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:92.0) Gecko/20100101 Firefox/92.0",
Accept:
"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8",
@charupraneeth
charupraneeth / vetur.config.js
Created July 5, 2021 11:08
vetur config file for a full stack app seperated as client and server
// vetur.config.js
/** @type {import('vls').VeturConfig} */
module.exports = {
// **optional** default: `{}`
// override vscode settings
// Notice: It only affects the settings used by Vetur.
settings: {
"vetur.useWorkspaceDependencies": true,
"vetur.experimental.templateInterpolationService": true,
},