alias ng="npm list -g --depth=0 2>/dev/null"
alias nl="npm list --depth=0 2>/dev/null"
alias cachemeoutside='php artisan route:clear && php artisan view:clear && php artisan config:clear && php artisan cache:clear && php artisan clear-compiled && composer dump-autoload'
a-rollback () {
if [ -z "$1" ]; then
echo 'php artisan migrate:rollback --step=1'
else
echo "php artisan migrate:rollback --step='$1'"
fi
}
php artisan route:clear && php artisan view:clear && php artisan config:clear && php artisan cache:clear && php artisan clear-compiled && composer dump-autoload
alias mysitelog='tail -f /system/path/to/your/laravel.log'
-exclude-vcs to exclude git -exclude='debugbar' to exclude debugbar json
alias mysitebackup='mysqldump mydatabase > ../pathtoyourbackups/mydatabase.sql; tar -zcvf "/pathtoyourbackups/yourfilename-$(date '+%Y-%m-%d').tar.gz" --exclude='*vendor*' --exclude='*node_modules*' /system/path/to/your/laravel/rootproject'
alias nah="git reset --hard && git clean -df"
function agentkey(){
CURRENT_KEY=$(ssh-add -L)
DEFAULT_MESSAGE="The agent has no identities."
#echo ${#CURRENT_KEY} $the count if needed
#echo $CURRENT_KEY
#echo $DEFAULT_MESSAGE
#if [[ "${#CURRENT_KEY}" -gt 28 ]]; then #this is for counting the default 28 characters of The Agent has no identities.
if [ "$CURRENT_KEY" != "$DEFAULT_MESSAGE" ]; then
#echo "ssh agent is using a key"
else
echo "adding key to ssh agent"
ssh-add
fi
}
#run when starting a new terminal window
agentkey