sudo usermod -aG www-data $USER
sudo chown -R www-data:www-data /var/www/html/project-name/
| ip() { | |
| case "$1" in | |
| public) | |
| echo "$(curl -s https://api.ipify.org | grep -Eo '([0-9]{1,3}\.){3}[0-9]{1,3}')" | |
| ;; | |
| internal) | |
| ipconfig getifaddr $(route get default 2>/dev/null | awk '/interface: / {print $2}') | |
| ;; | |
| private) | |
| ifconfig | awk '/^(utun|ppp)/ {iface=$1} iface && $1 == "inet" && $2 ~ /^10\./ {print $2; exit}' |
| const mix = require("laravel-mix"); | |
| /* | |
| |-------------------------------------------------------------------------- | |
| | Mix Asset Management | |
| |-------------------------------------------------------------------------- | |
| | | |
| | Mix provides a clean, fluent API for defining some Webpack build steps | |
| | for your Laravel applications. By default, we are compiling the CSS | |
| | file for the application as well as bundling up all the JS files. |
| { | |
| ... | |
| "repositories": [ | |
| { | |
| "type": "path", | |
| "url": "packages/vendor/package/", | |
| "symlink": "true" | |
| } | |
| ], | |
| "license": "MIT", |
| <?php | |
| /** Sets up 'direct' method for wordpress, auto update without ftp */ | |
| define('FS_METHOD','direct'); |
| <?php | |
| namespace App\Providers; | |
| use Illuminate\Support\ServiceProvider; | |
| use Illuminate\Support\Facades\Schema; | |
| class AppServiceProvider extends ServiceProvider | |
| { |
| alias html='cd /var/www/html && clear' | |
| alias downloads='cd ~/Downloads && clear' | |
| alias c='clear' | |
| alias ..="cd .." | |
| alias ...="cd ../.." | |
| alias speed='speedtest' | |
| alias chrome="google-chrome $1" |
| RewriteEngine On | |
| RewriteRule ^(.*)$ public/$1 [L] |
| 127.0.0.1 localhost | |
| 127.0.1.1 ASUS-X550LD | |
| 127.0.1.2 laravel-app | |
| # The following lines are desirable for IPv6 capable hosts | |
| ::1 ip6-localhost ip6-loopback | |
| fe00::0 ip6-localnet | |
| ff00::0 ip6-mcastprefix | |
| ff02::1 ip6-allnodes |
| <VirtualHost 127.0.1.2:80> | |
| ServerName laravel-app | |
| DocumentRoot /var/www/html/laravel-app | |
| ErrorLog ${APACHE_LOG_DIR}/error.log | |
| CustomLog ${APACHE_LOG_DIR}/access.log combined | |
| <Directory /var/www/html/laravel-app> | |
| Options All | |
| AllowOverride All |