When to use browser push notifications

Push notifications are a really nice feature, you can trigger a notification to the user device with any text that you want with title, image, body and it even can make the mobile device to vibrate (depends on the browser) when receiving it.

This is a really cool way to get the user attention when you have promotions, forgotten baskets full of products or you have published something new.

Continue reading “When to use browser push notifications”

Why you should care when you are sending the notifications?

What I observe on vast of the majority of the news websites and not only them, is that they are sending all kind of notifications (Apps, Twitter, Emails etc.) when possible, 10 AM, 2 PM, 11 PM, 1 AM.

Continue reading “Why you should care when you are sending the notifications?”

How to send emails that are not marked as SPAM?

Recently I helped one company to prevent common emails for registrations and etc. to be marked as SPAM automatically from users mailboxes.

When you are using third-party service like MailChimp and with your own domain to send your emails you have to do several steps to prove all mailboxes that you are you and that you are not some spammer.

Continue reading “How to send emails that are not marked as SPAM?”

Apache – Rewrite all URIs to a single file

This week I had to help a friend with his new small ReacJS website running on Apache.

His problem was that URIs which does not exist the Apache was returning as 404 pages, he needed a common rule used by a lot of PHP frameworks, Rewrite all URIs which are not Files or Directories to /index.html

Example URL www.example.com/myprofile to actually load www.example.com/index.html and let the ReactJS route do his work and show what it needs.

Continue reading “Apache – Rewrite all URIs to a single file”

Go Lang Oracle – ORA-00933: SQL command not properly ended

While building some migrations with Goose I had some strange (for me) error, for which you can find a lot of different stuff on Google but nothing helped.

The error was like in the title: “ORA-00933: SQL command not properly ended” for this query


UPDATE table1 SET title = CONCAT('FORMER-', title) WHERE id < = 500;

This query will work without problems in SQL editor like Oracle SQL Developer but not in the GO Goose adapter

Continue reading “Go Lang Oracle – ORA-00933: SQL command not properly ended”

PHP SoapClient() gives error 500 and cannot catch the error

Went to an error 500 in production server while using PHP SoapClient library to connect to some third-party API. The error was really strange, just error 500 and nothing more, even if you are using try catch, you won’t be able to catch and see the error.

The Example:


try{
    $client = new SoapClient("https://api.thirdparty.com/some/service?wsdl", ['exceptions' => true, 'trace' => true]);
} catch(SoapFault $fault) {
    trigger_error("SOAP Fault: (faultcode: " . $fault->faultcode . ", faultstring: " . $fault->faultstring . ")", E_USER_ERROR);
} catch(Exception $e) {
    trigger_error("SOAP Error: " . $e->getMessage(), E_USER_ERROR);
}

Continue reading “PHP SoapClient() gives error 500 and cannot catch the error”