Skip to content

Instantly share code, notes, and snippets.

View orvigas's full-sized avatar
🎯
Focusing

Orlando Villegas Galán orvigas

🎯
Focusing
View GitHub Profile
@orvigas
orvigas / UploadReadAheadSize.txt
Last active May 8, 2018 16:46
Solve IIS 8.5 Error message "The page was not displayed because the request entity is too large"
This is a quick overview about te IIS 8.5 error message "The page was not displayed because the request entity is too large", Our team
was trying to publish a PHP app on IIS server, in this app our team was working on the improvement of app folder structure, after that
when some clients was trying to work with it, the app had been throwing "The page was not displayed because the request entity is too
large" as response.
After an extensive search on the web we found a solution:
Command: appcmd.exe set config -section:system.webserver/serverruntime/uploadreadaheadsize: 1048576 /commit:apphost
IIS Manager: <Server Instance> -> Management -> Configuration editor -> System.webServer -> serverRuntime -> UploadReadAheadSize, set 1048576
@orvigas
orvigas / hasKey.js
Last active April 29, 2018 15:33
Function to look for a key inside a complex object in Javascript
/**
* This function allows to search a especific key in a complex object
* @author orvigas@gmail.com
* @param (Object) o: Object in which you look for the key
* @param (string) key: Name of key you're looking for
* @return (mixed) $r: Return object or value related with key name,
* instead if key were not found it return undefined
*/
function hasKey(o, key) {
@orvigas
orvigas / .htaccess
Last active November 18, 2020 13:06
1&1 Hosting error 500 on Laravel 5.4 API
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews -Indexes
</IfModule>
RewriteEngine On
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
@orvigas
orvigas / improve_performance_wamp.txt
Last active April 4, 2018 18:21
Improve performance of WAMP server with Laravel 5.* API
This way helps to improve the performance of a WAMP server under Windows 10 64 bits, using Laravel 5.4 API
Changes:
httpd.conf
-EnableMMAP on
-EnableSendfile on
-Include conf/extra/httpd-mpm.conf
-AcceptFilter http none
-AcceptFilter https none
@orvigas
orvigas / arraySum.php
Created January 31, 2018 21:47
Function to sum two arrays in php
<?php
/**
* Function to sum two arrays
*
* @param array $a First array to merge
* @param array $b Second array to merge which gonna be returned by function
*
* @author Orlando Villegas Galán <orvigas@gmail.com>
* @return $b
*/