Composer killed while updating

I was running a small Digital Ocean server (512 MB RAM) for a side project and got to the problem that I could not use composer update after pushing changes related to the use of new packages. Fortunately, I got into this that saved the day. I am sharing it, maybe it will save yours. … 

If you like this and find it useful please consider sharing it! Cheers!Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn
 

PHP convert CSV to associative arrays

<?php $csv = array_map(‘str_getcsv’, file($file)); array_walk($csv, function(&$a) use ($csv) { $a = array_combine($csv[0], $a); }); array_shift($csv); # remove column header ?> This will yield something like this – keys are the fields/ table header of the CSV file. [2] => Array ( [Campaign ID] => 295095038 [Ad group ID] => 22460178158 [Keyword ID] => 3993587178 … 

If you like this and find it useful please consider sharing it! Cheers!Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn
 

Helpful CURL usage examples

Some nice advice and tutorials, well explained about using CURL found on gist.github.com/subfuzion/08c5d85437d5d4f00e58 If you like this and find it useful please consider sharing it! Cheers!

If you like this and find it useful please consider sharing it! Cheers!Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn
 

Started learning NodeJS

I’ve been into PHP programming for 10 years now. I decided to start learning NodeJS for a side project that I am rewriting and got from¬†https://github.com/sergtitov/NodeJS-Learning¬†to this interesting comparison¬†between PHP and NodeJS from¬†https://webapplog.com/php-vs-node-js/ Another comparison I have found is from SitePoint¬†https://www.sitepoint.com/sitepoint-smackdown-php-vs-node-js/ The GitHub repo above has a lot of interesting tutorials and starting points, a … 

If you like this and find it useful please consider sharing it! Cheers!Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn
 

Clean Code Concepts Adapted for PHP

Clean Code PHP (jupeter/clean-code-php), is a guide based on the book Clean Code: A Handbook of Agile Software Craftmanship, a classic programming book about writing maintainable code by Uncle Bob Martin. Learn more about it from this Laravel News post If you like this and find it useful please consider sharing it! Cheers!

If you like this and find it useful please consider sharing it! Cheers!Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn
 

Yii – bypassing beforeSave()

If you have defined in your model some “actions” / “mutators” in your,¬†beforeSave method there is a simple way to prevent that these actions to take place in certain cases when you need that. For example,¬†having a Company model and a field, ¬†unpaid_invoices_count¬†that¬†you are updating during each saving. If you want that in a certain … 

If you like this and find it useful please consider sharing it! Cheers!Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn