Configure PHP Lumen 5 HTTP Exception Handlers with common JSON responses.
Copy (replace) only the attached files to their respective directories. app/Exceptions/Handler.php
and app/Http/Middleware/Authenticate.php
var settings = { | |
max_width: 600, | |
max_height: 200 | |
} | |
resize_image = function(img){ | |
var ctx = canvas.getContext("2d") | |
var canvasCopy = document.createElement("canvas") | |
var copyContext = canvasCopy.getContext("2d") |
Configure PHP Lumen 5 HTTP Exception Handlers with common JSON responses.
Copy (replace) only the attached files to their respective directories. app/Exceptions/Handler.php
and app/Http/Middleware/Authenticate.php
<?php | |
/** | |
* When using the WordPress Importer, update existing | |
* posts instead of skipping them. Updates content according | |
* to the import file even if the existing post was updated | |
* more recently. | |
* | |
* To use, drop this file into your /mu-plugins/ folder or | |
* copy this code into your functions.php file. |
Here are the simple steps needed to create a deployment from your local GIT repository to a server based on this in-depth tutorial.
You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like deepl.io to act upon a Web-Hook that's triggered that service.
Remove all block comments and line comments: | |
(/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+/|[ \t]*//.*) | |
Remove block comments: | |
(/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+/) | |
Remove line comments: | |
([ \t]*//.*) | |
<?php | |
date_default_timezone_set('America/Sao_Paulo'); | |
setlocale(LC_ALL, 'pt_BR.utf-8', 'ptb', 'pt_BR', 'portuguese-brazil', 'portuguese-brazilian', 'bra', 'brazil', 'br'); | |
setlocale(LC_TIME, 'pt_BR.utf-8', 'ptb', 'pt_BR', 'portuguese-brazil', 'portuguese-brazilian', 'bra', 'brazil', 'br'); |