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.laravel-hostinger.md
Last active April 19, 2025 09:36
Deploy a laravel application on hostinger using ssh

Set up laravel application in hostinger shared hosting

Step 1: Install Composer

Install composer if not already installed, check composer --version or composer2 --version in cli skip to step 2 if it is.
Some Installations come preinstalled with both composer and newer versions of composer with alias composer2, in which case use composer2 for all comopser tasks

php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('sha384', 'composer-setup.php') === 'dac665fdc30fdd8ec78b38b9800061b4150413ff2e3b6f88543c636f7cd84f6db9189d43a81e5503cda447da73c7e5b6') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
@Rod911
Rod911 / 1.readme.markdown
Last active September 9, 2024 11:33
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