Skip to content

Instantly share code, notes, and snippets.

@qysp
qysp / .zshrc
Last active June 28, 2024 12:09 — forked from bashbunni/.zshrc
CLI Pomodoro for Linux (using libnotify)
# Utilizes `notify-send` from libnotify which comes pre-installed with some desktop environments (e.g. GNOME or KDE Plasma).
# Documentation: https://wiki.archlinux.org/title/Desktop_notifications
# Available icons: https://specifications.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html
# Requires https://github.com/caarlos0/timer to be installed
# Linux setup for pomo
function work() {
timer -f "${1:-60}m" && notify-send \
--urgency=normal \
@qysp
qysp / inViewport.ts
Last active December 18, 2020 09:36 — forked from MakingJamie/in_viewport.js
check if element is in viewport - vanilla JS. Use by adding a “scroll” event listener to the window and then calling isInViewport().
const inViewport = (element: Element): boolean => {
const rect = element.getBoundingClientRect();
const html = document.documentElement;
return (
rect.top >= 0 &&
rect.left >= 0 &&
rect.bottom <= (window.innerHeight ?? html.clientHeight) &&
rect.right <= (window.innerWidth ?? html.clientWidth)
);
};
# https://www.reddit.com/r/pihole/comments/5eirvy/from_the_smart_tv_thread_in_rtechnology/damgggq
# Samsung TV & appliance block list
#----------------------------------
log-1.samsungacr.com
log-2.samsungacr.com
notice.samsungcloudsolution.com
noticecdn.samsungcloudsolution.com
noticefile.samsungcloudsolution.com
vdterms.samsungcloudsolution.com