Skip to content

Instantly share code, notes, and snippets.

Working from home

Faizal Nugraha fzldn

Working from home
View GitHub Profile
fzldn /
Created Jul 30, 2022
script for deploy laravel project with compile mix
export NVM_DIR=~/.nvm
source ~/.nvm/
cd /var/www/html
git pull
composer install
fzldn /
Created Jun 20, 2022
Install previous versions of Laravel using composer
composer create-project laravel/laravel your-project-name 8.0
fzldn / beautifier.js
Last active Feb 18, 2022
VS Code Laravel Blade formatter using extension Beautify 1.5.0 by HookyQR with js-beautify hacks
View beautifier.js
Beautifier.prototype.beautify = function() {
var source_text = this._source_text;
source_text = source_text.replace(/\{\{(--)?((?:(?!(--)?\}\}).)+)(--)?\}\}/g, function(m, ds, c, dh, de) {
cd /var/www/html/laravel
sudo chown -R $USER:www-data .
sudo find . -type f -exec chmod 664 {} \;
sudo find . -type d -exec chmod 775 {} \;
sudo chgrp -R www-data storage bootstrap/cache
sudo chmod -R ug+rwx storage bootstrap/cache
fzldn / phpcs.xml
Last active Dec 23, 2019
Laravel Coding Standard configuration
View phpcs.xml
<?xml version="1.0"?>
<ruleset name="Laravel Standards">
The name attribute of the ruleset tag is displayed
when running PHP_CodeSniffer with the -v command line
argument. The description tag below is not displayed anywhere
except in this file, so it can contain information for
developers who may change this file in the future.