Barouh & Partners in the Mountains - The Mirko Version

Remote work is great, but spending time together is awesome. That's why we try to meet twice a year so we can bound and build the team. For our latest team building we wanted to snowboard/ski, that's why we choose Rila lakes as our location. Friday, 30 January - Getting Together Working from home means that I can just wake up, brush my teeth and start working. That's why I decided to stay at a friend of mine, who lives a good 30 minute walk from…


How to add HTTP Basic Authentication to your Rails application

From time to time, it's good to deploy an early version of your application, so the client can take a look. With services like Heroku, it's super easy to deploy, but it's not good to leave the application visible to the public. HTTP Basic Authentication to the rescue Most of the PaaS providers abstract the web server from you, but even you have access to it, you can use Rails to setup basic authentication. First, create a new concern in your cont…


How to add Facebook like button that works with Turbolinks

After finding a solution to add Google Analytics tracking code, once again I had to face a problem that came with Turbolinks. I was not able to load the facebook script in the head of the page, to prevent it from being loaded with every single request. That's why, I decided to combine my research into a helpful CoffeeScript class. To be able to use it, you need to require the file in your application script and load them in the head section of th…


How to add Google Analytics tracking that works with Turbolinks

Turbolinks is a really nice way to improve your Rails 4 application's speed. It uses AJAX to load the pages and just replace the body element of your page. The official Google Analytics tracking code does not play nice with this approach, but we can easily make it work. The following code snippet is a nice and clean solution for a couple of reasons: It works nicely with Turbolinks Degrades to work even without Turbolinks enabled Uses the new trac…


How many things can you learn in a year?

Last month I celebrated one year working together with the Barouh & Partners team. And I can tell that I expected that changing work places would change the way I code and the tools I use, but I was not expecting such a big change. Catching up with Symfony Like every journey, this one had a beginning as well and it was called Symfony. I knew that the company was using it for most of their work and like everybody who has some experience with P…


Add syntax highlighting to Ghost with Prism.JS

We are software development company and as such, we will blog about code from time to time. I know that I would do it as I am one of the company's developers. That's why we needed to add syntax highlighting to our blog. Ghost is really nice platform (even though is not completely finished yet) and it's a breeze to extend to meet your needs. Prism.JS For syntax highlighting library, we choose Prism.JS, which is really nice and as the site says, it…