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
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).

#!/bin/sh
git clone --depth 1 https://github.com/Rod911/ci_init.git .
sleep 1
rm -rf .git
sleep 1
git init
echo "Creating Commit, please wait"
git add --all
git commit -m "Initial Commit"
@Rod911
Rod911 / create-popup.markdown
Created January 4, 2023 10:35
Create Popup
@Rod911
Rod911 / copy.sh
Last active April 29, 2023 18:04
Create zip file of git changes in working directory
#!/bin/bash
CURRENT=`pwd`
BASENAME=`basename "$CURRENT"`
ZIPPATH="D:/xampp74/htdocs/modified-files"
mkdir -p $ZIPPATH/$BASENAME
if [ -e $ZIPPATH/$BASENAME.zip ]
then