Skip to content

Instantly share code, notes, and snippets.

View Rod911's full-sized avatar
Working from home

Malcolm Rodrigues Rod911

Working from home
View GitHub Profile
Rod911 / 1.readme.markdown
Last active September 15, 2023 06:03
Lazy load iframes using IntersectionObserver

Lazy load iframes using IntersectionObserver

Iframes with loading="lazy" attribute will still send network requests when they have not entered the browser's viewport. Setting the src attribute only after they reach the viewport ensures the page loads quickly (Noticeable when embedding Youtube or Google Maps iframes).

git clone --depth 1 .
sleep 1
rm -rf .git
sleep 1
git init
echo "Creating Commit, please wait"
git add --all
git commit -m "Initial Commit"
Rod911 / create-popup.markdown
Created January 4, 2023 10:35
Create Popup
Rod911 /
Last active April 29, 2023 18:04
Create zip file of git changes in working directory
BASENAME=`basename "$CURRENT"`
if [ -e $ZIPPATH/$ ]