- Use local site "app" fodler as root for Laravel
- Create a .env file using info from Local site domain
- CLI Run php artisan key:generate
- CLI Run php artisan config:cache
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
# GZIP COMPRESSION | |
<IfModule mod_deflate.c> | |
# Compress HTML, CSS, JavaScript, Text, XML and fonts | |
AddOutputFilterByType DEFLATE application/javascript | |
AddOutputFilterByType DEFLATE application/rss+xml | |
AddOutputFilterByType DEFLATE application/vnd.ms-fontobject | |
AddOutputFilterByType DEFLATE application/x-font | |
AddOutputFilterByType DEFLATE application/x-font-opentype | |
AddOutputFilterByType DEFLATE application/x-font-otf | |
AddOutputFilterByType DEFLATE application/x-font-truetype |
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
RewriteEngine On | |
RewriteCond %{SERVER_PORT} 80 | |
RewriteRule ^(.*)$ https://www.example.com/$1 [R,L] |
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
<?php | |
add_image_size( 'custom-size', 220, 180 ); // 220 pixels wide by 180 pixels tall, soft proportional crop mode | |
add_image_size( 'custom-size', 220, 180, true ); // 220 pixels wide by 180 pixels tall, hard crop mode | |
add_image_size( 'custom-size', 220, 220, array( 'left', 'top' ) ); // Hard crop left top | |
/* | |
For Media Library Images (Admin): | |
-------------------------------- | |
You can also make your custom sizes selectable from your WordPress admin. |
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
# 📖 WP CLI Auto Completion | |
autoload bashcompinit | |
bashcompinit | |
source ~/wp-completion.bash | |
# 🏷️ System Paths | |
export PATH="$PATH:$HOME/.composer/vendor/bin" | |
export PATH="$PATH:$HOME/.config/composer/vendor/bin" | |
# ZSH Customization |
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
.yoast-settings { | |
display: none; | |
} |
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
/* | |
DataTables JS: How to change pagination button class | |
Read More: http://www.lubus.in/blog/datatables-js-change-pagination-button-class | |
*/ | |
jQuery(document).ready(function($) { | |
// Initialize Datatables | |
$.fn.dataTable.ext.classes.sPageButton = 'button button-primary'; // Change Pagination Button Class | |
$('#lubus-wordcamp').DataTable( { |
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
<?php | |
/** | |
* Facing HTTP Error on wordpress media upload on Godaddy / Shared Host ? This snippet might help you fix issue | |
* For more details about issue: http://www.lubus.in/blog/wordpress-media-upload-http-error-godaddy-shared-hosting-255 | |
**/ | |
/** Change graphic manuplation library used by wordpress **/ | |
add_filter( 'wp_image_editors', 'change_graphic_lib' ); |
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
// This code throws error: logStr is not define | |
swal({ | |
title: "Problem", | |
text: "Problem processing request !", | |
type: "Error" | |
}); | |
// This code works perfect | |
// type argument accepts following: error,success,info,warning | |
// type is case sensitive "Error" in place of "error" will throw error |
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
<?php | |
/* | |
mPDF: Generate PDF from HTML/CSS (Complete Code) | |
*/ | |
require_once( 'mpdf/mpdf.php'); // Include mdpf | |
$stylesheet = file_get_contents('assets/css/pdf.css'); // Get css content | |
$html = '<div id="pdf-content"> | |
Your PDF Content goes here (Text/HTML) | |
</div>'; |
OlderNewer