This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import fs from 'fs' | |
import { FileMagic, MagicFlags } from '@npcz/magic' | |
import { extension } from 'mime-types' | |
import path from 'path' | |
import os from 'os' | |
FileMagic.magicFile = require.resolve( | |
'@npcz/magic/dist/magic.mgc' | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { AnyZodObject, ZodTypeAny } from 'zod' | |
import { | |
NextFunction, | |
Request, | |
RequestHandler, | |
Response | |
} from 'express' | |
import { HttpError } from '@/lib/errors.lib' | |
type RequestPayloadIn = 'body' | 'query' | 'params' |
Warning: Long post PROGRAMMING FOR BEGINNERS Here, I am going to share stuff how I learned programming and how i progress everyday. Inshort a guide to become self taught programmer. (Ps: I'm no pro or anything Im just a failure and complete noob and telling how to improve everyday and try to be better in your interest, and I also have an anime dp xD iykwim)
- Before you begin... Get to know why you want to learn, is that to achieve anything? Such as building website or application or game or do some research or anything? Or is it like sharmaji ke ladke ne engineering kiya mai bhi karunga (this thing will never work)
- Before you know how to code.... Nothing more I should say ... But atleast learn how to use the OS at enough level like commandline of the os (eg. cmd for win or terminal for linux or anything) aisa nahi hona chaiye ki yar ye chiz install karni nahi aati ya fir koi command run karna nahi aata And yes Googling... Believe me learning about your OS is best thing to progress at good speed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
# Edit these | |
SOURCE_VCF = "27jan22.vcf" # Your source file | |
COUNTRY_CODE = "+91" # Country code you want to add (Tested for India only) | |
OUTPUT_VCF = "27jan22-modded.vcf" # The output file you want | |
# Dont edit below | |
to_save = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
from __future__ import print_function | |
from selenium import webdriver | |
from selenium.webdriver.chrome.options import Options | |
def create_proxyauth_extension(proxy_host, proxy_port, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require('express') | |
const socket = require('socket.io') | |
const PORT = 5000 | |
const app = express() | |
const server = app.listen(PORT, () => console.log(`Server started on port ${PORT}`)) | |
const io = new socket.Server(server) |
- paste in dev console
- call
autofillAnswers
function - pass answer string eg.
"DBCCBDBCADCBADBADABC"
- eg.
autofillAnswers("DBCCBDBCADCBADBADABC")
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// extractor works after submitting form and clicking on [View Score] button | |
// once all correct answers are displayed use this script | |
function isCorrect(el) { | |
const val = el.querySelector('[aria-label="Incorrect"]') | |
return val ? false:true | |
} | |
function answerFromIncorrect(el) { | |
return el.querySelector("div.freebirdFormviewerViewItemsItemGradingCorrectAnswerBoxContent > div > label > div > div.docssharedWizToggleLabeledContent > div > span").innerText.split('.')[0] |
NewerOlder