Skip to content

Instantly share code, notes, and snippets.

View masdimdev's full-sized avatar

Dimas masdimdev

View GitHub Profile
@masdimdev
masdimdev / select2-cascade.js
Created April 9, 2018 07:48 — forked from ajaxray/ select2-cascade.js
Making Select2 (4.x) list boxes cascading / dependent. Options of a select2 list box will be loaded/refreshed by ajax based on selection of another select2 list box.
/**
* A Javascript module to loadeding/refreshing options of a select2 list box using ajax based on selection of another select2 list box.
*
* @url : https://gist.github.com/ajaxray/187e7c9a00666a7ffff52a8a69b8bf31
* @auther : Anis Uddin Ahmad <anis.programmer@gmail.com>
*
* Live demo - https://codepen.io/ajaxray/full/oBPbQe/
* w: http://ajaxray.com | t: @ajaxray
*/
var Select2Cascade = ( function(window, $) {
@masdimdev
masdimdev / laravel-file-permission-apache.md
Created January 9, 2018 04:14 — forked from agasigp/laravel-file-permission-apache.md
Laravel file permission on apache

Laravel File Permission on Apache

  1. Set the owner & group of file & folder to apache user (www-data)
sudo chown -R www-data:www-data /path/to/your/root/directory
sudo chown -R www-data:www-data /path/to/your/root/directory
  1. Add user to the webserver user group
sudo usermod -a -G www-data ubuntu
@masdimdev
masdimdev / Laravel PHP7 LEMP.md
Last active April 3, 2017 11:49 — forked from santoshachari/Laravel PHP7 LEMP AWS.md
Laravel 5.x on Ubuntu 14.x, PHP 7.x, Nginx 1.9.x

#Steps to install latest Laravel, LEMP on AWS Ubuntu 14.4 version. This tutorial is the improvised revision of this tutorial on Digitalocean based on my experience.

Install PHP 7 on Ubuntu

Run the following commands in sequence.

sudo apt-get install -y language-pack-en-base software-properties-common python-software-properties
sudo LC_ALL=en_US.UTF-8 add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install -y zip unzip php7.0 php7.0-fpm php7.0-mysql php7.0-zip php7.0-gd nginx git