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 usefull please consider sharing it! Cheers!Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn
 

Easy way to download files via terminal through wetransfer.com

If you are having a big file stored on wetransfer.com, let’s say an archive, and you want to copy it on a remote server, you might think of downloading it on you local computer and move it via FTP on the remote server. But that can take a long time, the alternative is to download … 

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

About throwing away the code and starting over

We’re programmers. Programmers are, in their hearts, architects, and the first thing they want to do when they get to a site is to bulldoze the place flat and build something grand. We’re not excited by incremental renovation: tinkering, improving, planting flower beds. There’s a subtle reason that programmers always want to throw away the … 

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

Quick Tip / Fix – SummerNote Editor resize editor after using ‘reset’

I’ve been using recently the Summernote Editor in a project and at a certain point of time, one action was to load a template (saved rich text) into the editor and remove the old text that might be there. When the editor was initialized the resize of it was working fine, after ‘pasting’ the loaded template inside … 

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

PHP –  cURL - create a secure connection to APIs

I’ve been recently trying to use the Google+ and Google Drive APIs for a custom tool to manage your files inside a bigger CRM/ERP and storing them inside Google Drive. The web application is build in Laravel and I was using https://github.com/google/google-api-php-client If you like this and find it usefull please consider sharing it! Cheers!

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

How to prevent URL double encoding/escaping

In a recent project, I’ve been involved on we hit the problem of the server double encoding the URL. It was an e-commerce website, with a shop made on top of OpenCart, with a search option (a simple input box). When you were typing a two work keyword in there, the server was encoding the … 

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