This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Install PHP 7.1 | |
sudo update-alternatives --set php /usr/bin/php7.0 | |
sudo apt-get install python-software-properties | |
sudo add-apt-repository ppa:ondrej/php | |
sudo apt-get update | |
sudo apt-get install -y php7.1 | |
php -v | |
PHP 7.1 Modules list (Example) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery(function($) { | |
$('form[data-async]').live('submit', function(event) { | |
var $form = $(this); | |
var $target = $($form.attr('data-target')); | |
$.ajax({ | |
type: $form.attr('method'), | |
url: $form.attr('action'), | |
data: $form.serialize(), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
[ | |
{ | |
"class": "sidebar_label", | |
"color": [0,0,0], | |
"font.bold": false, | |
"font.size": 15, | |
"font.face": "open sans" | |
}, | |
{ | |
"class": "sidebar_label", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
RewriteCond $1 !^(index\.php|resources|assets|robots\.txt) | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule ^(.*)$ index.php?/$1 [L,QSA] | |
# Without mod_rewrite, route 404's to the front controller | |
#ErrorDocument 404 /index.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let gulp = require('gulp'); | |
let concat = require('gulp-concat');// file name concatination | |
let autoprefixer = require('gulp-autoprefixer'); | |
let cleanCSS = require('gulp-clean-css'); //to clean css | |
let sourcemaps = require('gulp-sourcemaps');// for sourcemap | |
let minifyCSS = require('gulp-minify-css'); //minify css | |
let rename = require('gulp-rename'); //file rename | |
let sass = require('gulp-sass'); //sass to css | |
let del = require('del'); // to clean folders |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<IfModule mod_rewrite.c> | |
Header add Access-Control-Allow-Origin: "*" | |
Header add Access-Control-Allow-Methods: "GET,POST,OPTIONS,DELETE,PUT" | |
Header add Access-Control-Allow-Headers: "Content-Type" | |
</IfModule> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
########## Install NGINX ############## | |
# Install software-properties-common package to give us add-apt-repository package | |
sudo apt-get install -y software-properties-common | |
# Install latest nginx version from community maintained ppa | |
sudo add-apt-repository ppa:nginx/stable | |
# Update packages after adding ppa |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
HOST=$(hostname) | |
function install_postfix() { | |
echo | sudo debconf-set-selections <<__EOF | |
postfix postfix/root_address string | |
postfix postfix/rfc1035_violation boolean false | |
postfix postfix/mydomain_warning boolean | |
postfix postfix/mynetworks string 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
A better way to find all empty lines (including ones with whitespace) would be: ^[\s]*?[\n\r]+ |
NewerOlder