Skip to content

Instantly share code, notes, and snippets.

View jamaluddinrumi's full-sized avatar

Jamaluddin Rumi jamaluddinrumi

View GitHub Profile
@jamaluddinrumi
jamaluddinrumi / detect-overflow.js
Created August 14, 2024 04:18
Detect overflowing elements on a web page
const issues = [];
function warn(el) {
// Style the detected issues
el.style.outline = '2px solid #FFCC00';
el.style.backgroundColor = '#FFCC00';
el.style.backgroundImage = 'linear-gradient(135deg, rgba(255,0,0,1) 0%, rgba(255,204,0,1) 35%, rgba(0,212,255,1) 100%)';
}
function checkScrollingAncestor(elem) {
@jamaluddinrumi
jamaluddinrumi / move_mouse.py
Created May 26, 2017 00:14
Keyboard Shortcut - Switch Focus Between Multiple Monitors
#!/usr/bin/env python3
import subprocess
import sys
arg = sys.argv[1]
screeninfo = [
s for s in subprocess.check_output("xrandr").decode("utf-8").split()\
if s.count("+") == 2
]