Skip to content

Instantly share code, notes, and snippets.

View apotek's full-sized avatar

K Widholm apotek

View GitHub Profile
@apotek
apotek / find-elements-off-right-side.js
Created March 12, 2024 16:37 — forked from agarzola/find-elements-off-right-side.js
Find elements rendered off the right side of the viewport
// Copy the code below, paste it into the browser console, and press enter. It
// will return an array of elements rendered off the right side of the viewport.
Array.from(document.querySelectorAll('*')).reduce((results, element) => {
const rect = element.getBoundingClientRect();
if ((rect.width + rect.left) > window.innerWidth) results.push(element);
return results;
}, []);
@apotek
apotek / better-git-branch.sh
Created February 26, 2024 16:03 — forked from schacon/better-git-branch.sh
Better Git Branch output
#!/bin/bash
# Colors
RED='\033[0;31m'
GREEN='\033[0;32m'
NO_COLOR='\033[0m'
BLUE='\033[0;34m'
YELLOW='\033[0;33m'
NO_COLOR='\033[0m'
@apotek
apotek / Setup GitHub issue labels script
Created February 5, 2016 21:37 — forked from adamreisnz/Setup GitHub issue labels script
A terminal script to setup GitHub issue labels for a project.
Setup GitHub issue labels script