Application for a Hong Kong Work Visa

It's been a while since I moved from Russia to Hong Kong to work here as a software engineer. The whole process includes quite a lot of steps, starting from interviews, visa application process, accomodations in Hong Kong and so on, but in this blog post I want to clarify just one of them - application for a work visa.

Nginx's HTTP/2 Does Not Work

It may seem trivial to enable HTTP/2 support in Nginx, but there are some caveats you may face. Let's go through the ones I faced during the HTTP/2 configuration for our sites.

How to Configure HTTP/2 with Varnish Using Nginx

More and more companies have started utilising HTTP/2 to improve performance of their sites and user experience. It's quite easy to enable HTTP/2, but how can you enable HTTP/2 with SSL if you have Varnish cache in front of your infrastracture? As Varnish 4.* doesn't support SSL, we need to find a way to make all these components work together.

Automating Code Style Fixes with Git and PHP Coding Standards Fixer

We all know coding standards in the PHP community and try to follow them. Despite this, we are all human beings and make mistakes from time to time. That being said means that we have a few options here: 1) Fix all code style issues manually 2) Use plugins for IDE or run CLI tools to fix everything These two options are not the ones I want to use. There is one more option - automate everything. Even though I'm going to use Git and PHP CS Fixer, the principles are simple and you can apply them to any language and any control version system. Keep reading to remove the routine and become a more productive developer.

How to Use a Custom Storage Layer in FOSUserBundle

Almost each Symfony project uses FOSUserBundle because it speeds up the development and provides useful features to manage users. It has a few built in storage layer implementations: one for Propel and a few for Doctrine (both ORM and ODM). It's great, but there are some cases when you have to use another storage. Luckily, FOSUserBundle is flexible enough and provides a way to implement a custom storage layer.  You just need to implement your own user manager to use all features of FOSUserBundle.

Paysera Symfony2 Integration

It's a common need to integrate a payment gateway into a project. Even though there are many well known systems and aggregators like PayPal, RBKMoney, Paymentwall, Robokassa and so on, I want to talk about Paysera. It's another quite new payment system. They claim to have low commission fees for a convenient and wide range of services. Paysera allows your users to pay via cards and SMS. Integration is quite easy, but has some unclear moments during the process that I want to point out.

High-level Architecture of Payment Gateways

At some point we all face the need to integrate a payment gateway. It may seem difficult, but actually it's not. There are many payment gateways to choose from, but the good point is that most of them work the same way. You just need to understand the high-level picture and you're ready to integrate any of them into your project.

How to Avoid Common Mistakes in JavaScript

From time to time, we all make mistakes while programming in JavaScript. It may happen due to many reasons: lack of experience, bad mood, deadline, a headake and so on. Even though many issues seem small, they can still become a reason for a huge failure and hours of debugging in the future. That's why you need to pay attention to details when you're coding, and I'm going to give you some advice how to make this process easier.