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
sudo chown -R $USER:www-data . | |
sudo find . -type f -exec chmod 664 {} \; | |
sudo find . -type d -exec chmod 775 {} \; | |
sudo chgrp -R www-data storage bootstrap/cache | |
sudo chmod -R ug+rwx storage bootstrap/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
location / { | |
try_files $uri $uri/ /index.php$is_args$args; | |
} | |
do not use | |
try_files $uri $uri/ /index.php?$query_string; else $request brings back nothing in controllers | |
https://serverfault.com/questions/231578/nginx-php-fpm-where-are-my-get-params/362924#362924 |
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
if ($request->hasFile('file')) { | |
$file = $request->file('file'); | |
$filePath = $file->store('uploads'); | |
$signature = file_get_contents('phar://' . storage_path('app/' . $filePath) . '/.signature'); | |
if ($signature !== 'GBMB') { | |
// Invalid PHAR file | |
Storage::delete($filePath); | |
// Handle 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
if ($_FILES['file']['error'] !== UPLOAD_ERR_OK) { | |
// Handle upload error | |
} | |
$filePath = $_FILES['file']['tmp_name']; | |
$signature = file_get_contents('phar://' . $filePath . '/.signature'); | |
if ($signature !== 'GBMB') { | |
// Invalid PHAR file | |
} |
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
ini_set('default_socket_timeout', 600); | |
ini_set('soap.wsdl_cache_enabled',0);//prevent 504 bad getway when conecting to soap | |
ini_set('soap.wsdl_cache_ttl',0); | |
/etc/nginx/nginx.conf | |
inside http | |
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
{ | |
"presets": [ | |
"@babel/preset-env" | |
] | |
} |
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
<template> | |
<input v-model="county" @input="filterCounty()"> | |
<ul> | |
<li v-for="result in results" :key="result"> | |
{{ result.replace(/(?:^|\s)\S/g, function(letter) { return letter.toUpperCase() }) }} | |
</li> | |
</ul> |
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
src https://stackoverflow.com/questions/48122220/phpspreadsheet-where-is-phpexcel-worksheet-drawing | |
use PhpOffice\PhpSpreadsheet\Spreadsheet as spreadsheet; // instead PHPExcel | |
use PhpOffice\PhpSpreadsheet\Writer\Xlsx as xlsx; // Instead PHPExcel_Writer_Excel2007 | |
use PhpOffice\PhpSpreadsheet\Worksheet\Drawing as drawing; // Instead PHPExcel_Worksheet_Drawing | |
use PhpOffice\PhpSpreadsheet\Style\Alignment as alignment; // Instead PHPExcel_Style_Alignment | |
use PhpOffice\PhpSpreadsheet\Style\Fill as fill; // Instead PHPExcel_Style_Fill | |
use PhpOffice\PhpSpreadsheet\Style\Color as color_; //Instead PHPExcel_Style_Color | |
use PhpOffice\PhpSpreadsheet\Worksheet\PageSetup as pagesetup; // Instead PHPExcel_Worksheet_PageSetup | |
use PhpOffice\PhpSpreadsheet\IOFactory as io_factory; // Instead PHPExcel_IOFactory |
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 | |
namespace {{ namespace }}; | |
use Illuminate\Foundation\Http\FormRequest; | |
// run php artisan stub:publish first | |
class {{ class }} extends FormRequest | |
{ | |
/** | |
* @param null $keys |
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
sed -i -E 's/(CipherString\s*=\s*DEFAULT@SECLEVEL=)2/\11/' /etc/ssl/openssl.cnf |
NewerOlder