I think i found a bug in handling of queue jobs in Laravel. If I run laravel queue jobs with config cached in laravel, then runtime configs persists between jobs.
Expected result: Second job does not know of runtime config.
{ | |
"name": "napp/gitlab-migration", | |
"require": { | |
"php-http/guzzle6-adapter": "^1.0", | |
"m4tthumphrey/php-gitlab-api": "^9.13" | |
} | |
} |
To use xdebug with macOS and docker is quite, let´s call it tricky ;)
The following steps need to be proceed to get it working:
To bring up the alias at startup, you can either (sudo may be needed here):
## using Ghostscript, poppler-utils & qpdf | |
# gs docs: https://ghostscript.com/doc/9.18/Use.htm#Other_parameters | |
# poppler: https://freedesktop.org/wiki/Software/poppler/ | |
# qpdf docs: http://qpdf.sourceforge.net/files/qpdf-manual.html | |
# optimize pdf to use use CropBox, remove dublicate image refs, compress | |
gs -sDEVICE=pdfwrite -dUseCropBox -dPDFSETTINGS=/ebook -dNOPAUSE -dBATCH -dDetectDuplicateImages=true -sOutputFile=test-out.pdf test.pdf |
<?php | |
public function import(Request $request) | |
{ | |
ini_set('max_execution_time', 300); | |
info("\n\n------------------ NEW ---------------------- "); | |
info("Start import: " . (memory_get_usage()/1024/1024) . " MB"); | |
$before = microtime(true); | |
// use chunk to import the products from CSV |
#!/bin/bash | |
if [ "$EUID" -ne 0 ] | |
then echo "Please run as root" | |
exit | |
fi | |
apt-get install pkg-config libmagickwand-dev -y | |
cd /tmp | |
wget https://pecl.php.net/get/imagick-3.4.0.tgz | |
tar xvzf imagick-3.4.0.tgz |
<?php | |
use Illuminate\Console\Command; | |
use Symfony\Component\Console\Input\InputOption; | |
use Symfony\Component\Console\Input\InputArgument; | |
class ClearBeanstalkdQueueCommand extends Command { | |
/** |
This can reduce files to ~15% of their size (2.3M to 345K, in one case) with no obvious degradation of quality.
ghostscript -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/printer -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf
Other options for PDFSETTINGS:
$.listView.addEventListener("contextMenuClick", function(e){ | |
alert( "You clicked on menu item " + e.index + " - CollectionView item " + e.itemIndex ); | |
}); | |
$.listView.addEventListener("pull", function(e){ | |
Ti.API.info(e); | |
}); | |
$.listView.addEventListener("pullend", function(e){ |
// | |
// Start the app while being offline | |
// Then after these requests have been cache - go back online | |
// | |
// require this lib | |
var HTTPHelper = require("networkHelper"); | |
// the http request will auto try to send queued requests when being online again | |
HTTPHelper.httpRequest({ |