When working with docker and laravel with linux distros sometimes the web server container cannot write to log files.
To workaround this you will have to do the following:
$ id -u www-data
<?php | |
$files = glob("*.docx"); | |
foreach ($files as $file) { | |
shell_exec('pandoc "'.$file.'" --wrap=none -t gfm-smart -o "'.str_replace('.docx','.md',$file).'"'); | |
} |
<?php | |
$vat = 0.20; | |
$transactions = Transaction::get(); | |
foreach ($transactions->chunk(5000) as $chunk) { | |
$cases = []; | |
$ids = []; | |
$params = []; | |
<?php | |
FormAccount::whereIdSource(2) | |
->whereIdAccount(215) | |
->addSelect([ | |
'emails_sent_today' => function ($query) { | |
$query | |
->select(DB::raw('COUNT(*)')) | |
->from('emails as outbound') | |
->where('outbound.id_form_account', DB::raw('form_accounts.id')) |
<?php | |
// InventoryEmail Model | |
public function firstReply() | |
{ | |
return $this->belongsTo(InventoryEmail::class, 'first_reply_id', 'id'); | |
} | |
public function scopeWithFirstReply(EloquentBuilder $query) |
When npm tries to install to globally, it tries to install it's packages to the sensible location of /usr/local/
. When you aren't a super user, this gives the warning checkPermissions Missing write access to /usr/local/lib
and error Error: EACCES: permission denied, access '/usr/local/lib'
and fails. Other package installers (such as Python's pip) already ship, at least on Ubuntu, with a concept of a user-specific local directory of ~/.local/
to replace the global /usr/local/
to avoid such warnings.
Thus, let's just reuse this existing convention.
Step 1: Configure NPM
npm config set prefix ~/.local
Raw puppeteer response : {"error":"net::ERR_TUNNEL_CONNECTION_FAILED at https://www.kijiji.ca/t-login.html"} | |
Error in puppeteer script : net::ERR_TUNNEL_CONNECTION_FAILED at https://www.kijiji.ca/t-login.html | |
Header retry #1 | |
Raw puppeteer response : {"error":"net::ERR_TUNNEL_CONNECTION_FAILED at https://www.kijiji.ca/t-login.html"} | |
Error in puppeteer script : net::ERR_TUNNEL_CONNECTION_FAILED at https://www.kijiji.ca/t-login.html | |
Header retry #2 | |
Raw puppeteer response : {"error":"net::ERR_TUNNEL_CONNECTION_FAILED at https://www.kijiji.ca/t-login.html"} | |
Error in puppeteer script : net::ERR_TUNNEL_CONNECTION_FAILED at https://www.kijiji.ca/t-login.html | |
Header retry #3 | |
Raw puppeteer response : {"error":"net::ERR_TUNNEL_CONNECTION_FAILED at https://www.kijiji.ca/t-login.html"} |
<?php | |
/** | |
* Config for PHP-CS-Fixer ver2 | |
*/ | |
$rules = [ | |
'@PSR2' => true, | |
// addtional rules |
# custom WebStorm VM options, this configuration also works well for other IDEs like phpstorm, pycharm..etc. | |
-Xms1024m | |
-Xmx2048m | |
-XX:ReservedCodeCacheSize=240m | |
-XX:+UseConcMarkSweepGC | |
-XX:SoftRefLRUPolicyMSPerMB=50 | |
-ea | |
-Dsun.io.useCanonCaches=false | |
-Djava.net.preferIPv4Stack=true |