Browsing CategoryCoding

Nginx resolver explained

Nginx resolver explained

Nginx resolver is playing very important part in creating fault tolerant setups, especially when it comes to the free open source version. In this article I’ll explain why we need Nginx resolver and how it works.

I remember the moment about a year or so ago when I came to the office and found people screaming that one of our sites was hacked.  …

Continue reading  »

Docker + Hodor for simple and reliable dev setup

Prerequisites

Here is real world scenario: You have this project you are working on, it requires php 5.3 ( yeah, old I know 🙂 ) in fpm mode + xdebug + nginx and maybe something else (database?). You spent couple days configuring all that stuff on your workstation and everything works..  …

Continue reading  »

Secure data bag items with chef solo

How to generate encrypted data bag item with knife and chef-solo

This post is mostly a memo to myself, because I often forget how to how to create encrypted data bag items..

Here is the deal. We know how to generate regular data bag items with knife: knife data bag create DATA_BAG_NAME DATA_BAG_ITEM ( for those who didn’t know ).  …

Continue reading  »

Problem with Drupal 6 CURL and Simpletest

When I had to switch from my usual Linux dev box to Mac 10.7 recently (because of Sandy hurricane), I noticed a problem with CURL when I was running my tests through command line.

Basically CURL was just returning output to STDOUT instead of passing it to a variable as it should because of RETURNTRANSFER option in the simpletest class.  …

Continue reading  »

Moving single MySQL database to tmpfs

Recently I had a problem running Drupal Simpletest on my new i7 dev box. It took couple minutes to execute a set of relatively simple tests and as a developer you probably know how annoying that could be. The problem was largely due to InnoDB storage engine and it slowness caused by creating / removing tables (compared to let say MyISAM).  …

Continue reading  »