Skip to content

Instantly share code, notes, and snippets.

Avatar

Gaurang Tandon GaurangTandon

  • IIIT Hyderabad
  • India
View GitHub Profile
View scoreboard-amp-fixer.user.js
// ==UserScript==
// @name Amp Fixer
// @match https://codedrills.io/contests/icpc-gwalior-pune-2020-regional-round/scoreboard
// ==/UserScript==
function fixer() {
const elms = document.querySelectorAll(".v-data-table__wrapper > table:nth-child(1) > tbody:nth-child(3) > tr > td:nth-child(3)");
for (const elm of [...elms]) {
const s = elm.innerText;
@GaurangTandon
GaurangTandon / clone-ssh.sh
Created Feb 14, 2021
Bash command to allow cloning via SSH with HTTPS URL
View clone-ssh.sh
# place this in your aliases file
ghcl() {
prefix=$(echo -n $1 | sed 's|https://github.com/|git@github.com:|')
git clone "$prefix.git"
}
@GaurangTandon
GaurangTandon / close-ssh.user.js
Created Feb 14, 2021
Userscript to allow cloning with SSH directly from GitHub UI
View close-ssh.user.js
// ==UserScript==
// @name SSH clone button
// @version 0.1
// @description For those who have SSH default in their repo
// @author Gaurang
// @match https://github.com/*/*
// @grant none
// ==/UserScript==
(function() {
View lazysegtreemeet.md

Basic segtree (prerequisite)

Given n values a[1], ..., a[n], you entertain two types of queries:

  • point update: add x to the i-th value
  • range query: query minimum value of a[i] in the range l, r

LIVE CODE.

Simple lazy segtree

View lazy-segtree-meet
# Basic segtree (prerequisite)
Given n values `a[1], ..., a[n]`, you entertain two types of queries:
- point update: add `x` to the i-th value
- range query: query minimum value of `a[i]` in the range `l, r`
LIVE CODE.
# Simple lazy segtree
@GaurangTandon
GaurangTandon / questions.md
Last active Oct 22, 2020
Questions for Lazy Segtree Meet
View questions.md

Basic segtree (prerequisite)

Given n values a[1], ..., a[n], you entertain two types of queries:

  • point update: add x to the i-th value
  • range query: query minimum value of a[i] in the range l, r

Around 5 mins max. LIVE CODE.

Simple lazy segtree

View privacy_policy_no_data.md

Expansive Tech Quiz

Google assisstant action, created June 2019

We do not collect any data. No personal data of the user is ever even involved in any way from the moment the app runs till the moment it is closed. This is literally a simple general tech GK quiz. We do not have any of your data, hence, we cannot share it with anyone.

@GaurangTandon
GaurangTandon / MarkdownShortcutsSE.user.js
Last active Jun 14, 2018
easily insert common (cuztomizable) LaTeX shortcuts
View MarkdownShortcutsSE.user.js
// ==UserScript==
// @name Markdown Shortcuts for StackExchange
// @version 0.1
// @description easily insert common (cuztomizable) LaTeX shortcuts
// @author Gaurang Tandon
// @match *://*.askubuntu.com/*
// @match *://*.mathoverflow.net/*
// @match *://*.serverfault.com/*
// @match *://*.stackapps.com/*
// @match *://*.stackexchange.com/*
@GaurangTandon
GaurangTandon / Comment keyboard shortcuts.user.js
Last active Jun 12, 2018
Bold, italics, link, and custom shortcuts for comments in Stack Exchange
View Comment keyboard shortcuts.user.js
// ==UserScript==
// @name Comment Keyboard shortcuts
// @version 0.1
// @description Bold, italics, link, and custom shortcuts for comments in Stack Exchange
// @author Gaurang Tandon
// @match *://*.askubuntu.com/*
// @match *://*.mathoverflow.net/*
// @match *://*.serverfault.com/*
// @match *://*.stackapps.com/*
// @match *://*.stackexchange.com/*
@GaurangTandon
GaurangTandon / Citation Helper for StackExchange.user.js
Created Jun 9, 2018
beta version of Citation Helper for StackExchange userscript
View Citation Helper for StackExchange.user.js
// ==UserScript==
// @name Citation Helper for StackExchange
// @description Helps insert citations easily on StackExchange
// @author Gaurang Tandon
// @match *://*.askubuntu.com/*
// @match *://*.mathoverflow.net/*
// @match *://*.serverfault.com/*
// @match *://*.stackapps.com/*
// @match *://*.stackexchange.com/*
// @match *://*.stackoverflow.com/*