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
curl \ | |
--proxy proxy_host:proxy_port \ | |
--proxy-user proxy_user:proxy_pass \ | |
https://lumtest.com/myip.json |
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
# composer install via docker | |
$ docker run --rm -v $(pwd):/app composer:latest install --ignore-platform-reqs |
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
ssh -N -L 3306:127.0.0.1:3306 [USER]@[SERVER_IP] |
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 App\Http\Requests; | |
use App\Rules\MaxVideoBitRate; | |
use Illuminate\Foundation\Http\FormRequest; | |
class VideoUploadRequest extends FormRequest | |
{ | |
/** |
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 App\Rules; | |
use Illuminate\Contracts\Validation\Rule; | |
use FFMpeg\FFMpeg; | |
class MaxVideoBitRate implements Rule | |
{ | |
protected $maxBitRate; |
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
UPDATE user_assets AS ua | |
INNER JOIN ( | |
SELECT | |
ua.user_id, | |
ua.instance_id, | |
uas.state, | |
uas.payload, | |
uas.history | |
FROM user_assets AS ua | |
LEFT JOIN user_asset_states AS uas ON uas.user_id = ua.user_id AND uas.instance_id = ua.instance_id |
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 | |
function getDevice(){ | |
$device = []; | |
if(preg_match('/(iPhone|iPod|iPad|Android)/', $_SERVER['HTTP_USER_AGENT'], $device)){ | |
return $device[0]; | |
} | |
return ''; | |
} |