This file contains hidden or 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
Route::get('{any}', function($url){ | |
return Redirect::to(mb_substr($url, 0, -1), 301); | |
})->where('any', '(.*)\/$'); |
This file contains hidden or 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
if ($image_w < $image_h) | |
{ | |
//portrait | |
$height = $max_height; | |
$width = round( $height*($image_w/$image_h) ); | |
} | |
if($image_w => $image_h) | |
{ | |
//landscape | |
if($image_h < ($image_w/2)) |
This file contains hidden or 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
if (cluster.isMaster) { | |
var cpus = os.cpus().length; | |
var worker; | |
/* start up the HTTP servers */ | |
process.env.HTTP_WORKER = "1"; | |
for (var i = 0; i < cpus; i++) { | |
worker = cluster.fork(); | |
worker.isHTTP = true; | |
} |
NewerOlder