New Bits On The Blog

Thougs, stories, ideas and how-to's. Mostly on web development.

PHP Composer crashes while updating

by Catalin in Php

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 yo ...

Easy to use Browser Geo Location Script

by Catalin in Javascript

Recently, I have been in need to use a geo location feature for a small tool for finding nearby doctors. Here you can find the HTML and the Javascript doing the work for me

Prevent Firefox startup freeze when using multiple tabs

by Catalin in Firefox

By default, when starting up Firefox it will reload all tabs inside, including pinned tabs. This is crazy sometimes if you have a lot of such tabs (I do :P mostly I use this as temporary bookmark/return to some page in a short time or for Gmail tabs) There are these preferences f ...

Helpful CURL usage examples

by Catalin in Curl

Some nice advice and tutorials, well explained about using CURL found on

PHP convert CSV to associative arrays

by Catalin in Php

Something handy when importing CSV files: 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 )

Yii - bypassing beforeSave()

by Catalin in Php

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 upda ...