Skip to content

Instantly share code, notes, and snippets.

View mohamed-foly's full-sized avatar
💭
programmed to be fine :)

Mohamed Mostafa mohamed-foly

💭
programmed to be fine :)
View GitHub Profile
@YasienDwieb
YasienDwieb / rsync-scp.sh
Last active March 27, 2022 12:32
Sync files with remote server while excluding .git folder
#!/bin/bash
if [ $# -lt 2 ]
then
echo "Usage: $0 <src> <dst> [any-rsync-option]"
exit
fi
rsync -aruvzp --progress --exclude='.git/' $@
@YasienDwieb
YasienDwieb / isomaker.sh
Last active October 20, 2019 12:52
Bulk iso files maker useful for courses archiving for easy transfer and quick view
#!/bin/bash
if [ -z $2 ]; then
echo $0" <source-dir/> <dist-dir/>"
exit
fi
IFS=$'\n'
SOURCE=$1
DEST=$2
for dir in `ls $SOURCE |rev |cut -d '/' -f1 |rev`;do
@mreschke
mreschke / nginx.conf
Last active January 3, 2025 07:03
Nginx config for multiple laravel sites based on /api/v1 url paths
# This config will host your main [Laravel] GUI application at /, and any additional [Lumen] webservices at /api/v1 and /api/v2...
# This also works perfectly for all static file content in all projects
# This is full of debug comments so you can see how to print debug output to browser! Took me hours to nail this perfect config.
# Example:
# http://example.com - Main Laravel site as usual
# http://example.com/about - Main Laravel site about page as usual
# http://example.com/robots.txt - Main Laravel site static content as usual
# http://example.com/api/v1 - Lumen v1 api default / route
# http://example.com/api/v1/ - Lumen v1 api default / route