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
#!/bin/bash | |
find ./media -mmin -1440 -type f -iname '*.gif' -exec sh -c 'gifsicle -b -O3 "{}"' \; | |
find ./media -mmin -1440 -type f -iname '*.png' -exec optipng -o7 -strip all -preserve '{}' \; | |
find ./media -mmin -1440 -type f -iname '*.jpg' -exec jpegoptim --strip-all -m85 -o -p {} \; |
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
desc('Tail your laravel.log file'); | |
task('tail', function () { | |
$numLines = isVerbose() ? '100' : '1000'; | |
$tail = "tail -n {$numLines} {{deploy_path}}/current/storage/logs/laravel*.log "; | |
if (!isVerbose()) { | |
// Change -P to -E, depending on OS or grep version. | |
$tail .= '| grep -i -P "^\[\d{4}\-\d{2}\-\d{2} \d{2}:\d{2}:\d{2}\]|Next [\w\W]+?\:" | tail -n 100 '; | |
} | |
$output = run($tail); |
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
<?php | |
namespace App\Libraries\Queue; | |
use Illuminate\Events\Dispatcher; | |
use Illuminate\Queue\DatabaseQueue; | |
use Illuminate\Support\Str; | |
use Laravel\Horizon\Events\JobDeleted; | |
use Laravel\Horizon\Events\JobPushed; | |
use Laravel\Horizon\Events\JobReleased; |
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
# Rewrite the WS requests | |
RewriteCond %{REQUEST_URI} ^/socket.io [NC] | |
RewriteCond %{QUERY_STRING} transport=websocket [NC] | |
RewriteRule /(.*) ws://localhost:6001/$1 [P,L] | |
# Rewrite the HTTP requests | |
ProxyPass /socket.io http://localhost:6001/socket.io | |
ProxyPassReverse /socket.io http://localhost:6001/socket.io | |
# For API requests |
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
"require-dev": { | |
"barryvdh/laravel-debugbar": "^3", | |
"barryvdh/laravel-ide-helper": "^2.4", | |
"filp/whoops": "~2.0", | |
"mockery/mockery": "^1.0", | |
"nikic/php-parser": "^4.0", | |
"nunomaduro/collision": "^1.0", | |
"phpro/grumphp": "^0.14.2", | |
"phpunit/phpunit": "~7.0", | |
"sensiolabs/security-checker": "^5.0", |
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
diff --git a/DB/Adapter/Pdo/Mysql.php b/DB/Adapter/Pdo/Mysql.php | |
index 1449d6d..38085a3 100644 | |
--- a/DB/Adapter/Pdo/Mysql.php | |
+++ b/DB/Adapter/Pdo/Mysql.php | |
@@ -2904,7 +2904,7 @@ class Mysql extends \Zend_Db_Adapter_Pdo_Mysql implements AdapterInterface | |
if (isset($condition['to'])) { | |
$query .= empty($query) ? '' : ' AND '; | |
$to = $this->_prepareSqlDateCondition($condition, 'to'); | |
- $query = $this->_prepareQuotedSqlCondition($query . $conditionKeyMap['to'], $to, $fieldName); | |
+ $query = $query . $this->_prepareQuotedSqlCondition($conditionKeyMap['to'], $to, $fieldName); |
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
image: smartapps/bitbucket-pipelines-debian-10 | |
pipelines: | |
branches: | |
master: | |
- step: | |
name: Deploy Test | |
deployment: test | |
script: | |
- composer install --no-interaction --no-progress --prefer-dist |
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
echo ">> Follow install based on https://docs.docker.com/engine/install/ubuntu/" | |
echo ">> Update the apt package index and install packages to allow apt to use a repository over HTTPS:" | |
apt-get update | |
apt-get -y install \ | |
apt-transport-https \ | |
ca-certificates \ | |
curl \ | |
gnupg \ | |
lsb-release |
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
<?php | |
namespace App\Services; | |
use Carbon\Carbon; | |
use Closure; | |
use GuzzleHttp\Exception\RequestException; | |
use GuzzleHttp\HandlerStack; | |
use GuzzleHttp\Promise; | |
use Illuminate\Http\Client\Events\ConnectionFailed; |
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
<?php | |
namespace App\Http\Client; | |
use GuzzleHttp\Promise; | |
use Illuminate\Http\Client\Events\ConnectionFailed; | |
use Illuminate\Http\Client\Events\RequestSending; | |
use Illuminate\Http\Client\Events\ResponseReceived; | |
use Illuminate\Http\Client\Request; | |
use Illuminate\Http\Client\Response; |