• Server-side Google Analytics


    Usually, people integrate Google Analytics into their shops via simple pre-generated client-side javascript snippet. It’s pretty straightforward, easy to use and works most of the time correctly from the box. So why would anyone want to use a server-side integration? There could be a helluva lot of reasons for that. For example, you may want to track some events from your server-side workers — it would be ugly and unreliable to involve a browser here. Or you may want to implement a complicated funnel for your sales, mixing client-side events with your CRM events. So, is it possible? Sure, it is, and we’ll use Measurements Protocol for this. At the time, it’s a most modern way to save raw analytics data to Google Analytics from whatever environment you want. I’ll use PHP with Guzzle for code examples, but you surely can use any language and any library: there are no differences in principle at all. And let’s assume that you already have the perfectly working client-side integration.

  • Windows workspace with WSL and Docker



    As a web developer, I frequently use a lot of command line tools to make my life easier. I prefer to be able to assemble a computer from whatever hardware I want, so I don’t like Macs and stuff like this. Linux desktops are good enough our days, but I love to play video games from time to time, and it wouldn’t be effortless to keep two different operating systems for work and entertainment. My best compromise was to use Windows.

  • Using Letsencrypt with Docker

    5ada4af31481fpexels photo 892548

    Who needs all those paid certificate providers while we have such a brilliant project as Letsencrypt? It allows a domain owner to obtain a valid certificate for his domain in a matter of seconds without the boring stuff like generating CSR, making DNS verification records or even passing documents to the certificate issuer center. However, paid certificates most often have an expiration time of a year. And free Letsencrypt certificates live only for a couple of months. But it’s definitely not a huge problem if there is a way to automate the renewal process. And there it is.

  • Books

    Books were hard to get at a time when I was a kid. They were expensive and, moreover, there was a complete lack of them. Many people owned no books at all, and some other copied them manually (by hand). But there always were a lot of books in our family, and it was shocking to me back then — to see no books at all in a room.

  • A Few Notes on Composition of Reducers

    5ada4a05c5b4apexels photo 355288

    Managing the state of an application with libraries like redux is awesome. It provides a really easy way to write simple and testable code for state transitions. You only need to decide on a structure of the desired state and write a corresponding pure function.

  • How To Update Cloudfront Certs With Letsencrypt

    Letsencrypt is an excellent service for obtaining totally free security encryption certificates. Fortunately, it also has a marvelous client named Certbot. Let’s install it.

  • Just saying «Hello» and chilling around

    I have never been really good at writing. I won some rewards in my childhood. I wrote some shitty verses in my youth. None of those achievements really were significant for the universe around me. It was all like a silly child play with the symbols I barely know. Move one back and another forward, make a stanza, make another one, make them a little bit more shiny. I experienced that well-known fear of a blank page. And I experienced that recursive «oh, I can do this paragraph better» annoying thing too. But I love writing, I really do. I have dreamt about writing a book all my life long just like my grandfather had dreamt before me. That’s why I have decided to write my thoughts in English: to master my slack skills with practice that makes me happy.

  • Как я перестал бояться и полюбил конфиг

    Как правило, наибольшего успеха добивается тот, кто располагает лучшей информацией

    Бенджамин Дизраэли

    Лишь совсем простые приложения могут обойтись без файла конфигурации. У остальных всегда найдется, что хранить в конфиге: настройки окружения, настройки логики, часто меняющиеся фрагменты текста, etc. Словом, вопроса «что хранить в конфигурации» обычно не возникает: кандидатов достаточно. А вот вопрос «как хранить конфигурацию» возникает часто и еще чаще решается не самыми оптимальными способами. В этой статье я хотел бы рассмотреть варианты хранения конфигурации приложения, их плюсы и минусы.

  • Бесплатный сертификат от Letsencrypt


    Зачем это?

    У защищенного соединения есть множество преимуществ перед старым добрым http: защита от перехвата траффика, защита от подмены содержимого, лучшее ранжирование в поисковых системах и т.д. Мне вот, например, нравится зеленый значок в адресной строке. Раньше за всё это удовольствие нужно было платить, поэтому сертификаты можно было увидеть только на крупных проектах, либо платежных системах (где риск компрометации данных велик и без сертификата вас просто не поймут). Проект letsencrypt.org призван изменить это положение вещей раз и навсегда.

  • Latest docker for Ubuntu LTS

    For Ubuntu 14.04 LTS

    Latest docker version (automatic update)

    apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
    echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" >> /etc/apt/sources.list.d/docker.list
    apt-get update
    apt-get purge lxc-docker*
    apt-get install docker-engine

    And result will be like this:

    docker -v
    Docker version 1.9.0, build 76d6bc9

    Latest docker-compose version

    curl -L https://github.com/docker/compose/releases/download/1.5.1/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
    chmod +x /usr/local/bin/docker-compose
One is the pinnacle of evolution; another one is me

One on the picture is the pinnacle of evolution; another one is me: inspired developer, geek culture lover, sport and coffee addict