Vue.js – push data from nested childs to parent

Last time I work with Node and Vue.js. It’s very nice and allows to simplify many, many things. And it’s a lot better – for me – than React and its code mess… One of very nice features from Vue is components. We can separate code into small modules and then import and use them in another as blocks. We can also send some data to them, but direct data binding is only in one way – from parents to childs. According to official documentation, we should use events to notify parents about changes in childs and then make changes. But what about nested childs?

Continue reading “Vue.js – push data from nested childs to parent”

Nginx – SSL/TLS configuration

We have ready Nginx server, ready PHP deamons with tweaked configuration so… what next? It’s time to secure our websites. With Nginx it’s very simple to run SSL/TLS connections and also HTTP/2 – faster protocol, great for mobile devices and new web browsers. Like in previous chapters, we will make changes not only to enable secure connections, but also tweak default settings – be aware, these recommendations will not work with old browsers like Opera 12, Internet Explorer 7 or old Android (2.x) build-in browsers. I thinks is isn’t any drawback, these browsers are obsolote for a long time. Ok, let’s start with Nginx configuration.

Continue reading “Nginx – SSL/TLS configuration”

Why road bike is better than MTB – few arguments

I decided to write about this, very irritable topic – what is better, road bike or MTB? After few years and riding on different bikes, I think road bike is much, much better. Remember, that it’s only my opinion and you can have completely different – everyone has their own point of view. I did not try to be objective, but I have some arguments to say that road bikes are better. Why? Just read rest of this post.

Continue reading “Why road bike is better than MTB – few arguments”

Express.js and Vue.js – secure forms using CSRF token

Yes it’s something new on this blog – not only PHP, but also Node.js and Vue.js because I work on new project and use these technologies. Many, many things are completly new for me, but some of them are not. Good example is forms security: we must prevent attackers to make CSRF attacks and use tokens. Simple to say and now, in PHP world, very simple in usage – most of frameworks, most of template systems already have build-in solutions. With Express.js and Vue.js we can use available node modules, but we must still remember about some things. This post is about how use CSRF in that connection.

Continue reading “Express.js and Vue.js – secure forms using CSRF token”

Quick tip: increase PhpStorm memory limit

I use PhpStorm as my standard IDE in work. Why? I think it isn’t necessary to describe all advantages – it’s very good software, appreciated and recommended by many, many developers from whole world. PhpStorm can increase our productivity, we can work very fast with code inspection, integrated version control, debugging, testing and many, many other things. But PhpStorm is not perfect. It can be slow if we work with bad or low quality code – mix of not only PHP but also HTML, CSS and JavaScript in one file. With active default inspections and a lot of lines, it can be slooow and require more memory.

Continue reading “Quick tip: increase PhpStorm memory limit”