Skip to content

Instantly share code, notes, and snippets.

View bpocallaghan's full-sized avatar

Ben-Piet O'Callaghan bpocallaghan

View GitHub Profile
@BenSampo
BenSampo / deploy.sh
Last active July 4, 2024 12:27
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
@bpocallaghan
bpocallaghan / class.js
Created March 20, 2018 08:05
Javascript Class.js snippet
/*
* MyClass
*/
var MyClass = function (options)
{
/*
* Variables accessible
* in the class
*/
@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
@nasrulhazim
nasrulhazim / readme.md
Last active September 3, 2018 04:45
Using Middleware to Check Account Activation and Resend Activation E-mail
@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 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
@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