Skip to content

Instantly share code, notes, and snippets.

View bpocallaghan's full-sized avatar

Ben-Piet O'Callaghan bpocallaghan

View GitHub Profile
@rap2hpoutre
rap2hpoutre / laravel-forge-deploy.sh
Last active March 28, 2024 15:45
Laravel Forge deploy script without downtime
# stop script on error signal
set -e
# remove old deployment folders
if [ -d "/home/forge/deploy" ]; then
rm -R /home/forge/deploy
fi
if [ -d "/home/forge/backup" ]; then
rm -R /home/forge/backup
fi
@nasrulhazim
nasrulhazim / readme.md
Last active June 2, 2021 19:42
Send Welcome Email Notification with Event and Listener

Send Welcome Email Notification with Event and Listener

Step 1

Create SendWelcomeEmailNotification notification

php artisan make:notification SendWelcomeEmailNotification
@nasrulhazim
nasrulhazim / readme.md
Last active September 3, 2018 04:54
Enable Account Activation in Order to Login to the System.
@nasrulhazim
nasrulhazim / readme.md
Last active September 3, 2018 04:45
Using Middleware to Check Account Activation and Resend Activation E-mail
@bpocallaghan
bpocallaghan / hosts
Last active November 19, 2017 14:25
Apache Virtual Host (Windows)
# location - C:\Windows\System32\drivers\etc
127.0.0.1 localhost
# add the following line (to allow to enter laravel-admin.dev in your browser)
127.0.0.1 laravel-admin.dev
@bpocallaghan
bpocallaghan / class.js
Created March 20, 2018 08:05
Javascript Class.js snippet
/*
* MyClass
*/
var MyClass = function (options)
{
/*
* Variables accessible
* in the class
*/
@BenSampo
BenSampo / deploy.sh
Last active November 13, 2024 14:47
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