Skip to content

Instantly share code, notes, and snippets.

@AananthV
AananthV / vh.js
Last active September 3, 2021 02:38
Mobile vh hack
// First we get the viewport height and we multiple it by 1% to get a value for a vh unit
let vh = window.innerHeight 0.01;
// Then we set the value in the vh custom property to the root of the document
document.documentElement.style.setProperty('--vh', `${vh}px`);
// We listen to the resize event
window.addEventListener('resize', () => {
// We execute the same script as before
vh = window.innerHeight * 0.01;
@AananthV
AananthV / FAQ.md
Last active April 6, 2020 12:03
Delta Summer Mentorship FAQ

Detla Summer Mentorship FAQ

General

Q. Help, I missed the mentorship briefing!

A. You can watch the briefing here.

Q. Do I need a laptop to partake?

A. We highly recommened completing the tasks given during the mentorship if you have access to a laptop. (Even an old computer is fine, we will help you speed things up!). However, we also have something in store for those without acess to any computer.

@AananthV
AananthV / sort_timing_visualizer.py
Created November 1, 2019 17:04
Plotting the Time Complexities of various sorting algorithms in python
import time
import numpy as np
import matplotlib.pyplot as plt
#########################################
## Selection Sort #######################
def selectionSort(alist):
for i in range(len(alist)):