Skip to content

Instantly share code, notes, and snippets.

View mcanvar's full-sized avatar
🛵
Scootering in the wonderland.

Mevlüt Canvar mcanvar

🛵
Scootering in the wonderland.
View GitHub Profile
@BenSampo
BenSampo / deploy.sh
Last active May 11, 2025 06:59
Laravel deploy script
# Change to the project directory
cd $FORGE_SITE_PATH
# Turn on maintenance mode
php artisan down || true
# Pull the latest changes from the git repository
# git reset --hard
# git clean -df
git pull origin $FORGE_SITE_BRANCH
@webag
webag / main.js
Created October 30, 2020 08:27
Intersection ovserver video play pause
const videos = document.querySelectorAll("video");
const config = {
rootMargin: '0px -100px',
threshold: 0
}
const callback = (entries) => {
entries.forEach((entry) => {
if (!entry.isIntersecting) {
entry.target.pause();
console.log('Exit video');